changeset 21537:1ab30e9ba0fc

update: specify custom conflict markers for update (BC) Add custom conflict markers 'working copy' and 'destination' for doing hg update when there are conflicts between your working copy and the destination.
author Durham Goode <durham@fb.com>
date Fri, 09 May 2014 18:09:11 -0700
parents 92a6b16c9186
children 05925bb5f95a
files mercurial/hg.py tests/test-merge-revert2.t
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Fri May 09 16:13:14 2014 -0700
+++ b/mercurial/hg.py	Fri May 09 18:09:11 2014 -0700
@@ -483,7 +483,8 @@
     When overwrite is set, changes are clobbered, merged else
 
     returns stats (see pydoc mercurial.merge.applyupdates)"""
-    return mergemod.update(repo, node, False, overwrite, None)
+    return mergemod.update(repo, node, False, overwrite, None,
+                           labels=['working copy', 'destination'])
 
 def update(repo, node):
     """update the working directory to node, merging linear changes"""
--- a/tests/test-merge-revert2.t	Fri May 09 16:13:14 2014 -0700
+++ b/tests/test-merge-revert2.t	Fri May 09 18:09:11 2014 -0700
@@ -57,11 +57,11 @@
   @@ -1,3 +1,7 @@
    added file1
    another line of text
-  +<<<<<<< local: c3fa057dd86f  - test: "added file1 and file2"
+  +<<<<<<< working copy: c3fa057dd86f  - test: "added file1 and file2"
   +changed file1 different
   +=======
    changed file1
-  +>>>>>>> other: dfab7f3c2efb - test: "changed file1"
+  +>>>>>>> destination:  dfab7f3c2efb - test: "changed file1"
 
   $ hg status
   M file1