Mercurial > hg-stable
changeset 19253:e078ea9b4ce4 stable
graft: refuse to commit an interrupted graft (issue3667)
author | Simon King <simon@simonking.org.uk> |
---|---|
date | Thu, 30 May 2013 22:32:10 +0100 |
parents | 39ea540dc154 |
children | cceaf7af4c9e |
files | mercurial/commands.py tests/test-graft.t |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Thu May 23 17:53:19 2013 -0500 +++ b/mercurial/commands.py Thu May 30 22:32:10 2013 +0100 @@ -1315,6 +1315,10 @@ # Let --subrepos on the command line override config setting. ui.setconfig('ui', 'commitsubrepos', True) + if repo.vfs.exists('graftstate'): + raise util.Abort(_('cannot commit an interrupted graft operation'), + hint=_('use "hg graft -c" to continue graft')) + extra = {} if opts.get('close_branch'): extra['close'] = 1
--- a/tests/test-graft.t Thu May 23 17:53:19 2013 -0500 +++ b/tests/test-graft.t Thu May 30 22:32:10 2013 +0100 @@ -174,6 +174,13 @@ (use hg resolve and hg graft --continue) [255] +Commit while interrupted should fail: + + $ hg ci -m 'commit interrupted graft' + abort: cannot commit an interrupted graft operation + (use "hg graft -c" to continue graft) + [255] + Continue without resolve should fail: $ hg graft -c