]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Improve use of svn merge, by specifying the file to merge, rather than
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 28 Jan 2007 00:06:01 +0000 (00:06 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 28 Jan 2007 00:06:01 +0000 (00:06 +0000)
  chdiring to the srcdir (which wasn't right when merging in a subdir).
  Thanks Ethan.

IkiWiki/Rcs/svn.pm
debian/changelog
doc/patchqueue/merge_patch.mdwn [deleted file]

index 87fd12fad3044f135723ce89622d9d6e3556f3c4..af4641d3af00b713ea428dde0b1371c70e2a5b47 100644 (file)
@@ -85,9 +85,8 @@ sub rcs_commit ($$$;$$) { #{{{
                if (defined $rev && defined $oldrev && $rev != $oldrev) {
                        # Merge their changes into the file that we've
                        # changed.
-                       chdir($config{srcdir}); # svn merge wants to be here
                        if (system("svn", "merge", "--quiet", "-r$oldrev:$rev",
-                                  "$config{srcdir}/$file") != 0) {
+                                  "$config{srcdir}/$file", "$config{srcdir}/$file") != 0) {
                                warn("svn merge -r$oldrev:$rev failed\n");
                        }
                }
index 483d14b1238d4535e13877ce759c9cf9936b2785..7a0e362d3fc5371838d0b1330d43a3b91f428fa1 100644 (file)
@@ -8,8 +8,11 @@ ikiwiki (1.41) UNRELEASED; urgency=low
   * Make gitorigin_branch and gitmaster_branch configurable via the setup
     file. Closes: #408599
   * French translation update. Closes: #408593
+  * Improve use of svn merge, by specifying the file to merge, rather than
+    chdiring to the srcdir (which wasn't right when merging in a subdir).
+    Thanks Ethan.
 
- -- Joey Hess <joeyh@debian.org>  Sat, 27 Jan 2007 18:56:49 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 27 Jan 2007 19:01:27 -0500
 
 ikiwiki (1.40) unstable; urgency=low
 
diff --git a/doc/patchqueue/merge_patch.mdwn b/doc/patchqueue/merge_patch.mdwn
deleted file mode 100644 (file)
index 2dcd991..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-svn's merge command has three twisty little syntaxes, none 
-very DWIM-ish. For merging one file, apparently it is helpful
-to specify that file itself. [This patch][] does that.
-
-[This patch]: http://ikidev.betacantrips.com/patches/merge.patch
-
-The bug that this fixes is hard to demonstrate without 
-generating a lot of noise, but you can get the idea by 
-finding a file that was committed in a subdirectory and
-merging a change with it.
-
-    [apu]$ emacs one/test.mdwn
-    [apu]$ svn add one/test.mdwn
-    A         one/test.mdwn
-    [apu]$ svn commit -m "Another test case for merging."
-    Adding         one/test.mdwn
-    Transmitting file data .
-    Committed revision 42.
-    [apu]$ emacs one/test.mdwn
-    [apu]$ svn commit -m "Change."
-    Sending        one/test.mdwn
-    Transmitting file data .
-    Committed revision 43.
-    svn merge -r38:39 ~/ikidevwc/patches/merge.patch
-    [apu]$ svn merge -r42:43 one/test.mdwn
-    svn: Cannot replace a directory from within
-    [apu]$ svn merge -r42:43 ~/ikidevwc/one/test.mdwn
-    svn: Cannot replace a directory from within`
-
-CGI.pm does a command much like the last one. However:
-
-    [apu]$ svn merge -r43:42 ~/ikidevwc/one/test.mdwn
-    svn: Cannot replace a directory from within
-    [apu]$ svn merge -r43:42 ~/ikidevwc/one/test.mdwn ~/ikidevwc/one/test.mdwn
-    U    /home/glasserc/ikidevwc/one/test.mdwn
-
-In other words, merging works only when you specify 
-the file, or, alternately:
-
-    [apu]$ cd one
-    [apu]$ svn merge -r42:43 ~/ikidevwc/one/test.mdwn
-    G    test.mdwn
-
-... if you're in the same directory as the file. Note that if 
-a file called "test.mdwn" happens to be where you are, it'll get
-changed! I think this is what is meant in `svn help merge` when
-it says:
-
-    If WCPATH is omitted, a default value of '.' is assumed, unless
-    the sources have identical basenames that match a file within '.':
-    in which case, the differences will be applied to that file.
-
-So, to conclude: when merging two revisions of a file, either specify
-the file, or be in the same directory as a file with the same name.
-This patch makes the former always happen, whereas previously the 
-second would sometimes not happen. It also obviates the call to chdir.
-
-Source: [this message][] on the svn-user list.
-
-[this message]: http://svn.haxx.se/users/archive-2005-03/0926.shtml
-
---Ethan
\ No newline at end of file