[PATCH 4 of 5 V2] update: specify custom conflict markers for update
Durham Goode
durham at fb.com
Fri May 9 21:48:11 CDT 2014
# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1399684151 25200
# Fri May 09 18:09:11 2014 -0700
# Node ID bb5c619d1dc646da78108bb7a959647e3428e6ab
# Parent bb42f0b255a6cbe2128ca0cb6cee7b238d932389
update: specify custom conflict markers for update
Add custom conflict markers 'working copy' and 'destination' for doing hg update
when there are conflicts between your working copy and the destination.
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -483,7 +483,10 @@
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: c3fa test - "added file1 and file2"
+ +<<<<<<< working copy: c3fa test - "added file1 and file2"
+changed file1 different
+=======
changed file1
- +>>>>>>> other: dfab test - "changed file1"
+ +>>>>>>> destination: dfab test - "changed file1"
$ hg status
M file1
More information about the Mercurial-devel
mailing list