Show More
@@ -830,8 +830,7 b' class base(histeditaction):' | |||
|
830 | 830 | |
|
831 | 831 | def run(self): |
|
832 | 832 | if self.repo['.'].node() != self.node: |
|
833 | mergemod.update(self.repo, self.node, False, True) | |
|
834 | # branchmerge, force) | |
|
833 | mergemod.update(self.repo, self.node, branchmerge=False, force=True) | |
|
835 | 834 | return self.continueclean() |
|
836 | 835 | |
|
837 | 836 | def continuedirty(self): |
@@ -1188,7 +1188,7 b' def rebasenode(repo, rev, p1, base, coll' | |||
|
1188 | 1188 | else: |
|
1189 | 1189 | if repo['.'].rev() != p1: |
|
1190 | 1190 | repo.ui.debug(" update to %d:%s\n" % (p1, repo[p1])) |
|
1191 | mergemod.update(repo, p1, False, True) | |
|
1191 | mergemod.update(repo, p1, branchmerge=False, force=True) | |
|
1192 | 1192 | else: |
|
1193 | 1193 | repo.ui.debug(" already in destination\n") |
|
1194 | 1194 | # This is, alas, necessary to invalidate workingctx's manifest cache, |
@@ -1200,7 +1200,8 b' def rebasenode(repo, rev, p1, base, coll' | |||
|
1200 | 1200 | repo.ui.debug(" detach base %d:%s\n" % (base, repo[base])) |
|
1201 | 1201 | # When collapsing in-place, the parent is the common ancestor, we |
|
1202 | 1202 | # have to allow merging with it. |
|
1203 |
stats = mergemod.update(repo, rev, True, True, |
|
|
1203 | stats = mergemod.update(repo, rev, branchmerge=True, force=True, | |
|
1204 | ancestor=base, mergeancestor=collapse, | |
|
1204 | 1205 | labels=['dest', 'source'], wc=wctx) |
|
1205 | 1206 | if collapse: |
|
1206 | 1207 | copies.duplicatecopies(repo, wctx, rev, dest) |
@@ -1643,7 +1644,7 b' def abort(repo, originalwd, destmap, sta' | |||
|
1643 | 1644 | |
|
1644 | 1645 | # Update away from the rebase if necessary |
|
1645 | 1646 | if shouldupdate or needupdate(repo, state): |
|
1646 | mergemod.update(repo, originalwd, False, True) | |
|
1647 | mergemod.update(repo, originalwd, branchmerge=False, force=True) | |
|
1647 | 1648 | |
|
1648 | 1649 | # Strip from the first rebased revision |
|
1649 | 1650 | if rebased: |
@@ -656,7 +656,7 b' def unshelveabort(ui, repo, state, opts)' | |||
|
656 | 656 | try: |
|
657 | 657 | checkparents(repo, state) |
|
658 | 658 | |
|
659 | merge.update(repo, state.pendingctx, False, True) | |
|
659 | merge.update(repo, state.pendingctx, branchmerge=False, force=True) | |
|
660 | 660 | if (state.activebookmark |
|
661 | 661 | and state.activebookmark in repo._bookmarks): |
|
662 | 662 | bookmarks.activate(repo, state.activebookmark) |
@@ -184,7 +184,8 b' class transplanter(object):' | |||
|
184 | 184 | if pulls: |
|
185 | 185 | if source != repo: |
|
186 | 186 | exchange.pull(repo, source.peer(), heads=pulls) |
|
187 |
merge.update(repo, pulls[-1], False, |
|
|
187 | merge.update(repo, pulls[-1], branchmerge=False, | |
|
188 | force=False) | |
|
188 | 189 | p1, p2 = repo.dirstate.parents() |
|
189 | 190 | pulls = [] |
|
190 | 191 | |
@@ -249,7 +250,7 b' class transplanter(object):' | |||
|
249 | 250 | tr.close() |
|
250 | 251 | if pulls: |
|
251 | 252 | exchange.pull(repo, source.peer(), heads=pulls) |
|
252 | merge.update(repo, pulls[-1], False, False) | |
|
253 | merge.update(repo, pulls[-1], branchmerge=False, force=False) | |
|
253 | 254 | finally: |
|
254 | 255 | self.saveseries(revmap, merges) |
|
255 | 256 | self.transplants.write() |
@@ -365,8 +365,8 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||
|
365 | 365 | if backups: |
|
366 | 366 | # Equivalent to hg.revert |
|
367 | 367 | m = scmutil.matchfiles(repo, backups.keys()) |
|
368 | mergemod.update(repo, repo.dirstate.p1(), | |
|
369 |
|
|
|
368 | mergemod.update(repo, repo.dirstate.p1(), branchmerge=False, | |
|
369 | force=True, matcher=m) | |
|
370 | 370 | |
|
371 | 371 | # 3b. (apply) |
|
372 | 372 | if dopatch: |
@@ -643,7 +643,9 b' def _dobackout(ui, repo, node=None, rev=' | |||
|
643 | 643 | with dirstateguard.dirstateguard(repo, 'backout'): |
|
644 | 644 | overrides = {('ui', 'forcemerge'): opts.get('tool', '')} |
|
645 | 645 | with ui.configoverride(overrides, 'backout'): |
|
646 |
stats = mergemod.update(repo, parent, True, |
|
|
646 | stats = mergemod.update(repo, parent, branchmerge=True, | |
|
647 | force=True, ancestor=node, | |
|
648 | mergeancestor=False) | |
|
647 | 649 | repo.setparents(op1, op2) |
|
648 | 650 | hg._showstats(repo, stats) |
|
649 | 651 | if stats.unresolvedcount: |
@@ -846,7 +846,7 b' def updaterepo(repo, node, overwrite, up' | |||
|
846 | 846 | When overwrite is set, changes are clobbered, merged else |
|
847 | 847 | |
|
848 | 848 | returns stats (see pydoc mercurial.merge.applyupdates)""" |
|
849 | return mergemod.update(repo, node, False, overwrite, | |
|
849 | return mergemod.update(repo, node, branchmerge=False, force=overwrite, | |
|
850 | 850 | labels=['working copy', 'destination'], |
|
851 | 851 | updatecheck=updatecheck) |
|
852 | 852 | |
@@ -949,8 +949,8 b' def merge(repo, node, force=None, remind' | |||
|
949 | 949 | """Branch merge with node, resolving changes. Return true if any |
|
950 | 950 | unresolved conflicts.""" |
|
951 | 951 | if not abort: |
|
952 |
stats = mergemod.update(repo, node, True, force |
|
|
953 | labels=labels) | |
|
952 | stats = mergemod.update(repo, node, branchmerge=True, force=force, | |
|
953 | mergeforce=mergeforce, labels=labels) | |
|
954 | 954 | else: |
|
955 | 955 | ms = mergemod.mergestate.read(repo) |
|
956 | 956 | if ms.active(): |
@@ -22,10 +22,10 b' def addcommit(name, time):' | |||
|
22 | 22 | commit(name, time) |
|
23 | 23 | |
|
24 | 24 | def update(rev): |
|
25 | merge.update(repo, rev, False, True) | |
|
25 | merge.update(repo, rev, branchmerge=False, force=True) | |
|
26 | 26 | |
|
27 | 27 | def merge_(rev): |
|
28 | merge.update(repo, rev, True, False) | |
|
28 | merge.update(repo, rev, branchmerge=True, force=False) | |
|
29 | 29 | |
|
30 | 30 | if __name__ == '__main__': |
|
31 | 31 | addcommit(b"A", 0) |
General Comments 0
You need to be logged in to leave comments.
Login now