Show More
@@ -790,7 +790,8 b' def _dobackout(ui, repo, node=None, rev=' | |||
|
790 | 790 | |
|
791 | 791 | cmdutil.checkunfinished(repo) |
|
792 | 792 | cmdutil.bailifchanged(repo) |
|
793 |
|
|
|
793 | ctx = scmutil.revsingle(repo, rev) | |
|
794 | node = ctx.node() | |
|
794 | 795 | |
|
795 | 796 | op1, op2 = repo.dirstate.parents() |
|
796 | 797 | if not repo.changelog.isancestor(node, op1): |
@@ -821,14 +822,7 b' def _dobackout(ui, repo, node=None, rev=' | |||
|
821 | 822 | with dirstateguard.dirstateguard(repo, b'backout'): |
|
822 | 823 | overrides = {(b'ui', b'forcemerge'): opts.get(b'tool', b'')} |
|
823 | 824 | with ui.configoverride(overrides, b'backout'): |
|
824 |
stats = mergemod. |
|
|
825 | repo, | |
|
826 | parent, | |
|
827 | branchmerge=True, | |
|
828 | force=True, | |
|
829 | ancestor=node, | |
|
830 | mergeancestor=False, | |
|
831 | ) | |
|
825 | stats = mergemod.back_out(ctx, parent=repo[parent]) | |
|
832 | 826 | repo.setparents(op1, op2) |
|
833 | 827 | hg._showstats(repo, stats) |
|
834 | 828 | if stats.unresolvedcount: |
@@ -2159,6 +2159,23 b' def graft(' | |||
|
2159 | 2159 | return stats |
|
2160 | 2160 | |
|
2161 | 2161 | |
|
2162 | def back_out(ctx, parent=None, wc=None): | |
|
2163 | if parent is None: | |
|
2164 | if ctx.p2() is not None: | |
|
2165 | raise error.ProgrammingError( | |
|
2166 | b"must specify parent of merge commit to back out" | |
|
2167 | ) | |
|
2168 | parent = ctx.p1() | |
|
2169 | return update( | |
|
2170 | ctx.repo(), | |
|
2171 | parent, | |
|
2172 | branchmerge=True, | |
|
2173 | force=True, | |
|
2174 | ancestor=ctx.node(), | |
|
2175 | mergeancestor=False, | |
|
2176 | ) | |
|
2177 | ||
|
2178 | ||
|
2162 | 2179 | def purge( |
|
2163 | 2180 | repo, |
|
2164 | 2181 | matcher, |
General Comments 0
You need to be logged in to leave comments.
Login now