annotate tests/test-split.t @ 2576:bfc563aaac2a

effectflag: activate effect flag on test-split.t test file Prepare activation of effect flag by default by activating it on test-split.t test file first.
author Boris Feld <boris.feld@octobus.net>
date Sun, 04 Jun 2017 20:43:22 +0200
parents 9f42f819267b
children cbc7a69116bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
1 test of the split command
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
2 -----------------------
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
3
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
4 $ cat >> $HGRCPATH <<EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
5 > [defaults]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
6 > amend=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
7 > fold=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
8 > split=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
9 > amend=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
10 > [web]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
11 > push_ssl = false
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
12 > allow_push = *
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
13 > [phases]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
14 > publish = False
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
15 > [diff]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
16 > git = 1
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
17 > unified = 0
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
18 > [ui]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
19 > interactive = true
2576
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
20 > [experimental]
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
21 > evolution.effect-flags = yes
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
22 > [extensions]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
23 > hgext.graphlog=
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
24 > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1738
diff changeset
25 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
26 $ mkcommit() {
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
27 > echo "$1" > "$1"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
28 > hg add "$1"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
29 > hg ci -m "add $1"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
30 > }
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
31
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
32
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
33 Basic case, split a head
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
34 $ hg init testsplit
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
35 $ cd testsplit
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
36 $ mkcommit _a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
37 $ mkcommit _b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
38 $ mkcommit _c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
39 $ mkcommit _d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
40 $ echo "change to a" >> _a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
41 $ hg amend
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
42 $ hg debugobsolete
2576
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
43 9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
44 f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'ef1': '*', 'user': 'test'} (glob)
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
45
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
46 To create commits with the number of split
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
47 $ echo 0 > num
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
48 $ cat > editor.sh << '__EOF__'
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
49 > NUM=$(cat num)
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
50 > NUM=`expr "$NUM" + 1`
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
51 > echo "$NUM" > num
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
52 > echo "split$NUM" > "$1"
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
53 > __EOF__
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
54 $ export HGEDITOR="\"sh\" \"editor.sh\""
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
55 $ hg split << EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
56 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
57 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
58 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
59 > n
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
60 > N
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
61 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
62 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
63 > EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
64 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
65 reverting _a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
66 adding _d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
67 diff --git a/_a b/_a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
68 1 hunks, 1 lines changed
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
69 examine changes to '_a'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
70
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
71 @@ -1,0 +2,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
72 +change to a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
73 record change 1/2 to '_a'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
74
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
75 diff --git a/_d b/_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
76 new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
77 examine changes to '_d'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
78
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
79 @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
80 +_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
81 record change 2/2 to '_d'? [Ynesfdaq?] n
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
82
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
83 created new head
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
84 Done splitting? [yN] N
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
85 diff --git a/_d b/_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
86 new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
87 examine changes to '_d'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
88
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
89 @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
90 +_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
91 record this change to '_d'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
92
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
93 no more change to split
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
94
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
95 $ hg debugobsolete
2576
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
96 9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
97 f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
98 aa8f656bb307022172d2648be6fb65322f801225 a98b35e86cae589b61892127c5ec1c868e41d910 5410a2352fa3114883327beee89e3085eefac25c 0 (*) {'ef1': '*', 'user': 'test'} (glob)
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
99 $ hg glog
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
100 @ changeset: 7:5410a2352fa3
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
101 | tag: tip
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
102 | user: test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
103 | date: Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
104 | summary: split2
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
105 |
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
106 o changeset: 6:a98b35e86cae
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
107 | parent: 2:102002290587
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
108 | user: test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
109 | date: Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
110 | summary: split1
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
111 |
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
112 o changeset: 2:102002290587
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
113 | user: test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
114 | date: Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
115 | summary: add _c
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
116 |
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
117 o changeset: 1:37445b16603b
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
118 | user: test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
119 | date: Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
120 | summary: add _b
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
121 |
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
122 o changeset: 0:135f39f4bd78
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
123 user: test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
124 date: Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
125 summary: add _a
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
126
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
127
1672
1b2efccfa4f3 Spelling: committed
timeless@gmail.com
parents: 1641
diff changeset
128 Cannot split a commit with uncommitted changes
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
129 $ hg up "desc(_c)"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
130 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
131 $ echo "_cd" > _c
2576
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
132 $ hg split
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
133 abort: uncommitted changes
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
134 [255]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
135
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
136 Split a revision specified with -r
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
137 $ hg up "desc(_c)" -C
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
138 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
139 $ echo "change to b" >> _b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
140 $ hg amend -m "_cprim"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
141 2 new unstable changesets
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
142 $ hg evolve --all
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
143 move:[6] split1
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
144 atop:[9] _cprim
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
145 move:[7] split2
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
146 atop:[10] split1
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
147 working directory is now at * (glob)
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
148 $ hg log -r "desc(_cprim)" -v -p
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
149 changeset: 9:719157b217ac
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
150 parent: 1:37445b16603b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
151 user: test
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
152 date: Thu Jan 01 00:00:00 1970 +0000
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
153 files: _b _c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
154 description:
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
155 _cprim
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
156
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
157
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
158 diff --git a/_b b/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
159 --- a/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
160 +++ b/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
161 @@ -1,0 +2,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
162 +change to b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
163 diff --git a/_c b/_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
164 new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
165 --- /dev/null
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
166 +++ b/_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
167 @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
168 +_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
169
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
170 $ hg split -r "desc(_cprim)" <<EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
171 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
172 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
173 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
174 > n
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
175 > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
176 > EOF
1484
e3484e9632cd split: don't update before it is actually needed
Laurent Charignon <lcharignon@fb.com>
parents: 1483
diff changeset
177 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
178 reverting _b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
179 adding _c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
180 diff --git a/_b b/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
181 1 hunks, 1 lines changed
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
182 examine changes to '_b'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
183
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
184 @@ -1,0 +2,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
185 +change to b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
186 record change 1/2 to '_b'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
187
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
188 diff --git a/_c b/_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
189 new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
190 examine changes to '_c'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
191
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
192 @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
193 +_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
194 record change 2/2 to '_c'? [Ynesfdaq?] n
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
195
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
196 created new head
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
197 Done splitting? [yN] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
198
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
199 Stop before splitting the commit completely creates a commit with all the
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
200 remaining changes
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
201
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
202 $ hg debugobsolete
2576
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
203 9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
204 f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
205 aa8f656bb307022172d2648be6fb65322f801225 a98b35e86cae589b61892127c5ec1c868e41d910 5410a2352fa3114883327beee89e3085eefac25c 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
206 10200229058723ce8d67f6612c1f6b4f73b1fe73 719157b217acc43d397369a448824ed4c7a302f2 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
207 5d0c8b0f2d3e5e1ff95f93d7da2ba06650605ab5 0 {10200229058723ce8d67f6612c1f6b4f73b1fe73} (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
208 a98b35e86cae589b61892127c5ec1c868e41d910 286887947725085e03455d79649197feaef1eb9d 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
209 5410a2352fa3114883327beee89e3085eefac25c 0b67cee46a7f2ad664f994027e7af95b36ae25fe 0 (*) {'ef1': '*', 'user': 'test'} (glob)
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
210 719157b217acc43d397369a448824ed4c7a302f2 ced8fbcce3a7cd33f0e454d2cd63882ce1b6006b 73309fb98db840ba4ec5ad528346dc6ee0b39dcb 0 (*) {'ef1': '*', 'user': 'test'} (glob)
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
211 $ hg evolve --all
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
212 move:[10] split1
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
213 atop:[13] split4
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
214 move:[11] split2
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
215 atop:[14] split1
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
216 working directory is now at f200e612ac86
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
217 $ hg glog
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
218 @ changeset: 15:f200e612ac86
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
219 | tag: tip
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
220 | user: test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
221 | date: Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
222 | summary: split2
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
223 |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
224 o changeset: 14:aec57822a8ff
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
225 | user: test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
226 | date: Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
227 | summary: split1
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
228 |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
229 o changeset: 13:73309fb98db8
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
230 | user: test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
231 | date: Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
232 | summary: split4
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
233 |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
234 o changeset: 12:ced8fbcce3a7
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
235 | parent: 1:37445b16603b
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
236 | user: test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
237 | date: Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
238 | summary: split3
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
239 |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
240 o changeset: 1:37445b16603b
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
241 | user: test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
242 | date: Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
243 | summary: add _b
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
244 |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
245 o changeset: 0:135f39f4bd78
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
246 user: test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
247 date: Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
248 summary: add _a
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
249
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
250
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
251 Split should move bookmarks on the last split successor and preserve the
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
252 active bookmark as active
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
253 $ hg book bookA
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
254 $ hg book bookB
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
255 $ echo "changetofilea" > _a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
256 $ hg amend
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
257 $ hg book
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
258 bookA 17:39d16b69c75d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
259 * bookB 17:39d16b69c75d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
260 $ hg glog -r "14::"
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
261 @ changeset: 17:39d16b69c75d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
262 | bookmark: bookA
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
263 | bookmark: bookB
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
264 | tag: tip
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
265 | parent: 14:aec57822a8ff
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
266 | user: test
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
267 | date: Thu Jan 01 00:00:00 1970 +0000
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
268 | summary: split2
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
269 |
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
270 o changeset: 14:aec57822a8ff
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
271 | user: test
1641
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
272 ~ date: Thu Jan 01 00:00:00 1970 +0000
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
273 summary: split1
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
274
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
275 $ hg split <<EOF
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
276 > y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
277 > y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
278 > n
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
279 > y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
280 > EOF
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
281 (leaving bookmark bookB)
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
282 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
283 reverting _a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
284 adding _d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
285 diff --git a/_a b/_a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
286 1 hunks, 2 lines changed
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
287 examine changes to '_a'? [Ynesfdaq?] y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
288
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
289 @@ -1,2 +1,1 @@
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
290 -_a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
291 -change to a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
292 +changetofilea
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
293 record change 1/2 to '_a'? [Ynesfdaq?] y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
294
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
295 diff --git a/_d b/_d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
296 new file mode 100644
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
297 examine changes to '_d'? [Ynesfdaq?] n
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
298
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
299 created new head
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
300 Done splitting? [yN] y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
301 $ hg glog -r "14::"
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
302 @ changeset: 19:a2b5c9d9b362
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
303 | bookmark: bookA
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
304 | bookmark: bookB
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
305 | tag: tip
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
306 | user: test
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
307 | date: Thu Jan 01 00:00:00 1970 +0000
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
308 | summary: split6
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
309 |
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
310 o changeset: 18:bf3402785e72
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
311 | parent: 14:aec57822a8ff
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
312 | user: test
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
313 | date: Thu Jan 01 00:00:00 1970 +0000
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
314 | summary: split5
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
315 |
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
316 o changeset: 14:aec57822a8ff
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
317 | user: test
1641
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
318 ~ date: Thu Jan 01 00:00:00 1970 +0000
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
319 summary: split1
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
320
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
321 $ hg book
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
322 bookA 19:a2b5c9d9b362
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
323 * bookB 19:a2b5c9d9b362
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
324
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
325 Lastest revision is selected if multiple are given to -r
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
326 $ hg split -r "desc(_a)::"
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
327 (leaving bookmark bookB)
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
328 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
329 adding _d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
330 diff --git a/_d b/_d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
331 new file mode 100644
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
332 examine changes to '_d'? [Ynesfdaq?] abort: response expected
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
333 [255]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
334
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
335 Cannot split a commit that is not a head if instability is not allowed
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
336 $ cat >> $HGRCPATH <<EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
337 > [experimental]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
338 > evolution=createmarkers
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
339 > evolutioncommands=split
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
340 > EOF
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
341 $ hg split -r "desc(split3)"
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
342 abort: cannot split commit: ced8fbcce3a7 not a head
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
343 [255]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
344
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
345 Changing evolution level to createmarkers
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
346 $ echo "[experimental]" >> $HGRCPATH
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
347 $ echo "evolution=createmarkers" >> $HGRCPATH
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
348
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
349 Running split without any revision operates on the parent of the working copy
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
350 $ hg split << EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
351 > q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
352 > EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
353 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
354 adding _d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
355 diff --git a/_d b/_d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
356 new file mode 100644
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
357 examine changes to '_d'? [Ynesfdaq?] q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
358
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
359 abort: user quit
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
360 [255]
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
361
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
362 Running split with tip revision, specified as unnamed argument
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
363 $ hg split . << EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
364 > q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
365 > EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
366 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
367 adding _d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
368 diff --git a/_d b/_d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
369 new file mode 100644
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
370 examine changes to '_d'? [Ynesfdaq?] q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
371
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
372 abort: user quit
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
373 [255]
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
374
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
375 Running split with both unnamed and named revision arguments shows an error msg
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
376 $ hg split . --rev .^ << EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
377 > q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
378 > EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
379 abort: more than one revset is given
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
380 (use either `hg split <rs>` or `hg split --rev <rs>`, not both)
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
381 [255]
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
382
1738
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
383 Split empty commit (issue5191)
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
384 $ hg branch new-branch
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
385 marked working directory as branch new-branch
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
386 (branches are permanent and global, did you want a bookmark?)
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
387 $ hg commit -m "empty"
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
388 $ hg split
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
389 0 files updated, 0 files merged, 0 files removed, 0 files unresolved