Mercurial > hg
changeset 41371:608c15f76f50
transplant: use bailifchanged() instead of reimplementing it
Differential Revision: https://phab.mercurial-scm.org/D5691
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 24 Jan 2019 16:16:10 -0800 |
parents | a728ef2f9b15 |
children | 390ef056081b |
files | hgext/transplant.py tests/test-transplant.t |
diffstat | 2 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/transplant.py Thu Jan 24 12:47:54 2019 -0800 +++ b/hgext/transplant.py Thu Jan 24 16:16:10 2019 -0800 @@ -676,11 +676,7 @@ raise error.Abort(_('no transplant to continue')) else: cmdutil.checkunfinished(repo) - if p2 != revlog.nullid: - raise error.Abort(_('outstanding uncommitted merges')) - m, a, r, d = repo.status()[:4] - if m or a or r or d: - raise error.Abort(_('outstanding local changes')) + cmdutil.bailifchanged(repo) sourcerepo = opts.get('source') if sourcerepo:
--- a/tests/test-transplant.t Thu Jan 24 12:47:54 2019 -0800 +++ b/tests/test-transplant.t Thu Jan 24 16:16:10 2019 -0800 @@ -39,12 +39,12 @@ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ hg transplant 1 - abort: outstanding uncommitted merges + abort: outstanding uncommitted merge [255] $ hg up -qC tip $ echo b0 > b1 $ hg transplant 1 - abort: outstanding local changes + abort: uncommitted changes [255] $ hg up -qC tip $ echo b2 > b2