Patchwork [6,of,6,V5] update: specify custom conflict markers for update (BC)

login
register
mail settings
Submitter Durham Goode
Date May 16, 2014, 11:48 p.m.
Message ID <43683c8563c3534d7209.1400284120@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/4791/
State Accepted
Headers show

Comments

Durham Goode - May 16, 2014, 11:48 p.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1399684151 25200
#      Fri May 09 18:09:11 2014 -0700
# Node ID 43683c8563c3534d72090edab26dde9108e463b5
# Parent  27cb0613b2f00a4638768454f272aa838f0503f0
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.
Pierre-Yves David - May 18, 2014, 10:35 a.m.
On 05/16/2014 04:48 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham@fb.com>
> # Date 1399684151 25200
> #      Fri May 09 18:09:11 2014 -0700
> # Node ID 43683c8563c3534d72090edab26dde9108e463b5
> # Parent  27cb0613b2f00a4638768454f272aa838f0503f0
> update: specify custom conflict markers for update (BC)

Ok, lets push this!

I thinks this is a significant improvement over the previous state. And 
we'll have 2 month to bikeshed this. (and also a few days before Matt 
review the 156 patches now in clowncopter.

(queued)

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