annotate tests/test-split.t @ 35471:ea4d27aac557

tests: fix a bug in `f` that prevented calculating sha1sum on a file
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 20 Dec 2017 20:41:12 -0500
parents 02ea370c2baa
children 8d05705bde0a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
1 #testcases obsstore-on obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
3 $ cat > $TESTTMP/editor.py <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
4 > #!$PYTHON
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
5 > import os, sys
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
6 > path = os.path.join(os.environ['TESTTMP'], 'messages')
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
7 > messages = open(path).read().split('--\n')
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
8 > prompt = open(sys.argv[1]).read()
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
9 > sys.stdout.write(''.join('EDITOR: %s' % l for l in prompt.splitlines(True)))
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
10 > sys.stdout.flush()
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
11 > with open(sys.argv[1], 'w') as f:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
12 > f.write(messages[0])
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
13 > with open(path, 'w') as f:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
14 > f.write('--\n'.join(messages[1:]))
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
15 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
16
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
17 $ cat >> $HGRCPATH <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
18 > [extensions]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
19 > drawdag=$TESTDIR/drawdag.py
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
20 > split=
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
21 > [ui]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
22 > interactive=1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
23 > [diff]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
24 > git=1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
25 > unified=0
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
26 > [alias]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
27 > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
28 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
29
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
30 #if obsstore-on
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
31 $ cat >> $HGRCPATH <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
32 > [experimental]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
33 > evolution=all
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
34 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
35 #endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
36
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
37 $ hg init a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
38 $ cd a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
39
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
40 Nothing to split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
41
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
42 $ hg split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
43 nothing to split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
44 [1]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
45
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
46 $ hg commit -m empty --config ui.allowemptycommit=1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
47 $ hg split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
48 abort: cannot split an empty revision
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
49 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
50
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
51 $ rm -rf .hg
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
52 $ hg init
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
53
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
54 Cannot split working directory
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
56 $ hg split -r 'wdir()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
57 abort: cannot split working directory
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
58 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
59
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
60 Generate some content
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
61
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
62 $ $TESTDIR/seq.py 1 5 >> a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
63 $ hg ci -m a1 -A a -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
64 $ hg bookmark -i r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
65 $ sed 's/1/11/;s/3/33/;s/5/55/' a > b
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
66 $ mv b a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
67 $ hg ci -m a2 -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
68 $ hg bookmark -i r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
69
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
70 Cannot split a public changeset
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
71
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
72 $ hg phase --public -r 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
73 $ hg split .
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
74 abort: cannot split public changeset
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
75 (see 'hg help phases' for details)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
76 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
77
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
78 $ hg phase --draft -f -r 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
79
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
80 Cannot split while working directory is dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
81
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
82 $ touch dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
83 $ hg add dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
84 $ hg split .
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
85 abort: uncommitted changes
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
86 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
87 $ hg forget dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
88 $ rm dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
89
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
90 Split a head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
91
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
92 $ cp -R . ../b
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
93 $ cp -R . ../c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
94
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
95 $ hg bookmark r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
96
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
97 $ hg split 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
98 abort: cannot split multiple revisions
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
99 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
100
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
101 $ runsplit() {
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
102 > cat > $TESTTMP/messages <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
103 > split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
104 > --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
105 > split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
106 > --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
107 > split 3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
108 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
109 > cat <<EOF | hg split "$@"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
110 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
111 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
112 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
113 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
114 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
115 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
116 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
117 > }
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
118
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
119 $ HGEDITOR=false runsplit
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
120 diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
121 1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
122 examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
123
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
124 @@ -5,1 +5,1 @@ 4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
125 -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
126 +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
127 record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
128
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
129 transaction abort!
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
130 rollback completed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
131 abort: edit failed: false exited with status 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
132 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
133 $ hg status
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
134
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
135 $ HGEDITOR="$PYTHON $TESTTMP/editor.py"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
136 $ runsplit
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
137 diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
138 1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
139 examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
140
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
141 @@ -5,1 +5,1 @@ 4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
142 -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
143 +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
144 record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
145
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
146 EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
147 EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
148 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
149 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
150 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
151 EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
152 EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
153 EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
154 EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
155 EDITOR: HG: changed a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
156 created new head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
157 diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
158 1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
159 examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
160
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
161 @@ -3,1 +3,1 @@ 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
162 -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
163 +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
164 record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
165
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
166 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
167 EDITOR: HG: - e704349bd21b: split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
168 EDITOR: HG: Write commit message for the next split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
169 EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
170 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
171 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
172 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
173 EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
174 EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
175 EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
176 EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
177 EDITOR: HG: changed a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
178 diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
179 1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
180 examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
181
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
182 @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
183 -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
184 +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
185 record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
186
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
187 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
188 EDITOR: HG: - e704349bd21b: split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
189 EDITOR: HG: - a09ad58faae3: split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
190 EDITOR: HG: Write commit message for the next split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
191 EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
192 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
193 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
194 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
195 EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
196 EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
197 EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
198 EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
199 EDITOR: HG: changed a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
200 saved backup bundle to $TESTTMP/a/.hg/strip-backup/1df0d5c5a3ab-8341b760-split.hg (glob) (obsstore-off !)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
201
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
202 #if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
203 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
204 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
205 r2 3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
206 * r3 3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
207 $ hg glog -p
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
208 @ 3:00eebaf8d2e2 split 3 r2 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
209 | diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
210 | --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
211 | +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
212 | @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
213 | -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
214 | +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
215 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
216 o 2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
217 | diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
218 | --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
219 | +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
220 | @@ -3,1 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
221 | -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
222 | +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
223 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
224 o 1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
225 | diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
226 | --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
227 | +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
228 | @@ -5,1 +5,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
229 | -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
230 | +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
231 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
232 o 0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
233 diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
234 new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
235 --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
236 +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
237 @@ -0,0 +1,5 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
238 +1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
239 +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
240 +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
241 +4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
242 +5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
243
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
244 #else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
245 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
246 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
247 r2 4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
248 * r3 4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
249 $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
250 @ 4:00eebaf8d2e2 split 3 r2 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
251 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
252 o 3:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
253 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
254 o 2:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
255 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
256 o 0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
257
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
258 #endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
259
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
260 Split a head while working parent is not that head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
261
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
262 $ cd $TESTTMP/b
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
263
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
264 $ hg up 0 -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
265 $ hg bookmark r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
266
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
267 $ runsplit tip >/dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
268
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
269 #if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
270 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
271 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
272 r2 3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
273 * r3 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
274 $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
275 o 3:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
276 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
277 o 2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
278 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
279 o 1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
280 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
281 @ 0:a61bcde8c529 a1 r1 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
282
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
283 #else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
284 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
285 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
286 r2 4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
287 * r3 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
288 $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
289 o 4:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
290 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
291 o 3:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
292 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
293 o 2:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
294 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
295 @ 0:a61bcde8c529 a1 r1 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
296
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
297 #endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
298
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
299 Split a non-head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
300
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
301 $ cd $TESTTMP/c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
302 $ echo d > d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
303 $ hg ci -m d1 -A d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
304 $ hg bookmark -i d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
305 $ echo 2 >> d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
306 $ hg ci -m d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
307 $ echo 3 >> d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
308 $ hg ci -m d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
309 $ hg bookmark -i d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
310 $ hg up '.^' -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
311 $ hg bookmark d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
312 $ cp -R . ../d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
313
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
314 $ runsplit -r 1 | grep rebasing
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
315 rebasing 2:b5c5ea414030 "d1" (d1)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
316 rebasing 3:f4a0a8d004cc "d2" (d2)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
317 rebasing 4:777940761eba "d3" (d3)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
318 #if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
319 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
320 d1 4:c4b449ef030e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
321 * d2 5:c9dd00ab36a3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
322 d3 6:19f476bc865c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
323 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
324 r2 3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
325 $ hg glog -p
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
326 o 6:19f476bc865c d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
327 | diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
328 | --- a/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
329 | +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
330 | @@ -2,0 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
331 | +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
332 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
333 @ 5:c9dd00ab36a3 d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
334 | diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
335 | --- a/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
336 | +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
337 | @@ -1,0 +2,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
338 | +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
339 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
340 o 4:c4b449ef030e d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
341 | diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
342 | new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
343 | --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
344 | +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
345 | @@ -0,0 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
346 | +d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
347 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
348 o 3:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
349 | diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
350 | --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
351 | +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
352 | @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
353 | -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
354 | +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
355 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
356 o 2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
357 | diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
358 | --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
359 | +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
360 | @@ -3,1 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
361 | -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
362 | +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
363 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
364 o 1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
365 | diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
366 | --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
367 | +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
368 | @@ -5,1 +5,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
369 | -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
370 | +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
371 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
372 o 0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
373 diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
374 new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
375 --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
376 +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
377 @@ -0,0 +1,5 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
378 +1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
379 +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
380 +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
381 +4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
382 +5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
383
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
384 #else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
385 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
386 d1 8:c4b449ef030e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
387 * d2 9:c9dd00ab36a3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
388 d3 10:19f476bc865c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
389 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
390 r2 7:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
391 $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
392 o 10:19f476bc865c d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
393 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
394 @ 9:c9dd00ab36a3 d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
395 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
396 o 8:c4b449ef030e d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
397 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
398 o 7:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
399 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
400 o 6:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
401 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
402 o 5:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
403 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
404 o 0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
405
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
406 #endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
407
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
408 Split a non-head without rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
409
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
410 $ cd $TESTTMP/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
411 #if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
412 $ runsplit -r 1 --no-rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
413 abort: cannot split changeset with children without rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
414 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
415 #else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
416 $ runsplit -r 1 --no-rebase >/dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
417 $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
418 d1 2:b5c5ea414030
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
419 * d2 3:f4a0a8d004cc
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
420 d3 4:777940761eba
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
421 r1 0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
422 r2 7:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
423
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
424 $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
425 o 7:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
426 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
427 o 6:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
428 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
429 o 5:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
430 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
431 | o 4:777940761eba d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
432 | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
433 | @ 3:f4a0a8d004cc d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
434 | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
435 | o 2:b5c5ea414030 d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
436 | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
437 | x 1:1df0d5c5a3ab a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
438 |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
439 o 0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
440
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
441 #endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
442
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
443 Split a non-head with obsoleted descendants
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
444
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
445 #if obsstore-on
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
446 $ hg init $TESTTMP/e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
447 $ cd $TESTTMP/e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
448 $ hg debugdrawdag <<'EOS'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
449 > H I J
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
450 > | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
451 > F G1 G2 # amend: G1 -> G2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
452 > | | / # prune: F
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
453 > C D E
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
454 > \|/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
455 > B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
456 > |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
457 > A
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
458 > EOS
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
459 $ eval `hg tags -T '{tag}={node}\n'`
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
460 $ rm .hg/localtags
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
461 $ hg split $B --config experimental.evolution=createmarkers
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
462 abort: split would leave orphaned changesets behind
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
463 [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
464 $ cat > $TESTTMP/messages <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
465 > Split B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
466 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
467 $ cat <<EOF | hg split $B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
468 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
469 > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
470 > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
471 diff --git a/B b/B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
472 new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
473 examine changes to 'B'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
474
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
475 @@ -0,0 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
476 +B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
477 \ No newline at end of file
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
478 record this change to 'B'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
479
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
480 EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
481 EDITOR: B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
482 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
483 EDITOR:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
484 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
485 EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
486 EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
487 EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
488 EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
489 EDITOR: HG: added B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
490 created new head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
491 rebasing 2:26805aba1e60 "C"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
492 rebasing 3:be0ef73c17ad "D"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
493 rebasing 4:49cb92066bfd "E"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
494 rebasing 7:97a6268cc7ef "G2"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
495 rebasing 10:e2f1e425c0db "J"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
496 $ hg glog -r 'sort(all(), topo)'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
497 o 16:556c085f8b52 J
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
498 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
499 o 15:8761f6c9123f G2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
500 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
501 o 14:a7aeffe59b65 E
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
502 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
503 | o 13:e1e914ede9ab D
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
504 |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
505 | o 12:01947e9b98aa C
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
506 |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
507 o 11:0947baa74d47 Split B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
508 |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
509 | o 9:88ede1d5ee13 I
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
510 | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
511 | x 6:af8cbf225b7b G1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
512 | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
513 | x 3:be0ef73c17ad D
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
514 | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
515 | | o 8:74863e5b5074 H
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
516 | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
517 | | x 5:ee481a2a1e69 F
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
518 | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
519 | | x 2:26805aba1e60 C
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
520 | |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
521 | x 1:112478962961 B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
522 |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
523 o 0:426bada5c675 A
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
524
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
525 #endif