Patchwork [4,of,5,V4] update: specify custom conflict markers for update (BC)

login
register
mail settings
Submitter Durham Goode
Date May 15, 2014, 8:52 p.m.
Message ID <bb62c44b762c45dd6fdd.1400187161@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/4756/
State Superseded
Commit 1ab30e9ba0fceb15736ad226ff701325e9682ec9
Headers show

Comments

Durham Goode - May 15, 2014, 8:52 p.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1399684151 25200
#      Fri May 09 18:09:11 2014 -0700
# Node ID bb62c44b762c45dd6fdd0bbd0b322e12023d0005
# Parent  e44dce239a97d58b20f35bec07c785e50c4d71c5
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.

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -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"""
diff --git a/tests/test-merge-revert2.t b/tests/test-merge-revert2.t
--- a/tests/test-merge-revert2.t
+++ b/tests/test-merge-revert2.t
@@ -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