[cvsnt] Re: Exclusive editing and branches

Zsolt Branyiczky brazso at easymail.hu
Mon Feb 6 14:21:59 GMT 2006


Zsolt Branyiczky wrote:
> Hi,
> 
> I use Powerbuilder IDE, where the objects (files) can be checked out
> just exclusively (because without native cvs support, scc2cvs interface
> must be used with it). So far just single branches (the HEAD) had been
> used at our projects, but today I started to test the 2 branches (main
> and bugfix trunks) scenario. Unfortunately I could not check in (commit)
> the same object checked out in the 2 branches, more precisely I could
> check in to that one, which was checked out later in time.
> 
> After checking out a object from branch A (cvs edit -c), in the
> repository, fileattr.xml contains normally the edit info of the object
> (tag property contains branch A).
> Unfortunately after checking out the same object of branch B (another
> cvs edit -c), the previous info is overwritten (and tag property
> contains branch B), there is no error message. Therefore later I can
> check in (cvs ci -c) just the object in branch B, since info from branch
> A does not belong to the object yet.
> If I try to check in the object into branch A, I get this error message:
> 
> cvs server: user 'brazso' is not a valid editor of the file
> 'dst_karjova_filter.sru'
> cvs [server aborted]: correct above errors first!
> 
> It would be a rude solution if I forced the scc2cvs interface to neglect
>  -c options at the used commands, but I'm afraid I cannot do it.
> 
> Is it possible to use exclusive checkouts of files in branches, or the
> edit/watch flags belong just to the file independently on its branch
> (ie. a file may have just a single edit/watch flag)?
> 
> Regards
> Brazso
> 
> CVSNT 2.5.03 (Scorpio) Build 2151

I checked the source of edit.cpp.
The function "check_can_edit" really compares the actual tag name to the 
one found in the fileattr.xml in case of searching for earlier exclusive 
chekouts for a file, so it works properly from my point of view.
But as for function "editor_set" (where new file tag might be appended 
under file tag in fileattr.xml or an existing one might be deleted), 
unfortunately this tag checking is completely missing. That's why the 
exclusive checkout works only globally, not in the scope of a branch.
Perhaps I simplify too the problem, but if I'm right, it cannot be so 
hard to fix it.

Brazso



More information about the cvsnt mailing list