Mercurial > hg
comparison hgext/transplant.py @ 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 | b14fdf1fb615 |
children | 5cb8158a61f7 |
comparison
equal
deleted
inserted
replaced
41370:a728ef2f9b15 | 41371:608c15f76f50 |
---|---|
674 if opts.get('continue'): | 674 if opts.get('continue'): |
675 if not tp.canresume(): | 675 if not tp.canresume(): |
676 raise error.Abort(_('no transplant to continue')) | 676 raise error.Abort(_('no transplant to continue')) |
677 else: | 677 else: |
678 cmdutil.checkunfinished(repo) | 678 cmdutil.checkunfinished(repo) |
679 if p2 != revlog.nullid: | 679 cmdutil.bailifchanged(repo) |
680 raise error.Abort(_('outstanding uncommitted merges')) | |
681 m, a, r, d = repo.status()[:4] | |
682 if m or a or r or d: | |
683 raise error.Abort(_('outstanding local changes')) | |
684 | 680 |
685 sourcerepo = opts.get('source') | 681 sourcerepo = opts.get('source') |
686 if sourcerepo: | 682 if sourcerepo: |
687 peer = hg.peer(repo, opts, ui.expandpath(sourcerepo)) | 683 peer = hg.peer(repo, opts, ui.expandpath(sourcerepo)) |
688 heads = pycompat.maplist(peer.lookup, opts.get('branch', ())) | 684 heads = pycompat.maplist(peer.lookup, opts.get('branch', ())) |