[darcs-users] tailor bug and possible fix

Benjamin Franksen benjamin.franksen at bessy.de
Wed Nov 15 20:53:43 UTC 2006


(Apologies if this is not the appropriate place to discuss tailor issues.)

I discovered a serious bug today when using tailor to convert from darcs to
CVS. The problem is that 'cvs commit' sometimes changes files in the
working directory, due to CVS keyword expansion. This can lead to conflicts
during the next 'darcs pull' operation and tailor will commit (to CVS)
versions of files that contain (darcs-) conflict markers. This is very
unfortunate as it means I manually had to roll back the CVS branch
(using 'cvs admin -o', bäh). At least tailor should recognize conflicts
whenever they happen and abort with an error instead of going straight on
(and failing later anyway).

Tailor also commits files like .#xyz.1.12 that CVS automatically creates
during update, whenever the file in the working directory is modified. This
latter problem can be avoided by 'cvs commit'ing only files that are
affected by the darcs patch that has been pulled. (Which is an information
that is readily available from the darcs patch).

I managed to circumvent the problem when converting manually by doing 'darcs
revert' in tailor's working copy after each CVS commit. Then I do 'darcs
pull' for the next patch and then I 'cvs commit' with all files affected by
the darcs patch listed as arguments. I did this up to (and including) the
point where I had removed all CVS keywords from the source files (in the
darcs history). From that point on I could again use tailor to do the rest
of the conversion automatically. Hopefully I will get no more conflicts in
the future... unless someone (accidentally or out of stupidity) adds a CVS
keyword again).

BTW, -ko or -kk CVS options did no good either (nor did freeze-keywords =
True). This may be because I had (already expanded) CVS keywords /in my
darcs repo/, and these keywords did not coincide with the ones that were
produced by CVS on commit, because the commit was to another branch.

Would it be possible, in principle, to change the behavior of tailor
according to teh above procedure, when converting from darcs to CVS? I
would even try to fix this myself, however tailor seems to be quite generic
in it's working and I am not sure how this would interact with all the
other conversion ways. Which source files would be affected?

Cheers,
Ben





More information about the darcs-users mailing list