rebase: specify custom conflict marker labels for rebase (BC)
authorDurham Goode <durham@fb.com>
Thu, 08 May 2014 16:55:56 -0700
changeset 21526 3b40e32e88c3
parent 21525 559f01f19cf6
child 21527 1f05a7bcde50
rebase: specify custom conflict marker labels for rebase (BC) Changes rebase conflict markers to say 'source' and 'dest' instead of 'local' and 'other'. This ends up looking like: one <<<<<<< dest: a3e5c7fd master - bob: "A commit to master" master ======= mine >>>>>>> source: c7fda3e5 - durham: "A commit to my feature branch" three
hgext/rebase.py
tests/test-shelve.t
--- a/hgext/rebase.py	Fri May 09 18:15:02 2014 -0700
+++ b/hgext/rebase.py	Thu May 08 16:55:56 2014 -0700
@@ -531,7 +531,8 @@
         repo.ui.debug("   detach base %d:%s\n" % (repo[base].rev(), repo[base]))
     # When collapsing in-place, the parent is the common ancestor, we
     # have to allow merging with it.
-    return merge.update(repo, rev, True, True, False, base, collapse)
+    return merge.update(repo, rev, True, True, False, base, collapse,
+                        labels=['dest', 'source'])
 
 def nearestrebased(repo, rev, state):
     """return the nearest ancestors of rev in the rebase result"""
--- a/tests/test-shelve.t	Fri May 09 18:15:02 2014 -0700
+++ b/tests/test-shelve.t	Thu May 08 16:55:56 2014 -0700
@@ -210,11 +210,11 @@
   +++ b/a/a
   @@ -1,2 +1,6 @@
    a
-  +<<<<<<< local: *  - shelve: "pending changes temporary commit" (glob)
+  +<<<<<<< dest: *  - shelve: "pending changes temporary commit" (glob)
    c
   +=======
   +a
-  +>>>>>>> other: * - shelve: "changes to '[mq]: second.patch'" (glob)
+  +>>>>>>> source: * - shelve: "changes to '[mq]: second.patch'" (glob)
   diff --git a/b.rename/b b/b.rename/b
   new file mode 100644
   --- /dev/null
@@ -604,11 +604,11 @@
   M f
   ? f.orig
   $ cat f
-  <<<<<<< local: 5f6b880e719b  - shelve: "pending changes temporary commit"
+  <<<<<<< dest:   5f6b880e719b  - shelve: "pending changes temporary commit"
   g
   =======
   f
-  >>>>>>> other: 23b29cada8ba - shelve: "changes to 'commit stuff'"
+  >>>>>>> source: 23b29cada8ba - shelve: "changes to 'commit stuff'"
   $ cat f.orig
   g
   $ hg unshelve --abort
@@ -647,11 +647,11 @@
   M f
   ? f.orig
   $ cat f
-  <<<<<<< local: 6b563750f973  - test: "intermediate other change"
+  <<<<<<< dest:   6b563750f973  - test: "intermediate other change"
   g
   =======
   f
-  >>>>>>> other: 23b29cada8ba - shelve: "changes to 'commit stuff'"
+  >>>>>>> source: 23b29cada8ba - shelve: "changes to 'commit stuff'"
   $ cat f.orig
   g
   $ hg unshelve --abort