D3986: split: abort if there's an unfinished operation
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Jul 30 21:45:17 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3986
AFFECTED FILES
hgext/split.py
tests/test-split.t
CHANGE DETAILS
diff --git a/tests/test-split.t b/tests/test-split.t
--- a/tests/test-split.t
+++ b/tests/test-split.t
@@ -91,6 +91,15 @@
$ hg forget dirty
$ rm dirty
+Cannot split while there's an unfinished operation
+
+ $ touch .hg/graftstate
+ $ hg split .
+ abort: graft in progress
+ (use 'hg graft --continue' or 'hg graft --stop' to stop)
+ [255]
+ $ rm .hg/graftstate
+
Make a clean directory for future tests to build off of
$ cp -R . ../clean
diff --git a/hgext/split.py b/hgext/split.py
--- a/hgext/split.py
+++ b/hgext/split.py
@@ -108,6 +108,7 @@
if len(ctx.parents()) > 1:
raise error.Abort(_('cannot split a merge changeset'))
+ cmdutil.checkunfinished(repo)
cmdutil.bailifchanged(repo)
# Deactivate bookmark temporarily so it won't get moved unintentionally
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list