[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cvs add (resurrect) incompatibilities
From: |
Mark D. Baushke |
Subject: |
Re: cvs add (resurrect) incompatibilities |
Date: |
Thu, 21 Oct 2004 12:05:54 -0700 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Derek Robert Price <derek@ximbiot.com> writes:
> Mark D. Baushke wrote:
>
> > 2004-10-21 Mark D. Baushke <mdb@cvshome.org>
> >
> > * add.c (add): Pay attention to cvswrite mode when resurrecting a
> > file.
> > (Report from Frank Hemer <frank@hemer.org>.)
> > * sanity.sh (resurrection): Add new tests to deal with read-only
> > mode on a cvs add durring a resurrection.
>
>
> I disagree with this patch. The file shouldn't be marked read-only
> until after commit - it's a modified file and should be in a state the
> user can still edit until commit.
Agreed. That is what the patch does.
> Of course, it should be checked out read-only if other criteria would
> have caused that on up/co when the resurrection is of an uncommitted
> removal (since the resurrected file immediately assumes "unmodified"
> and "unedited" status),
Again, agreed. That is what the patch does.
> but not when the resurrection still needs to be committed as in the
> case you appear to be testing.
Yup... perhaps I need a better ChangeLog entry?
2004-10-21 Mark D. Baushke <mdb@cvshome.org>
* add.c (add): Pay attention to cvswrite mode when resurrecting a
file that was not yet committed.
(Report from Frank Hemer <frank@hemer.org>.)
* sanity.sh (resurrection): Add new tests to deal with read-only
mode on a cvs add durring a resurrection. Verify that -r is not
honored when the resurrected file must be committed to be seen.
Detailed description:
The change to add.c deals with the case of
cvs rm -f file1
cvs -r add file1
that is, the file already existed in the repository and no change is
required, we may therefore honor the -r request.
The change to sanity.sh tests two things...
a) Should a ressurection honor the read-only flag? Answer: no.
cvs rm -f file1
cvs ci file1
cvs -r add file1
test -w file1 || echo there is a bug here
Implementation: Modify resurrection-6 to add the '-r' switch
Add resurrection-6b to verify that the file has the write mode
bit set.
b) Should a ressurection of a file that has a top-of-branch version
honor the read-only flag? Answer: no
cvs rm -f file1
cvs -r add file1
test -w file1 && echo there is a bug here
Implementation: add tests resurrection-{13,14,15} to verify that
the newly re-added file honors the '-r' switch.
I think that covers it. If there are no other objections, I'd like to
commit this patch.
-- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFBeAiRDsmuPPFOO2cRAsdFAJ9HfW2dSOXqRsAFQcvGN2uX/XP3hQCeLCrS
zoGGlzJ2eco/XlwMyHErAog=
=nMSA
-----END PGP SIGNATURE-----