August 8, 2003

CVS Is Dumb (Sometimes)

Filed under: VonTrapp — Ryan Wilcox @ 11:22 am

I finally finished merging vendor code with our code. Along with the ordinary fun cvs conflicts, several dozen files also had this problem

// FileHeader.h
>>>>> 1.2.1

That folks is what a cvs conflict looks like. Of course, this won’t compile (that’s part of the point, I think).

But it’s also conflicting on a autogenerated keyword!

You see, CVS will replace keywords (“stuff betwee $s”) with Useful Information it figured out during commit time.

Of course, these two files were committed at different times with differnet versions. Because they were (and that’s the point).

None of these lines contain useful information (because CVS will replace it with real information when it does a commit). So I wrote a script to un-expand those keywords.

Of course, it still probably added a half hour to the job, as I had to locate the files that had those kind of conflicts and run the script on them. Plus I’ll have to check in these “changed” files to the repository.

In Summary: CVS conflicts and merging are fun. Especially when its CVS that causes the conflict in the first place

1 Comment

  1. Sometimes CVS is not so dumb. Use the -kk option to “kill keywords” and CVS won’t expand those keywords, causing spurious conflicts. This has some weird interactions with the -kb option, so if you’ve been using that (perhaps on binary files in CVS) you will want to study the manual and try it out first.

    Comment by Wes Peters — April 7, 2004 @ 3:15 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.