I asked brion on #mediawiki if he ever had problems merging between branches due to the CVS keywords we have embedded in the source code. Keywords in source make merging between branches kinda hard; you get a lot of spurious conflicts, and it's consequently harder to find and resolve the real ones. See this URL for details:
https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_5.html#SEC64
Brion said that, yes, he did have problems with them, and said to remove CVS keywords when I saw them. I then did a global search-and-replace across the codebase, removing all the CVS keywords I could find (almost all were $Id:$; I found one or two $Revision:$ ones).
I realize that having CVS keywords in source files can be convenient; I don't think that convenience outweighs the burden put on release managers when merging across branches. Life's hard enough for our release managers, and if a release manager misses a real conflict because a merge caused 65 false ones, we've got a quality problem.
I've added notes to this effect in the coding standards in docs/design.doc; I'll try to find a place on meta.w.o to add it, too. I should have posted to the list about it earlier; sorry I didn't.
~ESP
Evan Prodromou wrote:
I asked brion on #mediawiki if he ever had problems merging between branches due to the CVS keywords we have embedded in the source code. Keywords in source make merging between branches kinda hard; you get a lot of spurious conflicts, and it's consequently harder to find and resolve the real ones. See this URL for details:
https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_5.html#SEC64
Brion said that, yes, he did have problems with them, and said to remove CVS keywords when I saw them. I then did a global search-and-replace across the codebase, removing all the CVS keywords I could find (almost all were $Id:$; I found one or two $Revision:$ ones).
I realize that having CVS keywords in source files can be convenient; I don't think that convenience outweighs the burden put on release managers when merging across branches. Life's hard enough for our release managers, and if a release manager misses a real conflict because a merge caused 65 false ones, we've got a quality problem.
I've added notes to this effect in the coding standards in docs/design.doc; I'll try to find a place on meta.w.o to add it, too. I should have posted to the list about it earlier; sorry I didn't.
~ESP
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Use option -kk when merging. This disables RCS keyword expansion.
On Thu, 2004-02-12 at 15:35 -0500, David Wendt wrote:
Use option -kk when merging. This disables RCS keyword expansion.
Thanks; I made a note about that in design.doc and forgot to mention it here. From the URL I quoted in my previous message:
https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_5.html#SEC64
"There is, however, one major caveat with using `-kk' on merges. Namely, it overrides whatever keyword expansion mode CVS would normally have used. In particular, this is a problem if the mode had been `-kb' for a binary file. Therefore, if your repository contains binary files, you will need to deal with the conflicts rather than using `-kk'."
There are other ways to work around this, but it means additional work for the release manager at merge time.
~ESP
Evan Prodromou wrote:
On Thu, 2004-02-12 at 15:35 -0500, David Wendt wrote:
Use option -kk when merging. This disables RCS keyword expansion.
Thanks; I made a note about that in design.doc and forgot to mention it here. From the URL I quoted in my previous message:
https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_5.html#SEC64 "There is, however, one major caveat with using `-kk' on merges. Namely, it overrides whatever keyword expansion mode CVS would normally have used. In particular, this is a problem if the mode had been `-kb' for a binary file. Therefore, if your repository contains binary files, you will need to deal with the conflicts rather than using `-kk'."There are other ways to work around this, but it means additional work for the release manager at merge time.
~ESP
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Do we have any binaries in the repository?
I cant check, I dont have access.
On Thu, 2004-02-12 at 16:05 -0500, David Wendt wrote:
"There is, however, one major caveat with using `-kk' on merges. Namely, it overrides whatever keyword expansion mode CVS would normally have used. In particular, this is a problem if the mode had been `-kb' for a binary file. Therefore, if your repository contains binary files, you will need to deal with the conflicts rather than using `-kk'."Do we have any binaries in the repository?
62, by my count:
perl -MFile::Find -e "find sub { print ($_, "\n") if (-f $_ && -B $_) }, '.'" | wc -l 62
I cant check, I dont have access.
There's anonymous public access to the CVS repository on SourceForge:
http://sourceforge.net/cvs/?group_id=34373
You can also check the downloadable tarballs at:
http://wikipedia.sourceforge.net/
~ESP
Evan Prodromou wrote:
On Thu, 2004-02-12 at 16:05 -0500, David Wendt wrote:
"There is, however, one major caveat with using `-kk' on merges. Namely, it overrides whatever keyword expansion mode CVS would normally have used. In particular, this is a problem if the mode had been `-kb' for a binary file. Therefore, if your repository contains binary files, you will need to deal with the conflicts rather than using `-kk'."Do we have any binaries in the repository?
62, by my count:
perl -MFile::Find -e "find sub { print ($_, "\n") if (-f $_ && -B $_) }, '.'" | wc -l 62
Aah... so that's how you check. I dont have perl on this system, but I guess there are a lot of binaries. Hope that they dont change on the branch. Is it possible we could merge using -kb, or is this impossible?
I cant check, I dont have access.
There's anonymous public access to the CVS repository on SourceForge:
http://sourceforge.net/cvs/?group_id=34373
You can also check the downloadable tarballs at:
http://wikipedia.sourceforge.net/
~ESP
Almost forgot about the read-only on sourceforge. (I must be losing it, I commit to repositories on SF every day!)
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
David Wendt dcrkid@optonline.net wrote:
Evan Prodromou wrote:
David Wendt wrote:
Do we have any binaries in the repository?
62, by my count: perl -MFile::Find -e "find sub { print ($_, "\n") if (-f $_ && -B $_) }, '.'" | wc -l 62
Aah... so that's how you check. I dont have perl on this system, but I guess there are a lot of binaries.
Well, just for the sake of it, here's a way of checking without Perl (using find, grep, and wc): find . -path "./images" -prune -or -exec file "{}" ";" | grep " data" | wc -l 63 [Note that includes 3 Vim ".swp" temp-files; the rest are mostly images, and the odd thing that 'file' misinterpretted]
An even simpler, and cheekier, test: grep -rLI "" . | grep -v "./images" |wc -l 66 [This picks up "empty" files as well; the extra grep is to make sure uploads aren't counted, as is the "-path...-prune...-or" in the find example]
Unix pipelines rule! :)
On Thu, 2004-02-12 at 23:32 +0000, Rowan Collins wrote:
62
63 [...] 66
These are all pretty much in the same ballpark. I think the scale is such that a manual solution (such as merging with -kk, then copying over the binary files by hand from one or the other branch, and hand-checking them for correctness) would be impracticable and error prone. Of course, if that's what the release manager(s) want to do, I won't stop them.
~ESP
On Thu, 2004-02-12 at 18:05 -0500, David Wendt wrote:
"There is, however, one major caveat with using `-kk' on merges. Namely, it overrides whatever keyword expansion mode CVS would normally have used. In particular, this is a problem if the mode had been `-kb' for a binary file. Therefore, if your repository contains binary files, you will need to deal with the conflicts rather than using `-kk'."
Is it possible we could merge using -kb, or is this impossible?
My reading of the above paragraph is that you get either keyword expansion suppression (-kk), OR proper treatment of binary files (-kb), but not both.
~ESP
wikitech-l@lists.wikimedia.org