manifestmerge: pass in branchmerge and force separately
This will be used in an upcoming patch.
--- a/hgext/largefiles/overrides.py Sat Feb 09 15:43:02 2013 +0000
+++ b/hgext/largefiles/overrides.py Fri Feb 08 15:23:23 2013 +0000
@@ -360,8 +360,10 @@
# Finally, the merge.applyupdates function will then take care of
# writing the files into the working copy and lfcommands.updatelfiles
# will update the largefiles.
-def overridemanifestmerge(origfn, repo, p1, p2, pa, overwrite, partial):
- actions = origfn(repo, p1, p2, pa, overwrite, partial)
+def overridemanifestmerge(origfn, repo, p1, p2, pa, branchmerge, force,
+ partial):
+ overwrite = force and not branchmerge
+ actions = origfn(repo, p1, p2, pa, branchmerge, force, partial)
processed = []
for action in actions:
--- a/mercurial/merge.py Sat Feb 09 15:43:02 2013 +0000
+++ b/mercurial/merge.py Fri Feb 08 15:23:23 2013 +0000
@@ -185,14 +185,15 @@
return actions
-def manifestmerge(repo, p1, p2, pa, overwrite, partial):
+def manifestmerge(repo, p1, p2, pa, branchmerge, force, partial):
"""
Merge p1 and p2 with ancestor pa and generate merge action list
- overwrite = whether we clobber working files
+ branchmerge and force are as passed in to update
partial = function to filter file lists
"""
+ overwrite = force and not branchmerge
actions, copy, movewithdir = [], {}, {}
if overwrite:
@@ -208,8 +209,8 @@
actions.append((of, "rd", (fl,), "rename and delete"))
repo.ui.note(_("resolving manifests\n"))
- repo.ui.debug(" overwrite: %s, partial: %s\n"
- % (bool(overwrite), bool(partial)))
+ repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n"
+ % (bool(branchmerge), bool(force), bool(partial)))
repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, p1, p2))
m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest()
@@ -452,7 +453,7 @@
actions += _forgetremoved(tctx, mctx, branchmerge)
actions += manifestmerge(repo, tctx, mctx,
ancestor,
- force and not branchmerge,
+ branchmerge, force,
partial)
return actions
--- a/tests/test-copy-move-merge.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-copy-move-merge.t Fri Feb 08 15:23:23 2013 +0000
@@ -29,7 +29,7 @@
src: 'a' -> dst: 'c' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6
a: remote moved to b -> m
preserving a for resolve of b
--- a/tests/test-double-merge.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-double-merge.t Fri Feb 08 15:23:23 2013 +0000
@@ -33,7 +33,7 @@
src: 'foo' -> dst: 'bar' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104
foo: remote copied to bar -> m
preserving foo for resolve of bar
--- a/tests/test-graft.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-graft.t Fri Feb 08 15:23:23 2013 +0000
@@ -134,7 +134,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: True, partial: False
ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6
b: local copied/moved to a -> m
preserving b for resolve of b
@@ -147,7 +147,7 @@
grafting revision 5
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: True, partial: False
ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746
e: remote is newer -> g
updating: e 1/1 files (100.00%)
@@ -156,7 +156,7 @@
grafting revision 4
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: True, partial: False
ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d
d: remote is newer -> g
e: versions differ -> m
--- a/tests/test-issue1802.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-issue1802.t Fri Feb 08 15:23:23 2013 +0000
@@ -55,7 +55,7 @@
unmatched files in local:
b
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: a03b0deabf2b, local: d6fa54f68ae1+, remote: 2d8bcf2dda39
a: update permissions -> e
updating: a 1/1 files (100.00%)
--- a/tests/test-issue522.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-issue522.t Fri Feb 08 15:23:23 2013 +0000
@@ -29,7 +29,7 @@
unmatched files in local:
bar
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: bbd179dfa0a7, local: 71766447bdbb+, remote: 4d9e78aaceee
foo: remote is newer -> g
updating: foo 1/1 files (100.00%)
--- a/tests/test-issue672.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-issue672.t Fri Feb 08 15:23:23 2013 +0000
@@ -32,7 +32,7 @@
src: '1' -> dst: '1a'
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a
1: other deleted -> r
1a: remote created -> g
@@ -63,7 +63,7 @@
src: '1' -> dst: '1a' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96
1a: local copied/moved to 1 -> m
preserving 1a for resolve of 1a
@@ -86,7 +86,7 @@
src: '1' -> dst: '1a' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8
1: remote moved to 1a -> m
preserving 1 for resolve of 1a
--- a/tests/test-largefiles.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-largefiles.t Fri Feb 08 15:23:23 2013 +0000
@@ -1676,7 +1676,7 @@
$ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
$ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache
resolving manifests
- overwrite: False, partial: False
+ branchmerge: False, force: False, partial: False
ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
.hglf/f1: remote created -> g
updating: .hglf/f1 1/1 files (100.00%)
--- a/tests/test-merge-commit.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-merge-commit.t Fri Feb 08 15:23:23 2013 +0000
@@ -69,7 +69,7 @@
$ hg --debug merge 3
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28
bar: versions differ -> m
preserving bar for resolve of bar
@@ -156,7 +156,7 @@
$ hg --debug merge 3
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0
bar: versions differ -> m
preserving bar for resolve of bar
--- a/tests/test-merge-types.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-merge-types.t Fri Feb 08 15:23:23 2013 +0000
@@ -32,7 +32,7 @@
$ hg merge --debug
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c
a: versions differ -> m
preserving a for resolve of a
@@ -65,7 +65,7 @@
$ hg merge --debug
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f
a: versions differ -> m
preserving a for resolve of a
@@ -99,7 +99,7 @@
$ HGMERGE= hg up -y --debug
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
+ branchmerge: False, force: False, partial: False
ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f
a: versions differ -> m
preserving a for resolve of a
--- a/tests/test-merge7.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-merge7.t Fri Feb 08 15:23:23 2013 +0000
@@ -81,7 +81,7 @@
$ hg merge --debug
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8
test.txt: versions differ -> m
preserving test.txt for resolve of test.txt
--- a/tests/test-rename-dir-merge.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-rename-dir-merge.t Fri Feb 08 15:23:23 2013 +0000
@@ -37,7 +37,7 @@
discovered dir src: 'a/' -> dst: 'b/'
pending file src: 'a/c' -> dst: 'b/c'
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740
a/a: other deleted -> r
a/b: other deleted -> r
@@ -88,7 +88,7 @@
discovered dir src: 'a/' -> dst: 'b/'
pending file src: 'a/c' -> dst: 'b/c'
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb
None: local renamed directory to b/c -> d
updating:None 1/1 files (100.00%)
--- a/tests/test-rename-merge1.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-rename-merge1.t Fri Feb 08 15:23:23 2013 +0000
@@ -34,7 +34,7 @@
src: 'a2' -> dst: 'c2' !
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c
a: remote moved to b -> m
preserving a for resolve of b
@@ -179,7 +179,7 @@
src: 'file' -> dst: 'newfile' %
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0
file: rename and delete -> rd
newfile: remote created -> g
--- a/tests/test-rename-merge2.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-rename-merge2.t Fri Feb 08 15:23:23 2013 +0000
@@ -84,7 +84,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24
a: remote copied to b -> m
preserving a for resolve of b
@@ -119,7 +119,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71
a: remote is newer -> g
b: local copied/moved to a -> m
@@ -157,7 +157,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a
a: remote moved to b -> m
preserving a for resolve of b
@@ -192,7 +192,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71
b: local copied/moved to a -> m
preserving b for resolve of b
@@ -226,7 +226,7 @@
src: 'a' -> dst: 'b'
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24
b: remote created -> g
rev: versions differ -> m
@@ -256,7 +256,7 @@
src: 'a' -> dst: 'b'
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336
rev: versions differ -> m
preserving rev for resolve of rev
@@ -283,7 +283,7 @@
src: 'a' -> dst: 'b'
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a
a: other deleted -> r
b: remote created -> g
@@ -315,7 +315,7 @@
src: 'a' -> dst: 'b'
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336
rev: versions differ -> m
preserving rev for resolve of rev
@@ -336,7 +336,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493
b: versions differ -> m
preserving b for resolve of b
@@ -374,7 +374,7 @@
src: 'a' -> dst: 'c' !
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e
a: divergent renames -> dr
c: remote created -> g
@@ -404,7 +404,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7
b: versions differ -> m
preserving b for resolve of b
@@ -432,7 +432,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
a: other deleted -> r
b: versions differ -> m
@@ -462,7 +462,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
a: remote is newer -> g
b: versions differ -> m
@@ -493,7 +493,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
a: other deleted -> r
b: versions differ -> m
@@ -523,7 +523,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
a: remote is newer -> g
b: versions differ -> m
@@ -554,7 +554,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24
b: versions differ -> m
preserving b for resolve of b
@@ -582,7 +582,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a
remote changed a which local deleted
use (c)hanged version or leave (d)eleted? c
@@ -615,7 +615,7 @@
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a
local changed a which remote deleted
use (c)hanged version or (d)elete? c
@@ -652,7 +652,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493
a: remote moved to b -> m
preserving a for resolve of b
@@ -686,7 +686,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71
b: local copied/moved to a -> m
preserving b for resolve of b
@@ -724,7 +724,7 @@
src: 'a' -> dst: 'b' *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f
b: local copied/moved to a -> m
preserving b for resolve of b
--- a/tests/test-subrepo.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-subrepo.t Fri Feb 08 15:23:23 2013 +0000
@@ -203,7 +203,7 @@
$ hg merge 6 --debug # test change
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
.hgsubstate: versions differ -> m
updating: .hgsubstate 1/1 files (100.00%)
@@ -212,7 +212,7 @@
getting subrepo t
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: False, force: False, partial: False
ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
t: remote is newer -> g
updating: t 1/1 files (100.00%)
@@ -232,7 +232,7 @@
$ HGMERGE=internal:merge hg merge --debug 7 # test conflict
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
.hgsubstate: versions differ -> m
updating: .hgsubstate 1/1 files (100.00%)
@@ -241,7 +241,7 @@
merging subrepo t
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: False, partial: False
ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
t: versions differ -> m
preserving t for resolve of t
--- a/tests/test-up-local-change.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-up-local-change.t Fri Feb 08 15:23:23 2013 +0000
@@ -44,7 +44,7 @@
unmatched files in other:
b
resolving manifests
- overwrite: False, partial: False
+ branchmerge: False, force: False, partial: False
ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
a: versions differ -> m
preserving a for resolve of a
@@ -65,7 +65,7 @@
$ hg --debug up 0
resolving manifests
- overwrite: False, partial: False
+ branchmerge: False, force: False, partial: False
ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a
b: other deleted -> r
a: versions differ -> m
@@ -98,7 +98,7 @@
unmatched files in other:
b
resolving manifests
- overwrite: False, partial: False
+ branchmerge: False, force: False, partial: False
ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
a: versions differ -> m
preserving a for resolve of a
@@ -176,7 +176,7 @@
$ hg --debug merge -f
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
+ branchmerge: True, force: True, partial: False
ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4
a: versions differ -> m
preserving a for resolve of a
--- a/tests/test-update-reverse.t Sat Feb 09 15:43:02 2013 +0000
+++ b/tests/test-update-reverse.t Fri Feb 08 15:23:23 2013 +0000
@@ -66,7 +66,7 @@
$ hg update --debug -C 1
resolving manifests
- overwrite: True, partial: False
+ branchmerge: False, force: True, partial: False
ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf
side1: other deleted -> r
side2: other deleted -> r