Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 30961:330fbd515512
destutil: remove duplicate check and leave it to merge.update()
The check is done in merge.update() already and the next few patches
will add more checks there. Some of the additional checks will need
information about the merge that will not be available in destutil.
Since commands.postincoming() catches UpdateAbort(), we need to change
merge.update() to raise that more specific exception.
This goes directly again 45b86dbabbda (destupdate: move the check
related to the "clean" logic in the function, 2015-10-05), but it will
simplify the next few patches, and we can always move it out again
(preferably move, not copy) after if we still think it's better that
way.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 09 Feb 2017 09:52:32 -0800 |
parents | dd995a5db8fd |
children | 58f55f0b40dc |
comparison
equal
deleted
inserted
replaced
30960:e4492d55fb66 | 30961:330fbd515512 |
---|---|
1560 if repo[node].node() in foreground: | 1560 if repo[node].node() in foreground: |
1561 pass # allow updating to successors | 1561 pass # allow updating to successors |
1562 else: | 1562 else: |
1563 msg = _("uncommitted changes") | 1563 msg = _("uncommitted changes") |
1564 hint = _("commit or update --clean to discard changes") | 1564 hint = _("commit or update --clean to discard changes") |
1565 raise error.Abort(msg, hint=hint) | 1565 raise error.UpdateAbort(msg, hint=hint) |
1566 else: | 1566 else: |
1567 # Allow jumping branches if clean and specific rev given | 1567 # Allow jumping branches if clean and specific rev given |
1568 pass | 1568 pass |
1569 | 1569 |
1570 if overwrite: | 1570 if overwrite: |