[PATCH 2 of 2 evolve-ext v2] evolve: adding test case for calling split without -r argument
Kostia Balytskyi
ikostia at fb.com
Mon Feb 1 10:26:26 UTC 2016
# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1454322132 28800
# Mon Feb 01 02:22:12 2016 -0800
# Node ID e56278f5ad8a074c888cc734a137120b17219241
# Parent 8cf256f9050bca9c6ff190bf732e9ce687818d5f
evolve: adding test case for calling split without -r argument
Currently, if one runs `hg split .` or `hg split`, it will fail
with an exception. This happens becuase we only expect revision
args to be passed as --rev/-r ones and don't treat unnamed args
properly or add default values if no args are provided.
This test covets the described case.
diff --git a/tests/test-split.t b/tests/test-split.t
--- a/tests/test-split.t
+++ b/tests/test-split.t
@@ -335,4 +335,34 @@
abort: cannot split commit: ced8fbcce3a7 not a head
[255]
+Changing evolution level to createmarkers
+ $ echo "[experimental]" >> $HGRCPATH
+ $ echo "evolution=createmarkers" >> $HGRCPATH
+Running split without any revision operates on the parent of the working copy
+ $ hg split << EOF
+ > q
+ > EOF
+ (leaving bookmark bookB)
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ adding _d
+ diff --git a/_d b/_d
+ new file mode 100644
+ examine changes to '_d'? [Ynesfdaq?] q
+
+ abort: user quit
+ [255]
+
+Running split with tip revision, specified as unnamed argument
+ $ hg split . << EOF
+ > q
+ > EOF
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ adding _d
+ diff --git a/_d b/_d
+ new file mode 100644
+ examine changes to '_d'? [Ynesfdaq?] q
+
+ abort: user quit
+ [255]
+
More information about the Mercurial-devel
mailing list