[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: fix for: bug with ampersand modules, cvs client, and tags
From: |
Greg Klanderman |
Subject: |
PATCH: fix for: bug with ampersand modules, cvs client, and tags |
Date: |
Thu, 15 Mar 2001 18:45:45 -0500 (EST) |
Hi again,
I've fixed the bug I reported below yesterday. The ChangeLog entry
and patch against cvs-1.11 are attached. Please let me know if you
need anything more.
Greg
2001-03-15 Greg Klanderman <greg@itasoftware.com>
* checkout.c (build_one_dir): Fix typo where clauses of two
conditionals were reversed in call to Create_Admin. This caused
the CVS/Tag file to be removed in cases where it should have been
set, and vice-versa. It only surfaced in rare cases as this code
is only invoked when using the -d option to build the path to
check out in. Further, the bug would only matter when checking
out a module containing ampersand modules within it, via
client/server CVS.
Index: checkout.c
===================================================================
RCS file: /usr/home/greg/repository/cvs/src/checkout.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- checkout.c 2001/03/14 22:37:38 1.1
+++ checkout.c 2001/03/15 23:35:33 1.2
@@ -466,8 +466,8 @@
error (1, 0, "there is no repository %s", repository);
if (Create_Admin (".", dirpath, repository,
- sticky ? (char *) NULL : tag,
- sticky ? (char *) NULL : date,
+ sticky ? tag : (char *) NULL,
+ sticky ? date : (char *) NULL,
/* FIXME? This is a guess. If it is important
for nonbranch to be set correctly here I
>>>>> Greg Klanderman <greg@itasoftware.com> writes:
> Hi,
> I've come across a rather obscure bug involving ampersand modules, cvs
> client, and tags. I've tested against cvs versions up through 1.11.
> I tried to report this bug last fall, but I believe the email bounced.
> Essentially, if you have two projects, "foo", and "bar", and create a
> "baz" module as follows, in the modules file:
> baz -d foo foo &i_bar
> i_bar -d two/bar bar
> then "baz" is created by checking out "foo", and then checking out
> "bar" within "foo"s "two" directory.
> Now, if you check out "baz", using a tag, using client-server CVS,
> the "Tag" file will be missing in the directory "foo/two/CVS". The
> problem does not exist unless using client-server mode.
> I've attached below a tar'd and gzipped repository, repos.tgz,
> exhibiting this bug. To see it, with the tarball untarred in
> /phl/greg/junk/repos, do the following to see the bug does not exist
> in non client-server mode:
> [test4] phl| cvs -d /phl/greg/junk/repos co -r branch baz
> cvs checkout: Updating foo
> U foo/one
> cvs checkout: Updating foo/two
> U foo/two/four
> cvs checkout: Updating two/bar
> U two/bar/three
> [test4] phl| ls -l foo/two/CVS/
> total 16
> -rw-r--r-- 1 greg ita 54 Oct 19 20:51 Entries
> -rw-r--r-- 1 greg ita 8 Oct 19 20:51 Repository
> -rw-r--r-- 1 greg ita 21 Oct 19 20:51 Root
> -rw-r--r-- 1 greg ita 8 Oct 19 20:51 Tag
> But in client-server mode:
> [test5] phl| cvs -d greg@phl:/phl/greg/junk/repos co -r branch baz
> cvs server: Updating foo
> U foo/one
> cvs server: Updating foo/two
> U foo/two/four
> cvs server: Updating two/bar
> U two/bar/three
> [test5] phl| ls -l foo/two/CVS/
> total 12
> -rw-r--r-- 1 greg ita 54 Oct 19 20:52 Entries
> -rw-r--r-- 1 greg ita 0 Oct 19 20:52 Entries.Static
> -rw-r--r-- 1 greg ita 8 Oct 19 20:52 Repository
> -rw-r--r-- 1 greg ita 30 Oct 19 20:52 Root
> Notice that the Tag file does not exist, and there's an additional
> "Entries.Static" file with zero length.
> Thanks for any help you may be able to provide,
> Greg Klanderman
> greg@itasoftware.com