bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for preserving edit on files when checking out


From: Derek Price
Subject: Re: Patch for preserving edit on files when checking out
Date: Thu, 21 Apr 2005 09:53:51 -0400
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark D. Baushke wrote:

> Derek Price <derek@ximbiot.com> writes:
>
>> Darren Bowles wrote:
>
>>> Please find attached my cvs patch, with test added to
>>> sanity.sh.
>>>
>>> As requested, the format is cvs diff -u
>
> ...
>
>> That said, it looks like it will probably work as Darren
>> specified, but I am left with a few general discussion questions:
>>
>>
>
>> Edits are not attached to a particular workspace. Neither is
>> there a ref count. Perhaps a general solution would maintain an
>> edit ref count so that something like "cvs co proj; cvs edit
>> proj/file; cvs co -d proj-new proj; cvs edit proj-new/file; cvs
>> unedit proj/file" doesn't remove the edit in the proj -new
>> directory.
>
>
> Hmmm... that seems rather complicated.


A little, but I don't think it would be hard to implement.  An int
just needs to be added to the lines in CVS/fileattr to keep track of
the refcount.  All the areas that currently call unedit then need to
just track that and only remove the entire line if the ref is 0.

It does rely on `cvs release' being used to release workspaces, but
this isn't so bad.  `cvs edit' from multiple workspaces doesn't really
work even close to correctly without it.

>> I'm not sure I should commit Darren's change until we can answer
>> this question, though, on the other hand, I am almost certain
>> Darren's change is a step in the right direction. It certainly
>> doesn't make things any worse. Any other opinions?
>
>
> I have no fundamental objections to Darren's change, but I am also
> interested in hearing opinions on the matter.


I am pretty certain Darren's change is going in the right direction.
I'm going to commit it to feature, with the change that I am going to
make it the default behavior with no configure option, if no one
objects soon.  Should this be on stable?  The more I think about it,
the more it looks like a bug fix to me.

> Out of curiosity, can someone tell us if CVSNT has solved this
> problem differently?


???

Cheers,

Derek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZ7BvLD1OTBfyMaQRAlYRAJ9M1f/sxRclXWMzZlArAVtOQp+qYACgoTbZ
7YcD0T39c5cY8rjASwiFudg=
=QvZR
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]