Mercurial > hg
comparison mercurial/hg.py @ 44270:f546d2170b0f
merge: introduce a clean_update() for that use-case
I find it hard to understand what value to pass for all the arguments
to `merge.update()`. I would like to introduce functions that are more
specific to each use-case. We already have `graft()`. This patch
introduces a `clean_update()` and uses it in some places to show that
it works.
Differential Revision: https://phab.mercurial-scm.org/D7902
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 15 Jan 2020 15:30:25 -0800 |
parents | bd4f666b55a7 |
children | 3245cdea2c63 |
comparison
equal
deleted
inserted
replaced
44269:48a1a974a92c | 44270:f546d2170b0f |
---|---|
1171 else: | 1171 else: |
1172 # there were no conficts, mergestate was not stored | 1172 # there were no conficts, mergestate was not stored |
1173 node = repo[b'.'].hex() | 1173 node = repo[b'.'].hex() |
1174 | 1174 |
1175 repo.ui.status(_(b"aborting the merge, updating back to %s\n") % node[:12]) | 1175 repo.ui.status(_(b"aborting the merge, updating back to %s\n") % node[:12]) |
1176 stats = mergemod.update(repo, node, branchmerge=False, force=True) | 1176 stats = mergemod.clean_update(repo[node]) |
1177 assert stats.unresolvedcount == 0 | 1177 assert stats.unresolvedcount == 0 |
1178 _showstats(repo, stats) | 1178 _showstats(repo, stats) |
1179 | 1179 |
1180 | 1180 |
1181 def _incoming( | 1181 def _incoming( |