--- a/tests/test-split.t Wed Jun 24 16:27:36 2015 -0700
+++ b/tests/test-split.t Sat Aug 08 12:12:16 2015 -0700
@@ -42,8 +42,14 @@
f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'user': 'test'} (glob)
To create commits with the number of split
- $ export NUM=0
- $ export HGEDITOR="NUM=$((NUM+1)); echo split$NUM > $1"
+ $ echo 0 > num
+ $ cat > editor.sh << '__EOF__'
+ > NUM=$(cat num)
+ > NUM=`expr "$NUM" + 1`
+ > echo "$NUM" > num
+ > echo "split$NUM" > "$1"
+ > __EOF__
+ $ export HGEDITOR="\"sh\" \"editor.sh\""
$ hg split << EOF
> y
> y
@@ -87,7 +93,35 @@
$ hg debugobsolete
9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'user': 'test'} (glob)
f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'user': 'test'} (glob)
- aa8f656bb307022172d2648be6fb65322f801225 8a76f55839e6badd47ed8338803d8bc16f578d68 1e105584671a463974ee2122f95979ce5e507f1a 0 (*) {'user': 'test'} (glob)
+ aa8f656bb307022172d2648be6fb65322f801225 a98b35e86cae589b61892127c5ec1c868e41d910 5410a2352fa3114883327beee89e3085eefac25c 0 (*) {'user': 'test'} (glob)
+ $ hg glog
+ @ changeset: 7:5410a2352fa3
+ | tag: tip
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: split2
+ |
+ o changeset: 6:a98b35e86cae
+ | parent: 2:102002290587
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: split1
+ |
+ o changeset: 2:102002290587
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: add _c
+ |
+ o changeset: 1:37445b16603b
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: add _b
+ |
+ o changeset: 0:135f39f4bd78
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: add _a
+
Cannot split a commit with uncommited changes
$ hg up "desc(_c)"
@@ -104,10 +138,10 @@
$ hg amend -m "_cprim"
2 new unstable changesets
$ hg evolve --all
- move:[6] split0
+ move:[6] split1
atop:[9] _cprim
- move:[7] split0
- atop:[10] split0
+ move:[7] split2
+ atop:[10] split1
working directory is now at * (glob)
$ hg log -r "desc(_cprim)" -v -p
changeset: 9:719157b217ac
@@ -167,12 +201,12 @@
$ hg debugobsolete
9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'user': 'test'} (glob)
f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'user': 'test'} (glob)
- aa8f656bb307022172d2648be6fb65322f801225 8a76f55839e6badd47ed8338803d8bc16f578d68 1e105584671a463974ee2122f95979ce5e507f1a 0 (*) {'user': 'test'} (glob)
+ aa8f656bb307022172d2648be6fb65322f801225 a98b35e86cae589b61892127c5ec1c868e41d910 5410a2352fa3114883327beee89e3085eefac25c 0 (*) {'user': 'test'} (glob)
10200229058723ce8d67f6612c1f6b4f73b1fe73 719157b217acc43d397369a448824ed4c7a302f2 0 (*) {'user': 'test'} (glob)
5d0c8b0f2d3e5e1ff95f93d7da2ba06650605ab5 0 {10200229058723ce8d67f6612c1f6b4f73b1fe73} (*) {'user': 'test'} (glob)
- 8a76f55839e6badd47ed8338803d8bc16f578d68 0ea1d0d23e674ea8a6affe760741c82bb8e380f7 0 (*) {'user': 'test'} (glob)
- 1e105584671a463974ee2122f95979ce5e507f1a b6099ccb49cae181af7c59ed5603a1dfca632445 0 (*) {'user': 'test'} (glob)
- 719157b217acc43d397369a448824ed4c7a302f2 8eb71353cb2c70fc1154be3af79c0ce98898ae88 ead904640c8543606f72490c6ae10955fb11fff0 0 (*) {'user': 'test'} (glob)
+ a98b35e86cae589b61892127c5ec1c868e41d910 286887947725085e03455d79649197feaef1eb9d 0 (*) {'user': 'test'} (glob)
+ 5410a2352fa3114883327beee89e3085eefac25c 0b67cee46a7f2ad664f994027e7af95b36ae25fe 0 (*) {'user': 'test'} (glob)
+ 719157b217acc43d397369a448824ed4c7a302f2 ced8fbcce3a7cd33f0e454d2cd63882ce1b6006b 73309fb98db840ba4ec5ad528346dc6ee0b39dcb 0 (*) {'user': 'test'} (glob)
Cannot specify multiple revisions with -r
$ hg split -r "desc(_a)::"