Re: Emptydir change from version 1.11
On Mon, Mar 17, 2003 at 11:10:17AM -0500, Larry Jones wrote: > The problem is that the mapping for ModuleB is not so obvious. What the > current scheme does is: > > DirA$CVSROOT/Emptydir > DirA/DirB $CVSROOT/Emptydir > DirA/DirB/DirC $CVSROOT/. > DirA/DirB/DirC/DirD $CVSROOT/Repox > DirA/DirB/DirC/DirD/DirE$CVSROOT/Repox/RepoY DirA/DirB/DirC $CVSROOT/Emptydir seems to me a better choice. There may not be a truly right thing to do here, but "$CVSROOT/." seems less right than the alternative, in the sense of "less likely to be what the user intended or expected, and less likely to be what they'll find useful". (No argument about the other four, btw.) -- | | /\ |-_|/ > Eric Siegerman, Toronto, Ont.[EMAIL PROTECTED] | | / A distributed system is one on which I cannot get any work done, because a machine I have never heard of has crashed. - Leslie Lamport ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
RE: Emptydir change from version 1.11
> -Original Message- > From: Larry Jones [mailto:[EMAIL PROTECTED] > Sent: Montag, 17. März 2003 17:10 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: Emptydir change from version 1.11 Hi Larry, First of all thanks for the clarification. > That is, it proceeds bottom-up matching working directories to > repository directories until it hits the root of the repository, at > which time it starts mapping to Emptydir. The first two and last two > mappings seem quite sensible to me, They certainly are... > only the middle mapping (to the > repository root directory) seems questionable. Yes indeed. That's my problem... > Does anyone disagree? > The change to implement this (which Mark posted) mainly consisted of > removing special-case code in favor of more general code that already > existed. This mapping simply happens to be what that existing code did; > I didn't see any clear need to change it. If others do, I'm open to a > patch to change this particular case, provided it doesn't break anything > else. Wasn't it the change from 1.11 to 1.11.1 that broke something in the first place? At least it broke enough that I don't see any possibility to upgrade our server to a newer version than 1.11... Or is there a workaround for this? Basically all I need is a possibility that people are still able to do a checkout or an update -d to an existing working directory without the need for heavy modifications to our modules file. Thanks, - Jens ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Emptydir change from version 1.11
Jens Altfelder writes: > > it seems that starting from version 1.11.1, directories which don't > exist on the server (which will be e.g. generated when using a line like > > "ModuleA -d DirA/DirB/DirC/DirD DirInRepos" > > in the Modules file) no longer have the "Repository" file in the "CVS" > directory point to the "$CVSROOT/CVSROOT/Emptydir" directory, but > instead to the "$CVSROOT" directory itself. That is not correct. To understand what's going on, let's look at two slightly more complicated module definitions: ModuleA -d DirA/DirBRepoX/RepoY ModuleB -d DirA/DirB/DirC/DirD/DirE RepoX/RepoY Now, when you checkout ModuleA, the CVS/Repository file in DirA points to $CVSROOT/RepoX and DirA/DirB points to $CVSROOT/RepoX/RepoY. I hope everyone agrees that that makes sense and is the right thing to do. Under the old scheme, DirA pointed to Emptydir instead and that caused no end of confusion since people expected it to be mapped to the corresponding repository directory. The problem is that the mapping for ModuleB is not so obvious. What the current scheme does is: DirA$CVSROOT/Emptydir DirA/DirB $CVSROOT/Emptydir DirA/DirB/DirC $CVSROOT/. DirA/DirB/DirC/DirD $CVSROOT/Repox DirA/DirB/DirC/DirD/DirE$CVSROOT/Repox/RepoY That is, it proceeds bottom-up matching working directories to repository directories until it hits the root of the repository, at which time it starts mapping to Emptydir. The first two and last two mappings seem quite sensible to me, only the middle mapping (to the repository root directory) seems questionable. Does anyone disagree? The change to implement this (which Mark posted) mainly consisted of removing special-case code in favor of more general code that already existed. This mapping simply happens to be what that existing code did; I didn't see any clear need to change it. If others do, I'm open to a patch to change this particular case, provided it doesn't break anything else. -Larry Jones Whatever it is, it's driving me crazy! -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
RE: Emptydir change from version 1.11
Thanks for the info. The mentioned thread is very interesting indeed as it deals exactly with my problem. I highly agree with Michiel's opinion stated in message msg00265 - the old way to handle things was much more logical. What exactly could the benefits of the "new" behaviour be? I don't really understand... as Michiel writes, "having a link to '.' seems very undesirable, even wrong". - Jens > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark D. > Baushke > Sent: Montag, 17. März 2003 11:44 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: Emptydir change from version 1.11 > > Jens Altfelder <[EMAIL PROTECTED]> writes: > > > Hi all, > > > > it seems that starting from version 1.11.1, directories which don't > > exist on the server (which will be e.g. generated when using a line like > > > > > > "ModuleA -d DirA/DirB/DirC/DirD DirInRepos" > > > > in the Modules file) no longer have the "Repository" file in the "CVS" > > directory point to the "$CVSROOT/CVSROOT/Emptydir" directory, but > > instead to the "$CVSROOT" directory itself. Which is a bit of a problem > > when doing another "checkout module" or an update with -d option on that > > directory, because that adds the complete repository in "$CVSROOT" to > > the working directory. > > > > Can anybody tell me how to circumvent this problem? Or do I have to > > stick to version 1.11 forever? > > > > Thanks in advance, > > - Jens > > The patch that Larry put into place for this in 2000-09-27 is included > after my .signature. > > You may also find the "modules confusion?" thread of interest: > > http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00253.html > http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00254.html > http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00256.html > http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00263.html > http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00265.html > > I don't recall the thread that triggered this change originally, > so someone else will need to speak to those points. > > As to your problem, I believe that DirA will point to CVSROOT/Emptydir > as you desire, I believe it should only be DirB and DirC that will point > to the "." directory. > > -- Mark > > 2000-09-27 Larry Jones <[EMAIL PROTECTED]> > > * checkout.c (checkout_proc): Match up user directories with > repository directories instead of using Emptydir. > * sanity.sh (cvsadm, emptydir): Update to match. > > Index: src/checkout.c > === > RCS file: /cvs/ccvs/src/checkout.c,v > retrieving revision 1.90 > retrieving revision 1.91 > diff -u -p -r1.90 -r1.91 > --- checkout.c28 Jun 2000 04:15:47 - 1.90 > +++ checkout.c27 Sep 2000 14:33:15 - 1.91 > @@ -806,55 +806,30 @@ internal error: %s doesn't start with %s > } > else > { > - if ((where_orig != NULL) > - && (strcmp (new->dirpath, where_orig) == 0)) > - { > - /* It's the case that the user specified a > - * destination directory with the "-d" flag. The > - * repository in this directory should be "." > - * since the user's command is equivalent to: > - * > - * cd ; cvs co blah */ > - > - strcpy (reposcopy, CVSroot_directory); > - goto allocate_repos; > - } > - else if (mwhere != NULL) > - { > - /* This is a generated directory, so point to > - CVSNULLREPOS. */ > - > - new->repository = emptydir_name (); > - } > - else > - { > - /* It's a directory in the repository! */ > + /* It's a directory in the repository! */ > > - char *rp; > + char *rp; > > - /* We'll always be below CVSROOT, but check for > -paranoia's sake. */ > - rp = strrchr (reposcopy, '/'); > - if (rp == NULL) > - error (1, 0, > -"internal error: %s doesn't contain a slash", > -repos
Re: Emptydir change from version 1.11
Jens Altfelder <[EMAIL PROTECTED]> writes: > Hi all, > > it seems that starting from version 1.11.1, directories which don't > exist on the server (which will be e.g. generated when using a line like > > > "ModuleA -d DirA/DirB/DirC/DirD DirInRepos" > > in the Modules file) no longer have the "Repository" file in the "CVS" > directory point to the "$CVSROOT/CVSROOT/Emptydir" directory, but > instead to the "$CVSROOT" directory itself. Which is a bit of a problem > when doing another "checkout module" or an update with -d option on that > directory, because that adds the complete repository in "$CVSROOT" to > the working directory. > > Can anybody tell me how to circumvent this problem? Or do I have to > stick to version 1.11 forever? > > Thanks in advance, > - Jens The patch that Larry put into place for this in 2000-09-27 is included after my .signature. You may also find the "modules confusion?" thread of interest: http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00253.html http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00254.html http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00256.html http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00263.html http://mail.gnu.org/archive/html/info-cvs/2003-02/msg00265.html I don't recall the thread that triggered this change originally, so someone else will need to speak to those points. As to your problem, I believe that DirA will point to CVSROOT/Emptydir as you desire, I believe it should only be DirB and DirC that will point to the "." directory. -- Mark 2000-09-27 Larry Jones <[EMAIL PROTECTED]> * checkout.c (checkout_proc): Match up user directories with repository directories instead of using Emptydir. * sanity.sh (cvsadm, emptydir): Update to match. Index: src/checkout.c === RCS file: /cvs/ccvs/src/checkout.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -p -r1.90 -r1.91 --- checkout.c 28 Jun 2000 04:15:47 - 1.90 +++ checkout.c 27 Sep 2000 14:33:15 - 1.91 @@ -806,55 +806,30 @@ internal error: %s doesn't start with %s } else { - if ((where_orig != NULL) - && (strcmp (new->dirpath, where_orig) == 0)) - { - /* It's the case that the user specified a -* destination directory with the "-d" flag. The -* repository in this directory should be "." -* since the user's command is equivalent to: -* -* cd ; cvs co blah */ - - strcpy (reposcopy, CVSroot_directory); - goto allocate_repos; - } - else if (mwhere != NULL) - { - /* This is a generated directory, so point to - CVSNULLREPOS. */ - - new->repository = emptydir_name (); - } - else - { - /* It's a directory in the repository! */ + /* It's a directory in the repository! */ - char *rp; + char *rp; - /* We'll always be below CVSROOT, but check for - paranoia's sake. */ - rp = strrchr (reposcopy, '/'); - if (rp == NULL) - error (1, 0, - "internal error: %s doesn't contain a slash", - reposcopy); + /* We'll always be below CVSROOT, but check for + paranoia's sake. */ + rp = strrchr (reposcopy, '/'); + if (rp == NULL) + error (1, 0, + "internal error: %s doesn't contain a slash", + reposcopy); - *rp = '\0'; - - allocate_repos: - new->repository = xmalloc (strlen (reposcopy) + 5); - (void) strcpy (new->repository, reposcopy); + *rp = '\0'; + new->repository = xmalloc (strlen (reposcopy) + 5); + (void) strcpy (new->repository, reposcopy); - if (strcmp (reposcopy, CVSroot_directory) == 0) - { - /* Special case -- the repository name needs - to be "/path/to/repos/." (the trailing dot - is important). We might be able to get rid - of this after the we check out the other - code that handles repository names. */ - (void) strcat (new->repository, "/."); - } + if (strcmp (reposcopy, CVSroot_directory) == 0) +
Emptydir change from version 1.11
Hi all, it seems that starting from version 1.11.1, directories which don't exist on the server (which will be e.g. generated when using a line like "ModuleA -d DirA/DirB/DirC/DirD DirInRepos" in the Modules file) no longer have the "Repository" file in the "CVS" directory point to the "$CVSROOT/CVSROOT/Emptydir" directory, but instead to the "$CVSROOT" directory itself. Which is a bit of a problem when doing another "checkout module" or an update with -d option on that directory, because that adds the complete repository in "$CVSROOT" to the working directory. Can anybody tell me how to circumvent this problem? Or do I have to stick to version 1.11 forever? Thanks in advance, - Jens ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs