author | Manuel Jacob <me@manueljacob.de> |
Sun, 28 Jun 2020 17:52:29 +0200 | |
changeset 45018 | f2dc337117b9 |
parent 43935 | 2349a60f33db |
child 45771 | f90a5c211251 |
permissions | -rw-r--r-- |
35455 | 1 |
#testcases obsstore-on obsstore-off |
2 |
||
3 |
$ cat > $TESTTMP/editor.py <<EOF |
|
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38424
diff
changeset
|
4 |
> #!"$PYTHON" |
36645
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
35709
diff
changeset
|
5 |
> import os |
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
35709
diff
changeset
|
6 |
> import sys |
35455 | 7 |
> path = os.path.join(os.environ['TESTTMP'], 'messages') |
8 |
> messages = open(path).read().split('--\n') |
|
9 |
> prompt = open(sys.argv[1]).read() |
|
10 |
> sys.stdout.write(''.join('EDITOR: %s' % l for l in prompt.splitlines(True))) |
|
11 |
> sys.stdout.flush() |
|
12 |
> with open(sys.argv[1], 'w') as f: |
|
13 |
> f.write(messages[0]) |
|
14 |
> with open(path, 'w') as f: |
|
15 |
> f.write('--\n'.join(messages[1:])) |
|
16 |
> EOF |
|
17 |
||
18 |
$ cat >> $HGRCPATH <<EOF |
|
19 |
> [extensions] |
|
20 |
> drawdag=$TESTDIR/drawdag.py |
|
21 |
> split= |
|
22 |
> [ui] |
|
23 |
> interactive=1 |
|
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
24 |
> color=no |
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
25 |
> paginate=never |
35455 | 26 |
> [diff] |
27 |
> git=1 |
|
28 |
> unified=0 |
|
41560
66399f2e92aa
commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents:
41557
diff
changeset
|
29 |
> [commands] |
66399f2e92aa
commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents:
41557
diff
changeset
|
30 |
> commit.interactive.unified=0 |
35455 | 31 |
> [alias] |
32 |
> glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n' |
|
33 |
> EOF |
|
34 |
||
35 |
#if obsstore-on |
|
36 |
$ cat >> $HGRCPATH <<EOF |
|
37 |
> [experimental] |
|
38 |
> evolution=all |
|
39 |
> EOF |
|
40 |
#endif |
|
41 |
||
42 |
$ hg init a |
|
43 |
$ cd a |
|
44 |
||
45 |
Nothing to split |
|
46 |
||
47 |
$ hg split |
|
48 |
nothing to split |
|
49 |
[1] |
|
50 |
||
51 |
$ hg commit -m empty --config ui.allowemptycommit=1 |
|
52 |
$ hg split |
|
53 |
abort: cannot split an empty revision |
|
54 |
[255] |
|
55 |
||
56 |
$ rm -rf .hg |
|
57 |
$ hg init |
|
58 |
||
59 |
Cannot split working directory |
|
60 |
||
61 |
$ hg split -r 'wdir()' |
|
62 |
abort: cannot split working directory |
|
63 |
[255] |
|
64 |
||
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
65 |
Generate some content. The sed filter drop CR on Windows, which is dropped in |
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
66 |
the a > b line. |
35455 | 67 |
|
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
68 |
$ $TESTDIR/seq.py 1 5 | sed 's/\r$//' >> a |
35455 | 69 |
$ hg ci -m a1 -A a -q |
70 |
$ hg bookmark -i r1 |
|
71 |
$ sed 's/1/11/;s/3/33/;s/5/55/' a > b |
|
72 |
$ mv b a |
|
73 |
$ hg ci -m a2 -q |
|
74 |
$ hg bookmark -i r2 |
|
75 |
||
76 |
Cannot split a public changeset |
|
77 |
||
78 |
$ hg phase --public -r 'all()' |
|
79 |
$ hg split . |
|
43935
2349a60f33db
split: use rewriteutil.precheck() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents:
42856
diff
changeset
|
80 |
abort: cannot split public changesets |
35455 | 81 |
(see 'hg help phases' for details) |
82 |
[255] |
|
83 |
||
84 |
$ hg phase --draft -f -r 'all()' |
|
85 |
||
86 |
Cannot split while working directory is dirty |
|
87 |
||
88 |
$ touch dirty |
|
89 |
$ hg add dirty |
|
90 |
$ hg split . |
|
91 |
abort: uncommitted changes |
|
92 |
[255] |
|
93 |
$ hg forget dirty |
|
94 |
$ rm dirty |
|
95 |
||
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
96 |
Make a clean directory for future tests to build off of |
35455 | 97 |
|
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
98 |
$ cp -R . ../clean |
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
99 |
|
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
100 |
Split a head |
35455 | 101 |
|
102 |
$ hg bookmark r3 |
|
103 |
||
104 |
$ hg split 'all()' |
|
105 |
abort: cannot split multiple revisions |
|
106 |
[255] |
|
107 |
||
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
108 |
This function splits a bit strangely primarily to avoid changing the behavior of |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
109 |
the test after a bug was fixed with how split/commit --interactive handled |
41560
66399f2e92aa
commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents:
41557
diff
changeset
|
110 |
`commands.commit.interactive.unified=0`: when there were no context lines, |
66399f2e92aa
commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents:
41557
diff
changeset
|
111 |
it kept only the last diff hunk. When running split, this meant that runsplit |
66399f2e92aa
commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents:
41557
diff
changeset
|
112 |
was always recording three commits, one for each diff hunk, in reverse order |
66399f2e92aa
commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents:
41557
diff
changeset
|
113 |
(the base commit was the last diff hunk in the file). |
35455 | 114 |
$ runsplit() { |
115 |
> cat > $TESTTMP/messages <<EOF |
|
116 |
> split 1 |
|
117 |
> -- |
|
118 |
> split 2 |
|
119 |
> -- |
|
120 |
> split 3 |
|
121 |
> EOF |
|
122 |
> cat <<EOF | hg split "$@" |
|
123 |
> y |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
124 |
> n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
125 |
> n |
35455 | 126 |
> y |
127 |
> y |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
128 |
> n |
35455 | 129 |
> y |
130 |
> y |
|
131 |
> y |
|
132 |
> EOF |
|
133 |
> } |
|
134 |
||
135 |
$ HGEDITOR=false runsplit |
|
136 |
diff --git a/a b/a |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
137 |
3 hunks, 3 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
138 |
examine changes to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
139 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 140 |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
141 |
@@ -1,1 +1,1 @@ |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
142 |
-1 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
143 |
+11 |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
144 |
record change 1/3 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
145 |
(enter ? for help) [Ynesfdaq?] n |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
146 |
|
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
147 |
@@ -3,1 +3,1 @@ 2 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
148 |
-3 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
149 |
+33 |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
150 |
record change 2/3 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
151 |
(enter ? for help) [Ynesfdaq?] n |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
152 |
|
35455 | 153 |
@@ -5,1 +5,1 @@ 4 |
154 |
-5 |
|
155 |
+55 |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
156 |
record change 3/3 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
157 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 158 |
|
159 |
transaction abort! |
|
160 |
rollback completed |
|
161 |
abort: edit failed: false exited with status 1 |
|
162 |
[255] |
|
163 |
$ hg status |
|
164 |
||
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
165 |
$ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" |
35455 | 166 |
$ runsplit |
167 |
diff --git a/a b/a |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
168 |
3 hunks, 3 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
169 |
examine changes to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
170 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 171 |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
172 |
@@ -1,1 +1,1 @@ |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
173 |
-1 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
174 |
+11 |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
175 |
record change 1/3 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
176 |
(enter ? for help) [Ynesfdaq?] n |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
177 |
|
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
178 |
@@ -3,1 +3,1 @@ 2 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
179 |
-3 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
180 |
+33 |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
181 |
record change 2/3 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
182 |
(enter ? for help) [Ynesfdaq?] n |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
183 |
|
35455 | 184 |
@@ -5,1 +5,1 @@ 4 |
185 |
-5 |
|
186 |
+55 |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
187 |
record change 3/3 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
188 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 189 |
|
190 |
EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset. |
|
191 |
EDITOR: a2 |
|
192 |
EDITOR: |
|
193 |
EDITOR: |
|
194 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
195 |
EDITOR: HG: Leave message empty to abort commit. |
|
196 |
EDITOR: HG: -- |
|
197 |
EDITOR: HG: user: test |
|
198 |
EDITOR: HG: branch 'default' |
|
199 |
EDITOR: HG: changed a |
|
200 |
created new head |
|
201 |
diff --git a/a b/a |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
202 |
2 hunks, 2 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
203 |
examine changes to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
204 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 205 |
|
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
206 |
@@ -1,1 +1,1 @@ |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
207 |
-1 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
208 |
+11 |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
209 |
record change 1/2 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
210 |
(enter ? for help) [Ynesfdaq?] n |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
211 |
|
35455 | 212 |
@@ -3,1 +3,1 @@ 2 |
213 |
-3 |
|
214 |
+33 |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
215 |
record change 2/2 to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
216 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 217 |
|
218 |
EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: |
|
219 |
EDITOR: HG: - e704349bd21b: split 1 |
|
220 |
EDITOR: HG: Write commit message for the next split changeset. |
|
221 |
EDITOR: a2 |
|
222 |
EDITOR: |
|
223 |
EDITOR: |
|
224 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
225 |
EDITOR: HG: Leave message empty to abort commit. |
|
226 |
EDITOR: HG: -- |
|
227 |
EDITOR: HG: user: test |
|
228 |
EDITOR: HG: branch 'default' |
|
229 |
EDITOR: HG: changed a |
|
230 |
diff --git a/a b/a |
|
231 |
1 hunks, 1 lines changed |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
232 |
examine changes to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
233 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 234 |
|
235 |
@@ -1,1 +1,1 @@ |
|
236 |
-1 |
|
237 |
+11 |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
238 |
record this change to 'a'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
239 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 240 |
|
241 |
EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: |
|
242 |
EDITOR: HG: - e704349bd21b: split 1 |
|
243 |
EDITOR: HG: - a09ad58faae3: split 2 |
|
244 |
EDITOR: HG: Write commit message for the next split changeset. |
|
245 |
EDITOR: a2 |
|
246 |
EDITOR: |
|
247 |
EDITOR: |
|
248 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
249 |
EDITOR: HG: Leave message empty to abort commit. |
|
250 |
EDITOR: HG: -- |
|
251 |
EDITOR: HG: user: test |
|
252 |
EDITOR: HG: branch 'default' |
|
253 |
EDITOR: HG: changed a |
|
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
254 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/1df0d5c5a3ab-8341b760-split.hg (obsstore-off !) |
35455 | 255 |
|
256 |
#if obsstore-off |
|
257 |
$ hg bookmark |
|
258 |
r1 0:a61bcde8c529 |
|
259 |
r2 3:00eebaf8d2e2 |
|
260 |
* r3 3:00eebaf8d2e2 |
|
261 |
$ hg glog -p |
|
262 |
@ 3:00eebaf8d2e2 split 3 r2 r3 |
|
263 |
| diff --git a/a b/a |
|
264 |
| --- a/a |
|
265 |
| +++ b/a |
|
266 |
| @@ -1,1 +1,1 @@ |
|
267 |
| -1 |
|
268 |
| +11 |
|
269 |
| |
|
270 |
o 2:a09ad58faae3 split 2 |
|
271 |
| diff --git a/a b/a |
|
272 |
| --- a/a |
|
273 |
| +++ b/a |
|
274 |
| @@ -3,1 +3,1 @@ |
|
275 |
| -3 |
|
276 |
| +33 |
|
277 |
| |
|
278 |
o 1:e704349bd21b split 1 |
|
279 |
| diff --git a/a b/a |
|
280 |
| --- a/a |
|
281 |
| +++ b/a |
|
282 |
| @@ -5,1 +5,1 @@ |
|
283 |
| -5 |
|
284 |
| +55 |
|
285 |
| |
|
286 |
o 0:a61bcde8c529 a1 r1 |
|
287 |
diff --git a/a b/a |
|
288 |
new file mode 100644 |
|
289 |
--- /dev/null |
|
290 |
+++ b/a |
|
291 |
@@ -0,0 +1,5 @@ |
|
292 |
+1 |
|
293 |
+2 |
|
294 |
+3 |
|
295 |
+4 |
|
296 |
+5 |
|
297 |
||
298 |
#else |
|
299 |
$ hg bookmark |
|
300 |
r1 0:a61bcde8c529 |
|
301 |
r2 4:00eebaf8d2e2 |
|
302 |
* r3 4:00eebaf8d2e2 |
|
303 |
$ hg glog |
|
304 |
@ 4:00eebaf8d2e2 split 3 r2 r3 |
|
305 |
| |
|
306 |
o 3:a09ad58faae3 split 2 |
|
307 |
| |
|
308 |
o 2:e704349bd21b split 1 |
|
309 |
| |
|
310 |
o 0:a61bcde8c529 a1 r1 |
|
311 |
||
312 |
#endif |
|
313 |
||
314 |
Split a head while working parent is not that head |
|
315 |
||
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
316 |
$ cp -R $TESTTMP/clean $TESTTMP/b |
35455 | 317 |
$ cd $TESTTMP/b |
318 |
||
319 |
$ hg up 0 -q |
|
320 |
$ hg bookmark r3 |
|
321 |
||
322 |
$ runsplit tip >/dev/null |
|
323 |
||
324 |
#if obsstore-off |
|
325 |
$ hg bookmark |
|
326 |
r1 0:a61bcde8c529 |
|
327 |
r2 3:00eebaf8d2e2 |
|
328 |
* r3 0:a61bcde8c529 |
|
329 |
$ hg glog |
|
330 |
o 3:00eebaf8d2e2 split 3 r2 |
|
331 |
| |
|
332 |
o 2:a09ad58faae3 split 2 |
|
333 |
| |
|
334 |
o 1:e704349bd21b split 1 |
|
335 |
| |
|
336 |
@ 0:a61bcde8c529 a1 r1 r3 |
|
337 |
||
338 |
#else |
|
339 |
$ hg bookmark |
|
340 |
r1 0:a61bcde8c529 |
|
341 |
r2 4:00eebaf8d2e2 |
|
342 |
* r3 0:a61bcde8c529 |
|
343 |
$ hg glog |
|
344 |
o 4:00eebaf8d2e2 split 3 r2 |
|
345 |
| |
|
346 |
o 3:a09ad58faae3 split 2 |
|
347 |
| |
|
348 |
o 2:e704349bd21b split 1 |
|
349 |
| |
|
350 |
@ 0:a61bcde8c529 a1 r1 r3 |
|
351 |
||
352 |
#endif |
|
353 |
||
354 |
Split a non-head |
|
355 |
||
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
356 |
$ cp -R $TESTTMP/clean $TESTTMP/c |
35455 | 357 |
$ cd $TESTTMP/c |
358 |
$ echo d > d |
|
359 |
$ hg ci -m d1 -A d |
|
360 |
$ hg bookmark -i d1 |
|
361 |
$ echo 2 >> d |
|
362 |
$ hg ci -m d2 |
|
363 |
$ echo 3 >> d |
|
364 |
$ hg ci -m d3 |
|
365 |
$ hg bookmark -i d3 |
|
366 |
$ hg up '.^' -q |
|
367 |
$ hg bookmark d2 |
|
368 |
$ cp -R . ../d |
|
369 |
||
370 |
$ runsplit -r 1 | grep rebasing |
|
371 |
rebasing 2:b5c5ea414030 "d1" (d1) |
|
372 |
rebasing 3:f4a0a8d004cc "d2" (d2) |
|
373 |
rebasing 4:777940761eba "d3" (d3) |
|
374 |
#if obsstore-off |
|
375 |
$ hg bookmark |
|
376 |
d1 4:c4b449ef030e |
|
377 |
* d2 5:c9dd00ab36a3 |
|
378 |
d3 6:19f476bc865c |
|
379 |
r1 0:a61bcde8c529 |
|
380 |
r2 3:00eebaf8d2e2 |
|
381 |
$ hg glog -p |
|
382 |
o 6:19f476bc865c d3 d3 |
|
383 |
| diff --git a/d b/d |
|
384 |
| --- a/d |
|
385 |
| +++ b/d |
|
386 |
| @@ -2,0 +3,1 @@ |
|
387 |
| +3 |
|
388 |
| |
|
389 |
@ 5:c9dd00ab36a3 d2 d2 |
|
390 |
| diff --git a/d b/d |
|
391 |
| --- a/d |
|
392 |
| +++ b/d |
|
393 |
| @@ -1,0 +2,1 @@ |
|
394 |
| +2 |
|
395 |
| |
|
396 |
o 4:c4b449ef030e d1 d1 |
|
397 |
| diff --git a/d b/d |
|
398 |
| new file mode 100644 |
|
399 |
| --- /dev/null |
|
400 |
| +++ b/d |
|
401 |
| @@ -0,0 +1,1 @@ |
|
402 |
| +d |
|
403 |
| |
|
404 |
o 3:00eebaf8d2e2 split 3 r2 |
|
405 |
| diff --git a/a b/a |
|
406 |
| --- a/a |
|
407 |
| +++ b/a |
|
408 |
| @@ -1,1 +1,1 @@ |
|
409 |
| -1 |
|
410 |
| +11 |
|
411 |
| |
|
412 |
o 2:a09ad58faae3 split 2 |
|
413 |
| diff --git a/a b/a |
|
414 |
| --- a/a |
|
415 |
| +++ b/a |
|
416 |
| @@ -3,1 +3,1 @@ |
|
417 |
| -3 |
|
418 |
| +33 |
|
419 |
| |
|
420 |
o 1:e704349bd21b split 1 |
|
421 |
| diff --git a/a b/a |
|
422 |
| --- a/a |
|
423 |
| +++ b/a |
|
424 |
| @@ -5,1 +5,1 @@ |
|
425 |
| -5 |
|
426 |
| +55 |
|
427 |
| |
|
428 |
o 0:a61bcde8c529 a1 r1 |
|
429 |
diff --git a/a b/a |
|
430 |
new file mode 100644 |
|
431 |
--- /dev/null |
|
432 |
+++ b/a |
|
433 |
@@ -0,0 +1,5 @@ |
|
434 |
+1 |
|
435 |
+2 |
|
436 |
+3 |
|
437 |
+4 |
|
438 |
+5 |
|
439 |
||
440 |
#else |
|
441 |
$ hg bookmark |
|
442 |
d1 8:c4b449ef030e |
|
443 |
* d2 9:c9dd00ab36a3 |
|
444 |
d3 10:19f476bc865c |
|
445 |
r1 0:a61bcde8c529 |
|
446 |
r2 7:00eebaf8d2e2 |
|
447 |
$ hg glog |
|
448 |
o 10:19f476bc865c d3 d3 |
|
449 |
| |
|
450 |
@ 9:c9dd00ab36a3 d2 d2 |
|
451 |
| |
|
452 |
o 8:c4b449ef030e d1 d1 |
|
453 |
| |
|
454 |
o 7:00eebaf8d2e2 split 3 r2 |
|
455 |
| |
|
456 |
o 6:a09ad58faae3 split 2 |
|
457 |
| |
|
458 |
o 5:e704349bd21b split 1 |
|
459 |
| |
|
460 |
o 0:a61bcde8c529 a1 r1 |
|
461 |
||
462 |
#endif |
|
463 |
||
464 |
Split a non-head without rebase |
|
465 |
||
466 |
$ cd $TESTTMP/d |
|
467 |
#if obsstore-off |
|
468 |
$ runsplit -r 1 --no-rebase |
|
43935
2349a60f33db
split: use rewriteutil.precheck() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents:
42856
diff
changeset
|
469 |
abort: cannot split changeset with children |
35455 | 470 |
[255] |
471 |
#else |
|
472 |
$ runsplit -r 1 --no-rebase >/dev/null |
|
35709
1a09dad8b85a
evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents:
35508
diff
changeset
|
473 |
3 new orphan changesets |
35455 | 474 |
$ hg bookmark |
475 |
d1 2:b5c5ea414030 |
|
476 |
* d2 3:f4a0a8d004cc |
|
477 |
d3 4:777940761eba |
|
478 |
r1 0:a61bcde8c529 |
|
479 |
r2 7:00eebaf8d2e2 |
|
480 |
||
481 |
$ hg glog |
|
482 |
o 7:00eebaf8d2e2 split 3 r2 |
|
483 |
| |
|
484 |
o 6:a09ad58faae3 split 2 |
|
485 |
| |
|
486 |
o 5:e704349bd21b split 1 |
|
487 |
| |
|
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
488 |
| * 4:777940761eba d3 d3 |
35455 | 489 |
| | |
490 |
| @ 3:f4a0a8d004cc d2 d2 |
|
491 |
| | |
|
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
492 |
| * 2:b5c5ea414030 d1 d1 |
35455 | 493 |
| | |
494 |
| x 1:1df0d5c5a3ab a2 |
|
495 |
|/ |
|
496 |
o 0:a61bcde8c529 a1 r1 |
|
497 |
||
498 |
#endif |
|
499 |
||
500 |
Split a non-head with obsoleted descendants |
|
501 |
||
502 |
#if obsstore-on |
|
503 |
$ hg init $TESTTMP/e |
|
504 |
$ cd $TESTTMP/e |
|
505 |
$ hg debugdrawdag <<'EOS' |
|
506 |
> H I J |
|
507 |
> | | | |
|
508 |
> F G1 G2 # amend: G1 -> G2 |
|
509 |
> | | / # prune: F |
|
510 |
> C D E |
|
511 |
> \|/ |
|
512 |
> B |
|
513 |
> | |
|
514 |
> A |
|
515 |
> EOS |
|
35709
1a09dad8b85a
evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents:
35508
diff
changeset
|
516 |
2 new orphan changesets |
35455 | 517 |
$ eval `hg tags -T '{tag}={node}\n'` |
518 |
$ rm .hg/localtags |
|
519 |
$ hg split $B --config experimental.evolution=createmarkers |
|
43935
2349a60f33db
split: use rewriteutil.precheck() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents:
42856
diff
changeset
|
520 |
abort: cannot split changeset with children |
35455 | 521 |
[255] |
522 |
$ cat > $TESTTMP/messages <<EOF |
|
523 |
> Split B |
|
524 |
> EOF |
|
525 |
$ cat <<EOF | hg split $B |
|
526 |
> y |
|
527 |
> y |
|
528 |
> EOF |
|
529 |
diff --git a/B b/B |
|
530 |
new file mode 100644 |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
531 |
examine changes to 'B'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
532 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 533 |
|
534 |
@@ -0,0 +1,1 @@ |
|
535 |
+B |
|
536 |
\ No newline at end of file |
|
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
537 |
record this change to 'B'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
538 |
(enter ? for help) [Ynesfdaq?] y |
35455 | 539 |
|
540 |
EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset. |
|
541 |
EDITOR: B |
|
542 |
EDITOR: |
|
543 |
EDITOR: |
|
544 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
545 |
EDITOR: HG: Leave message empty to abort commit. |
|
546 |
EDITOR: HG: -- |
|
547 |
EDITOR: HG: user: test |
|
548 |
EDITOR: HG: branch 'default' |
|
549 |
EDITOR: HG: added B |
|
550 |
created new head |
|
551 |
rebasing 2:26805aba1e60 "C" |
|
552 |
rebasing 3:be0ef73c17ad "D" |
|
553 |
rebasing 4:49cb92066bfd "E" |
|
554 |
rebasing 7:97a6268cc7ef "G2" |
|
555 |
rebasing 10:e2f1e425c0db "J" |
|
556 |
$ hg glog -r 'sort(all(), topo)' |
|
557 |
o 16:556c085f8b52 J |
|
558 |
| |
|
559 |
o 15:8761f6c9123f G2 |
|
560 |
| |
|
561 |
o 14:a7aeffe59b65 E |
|
562 |
| |
|
563 |
| o 13:e1e914ede9ab D |
|
564 |
|/ |
|
565 |
| o 12:01947e9b98aa C |
|
566 |
|/ |
|
567 |
o 11:0947baa74d47 Split B |
|
568 |
| |
|
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
569 |
| * 9:88ede1d5ee13 I |
35455 | 570 |
| | |
571 |
| x 6:af8cbf225b7b G1 |
|
572 |
| | |
|
573 |
| x 3:be0ef73c17ad D |
|
574 |
| | |
|
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
575 |
| | * 8:74863e5b5074 H |
35455 | 576 |
| | | |
577 |
| | x 5:ee481a2a1e69 F |
|
578 |
| | | |
|
579 |
| | x 2:26805aba1e60 C |
|
580 |
| |/ |
|
581 |
| x 1:112478962961 B |
|
582 |
|/ |
|
583 |
o 0:426bada5c675 A |
|
584 |
||
585 |
#endif |
|
38424
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
586 |
|
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
587 |
Preserve secret phase in split |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
588 |
|
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
589 |
$ cp -R $TESTTMP/clean $TESTTMP/phases1 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
590 |
$ cd $TESTTMP/phases1 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
591 |
$ hg phase --secret -fr tip |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
592 |
$ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
593 |
1df0d5c5a3ab secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
594 |
a61bcde8c529 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
595 |
$ runsplit tip >/dev/null |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
596 |
$ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
597 |
00eebaf8d2e2 secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
598 |
a09ad58faae3 secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
599 |
e704349bd21b secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
600 |
a61bcde8c529 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
601 |
|
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
602 |
Do not move things to secret even if phases.new-commit=secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
603 |
|
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
604 |
$ cp -R $TESTTMP/clean $TESTTMP/phases2 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
605 |
$ cd $TESTTMP/phases2 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
606 |
$ cat >> .hg/hgrc <<EOF |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
607 |
> [phases] |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
608 |
> new-commit=secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
609 |
> EOF |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
610 |
$ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
611 |
1df0d5c5a3ab draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
612 |
a61bcde8c529 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
613 |
$ runsplit tip >/dev/null |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
614 |
$ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
615 |
00eebaf8d2e2 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
616 |
a09ad58faae3 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
617 |
e704349bd21b draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
618 |
a61bcde8c529 draft |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
619 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
620 |
`hg split` with ignoreblanklines=1 does not infinite loop |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
621 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
622 |
$ mkdir $TESTTMP/f |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
623 |
$ hg init $TESTTMP/f/a |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
624 |
$ cd $TESTTMP/f/a |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
625 |
$ printf '1\n2\n3\n4\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
626 |
$ cp foo bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
627 |
$ hg ci -qAm initial |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
628 |
$ printf '1\n\n2\n3\ntest\n4\n5\n' > bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
629 |
$ printf '1\n2\n3\ntest\n4\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
630 |
$ hg ci -qm splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
631 |
$ cat > $TESTTMP/messages <<EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
632 |
> split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
633 |
> -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
634 |
> split 2 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
635 |
> EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
636 |
$ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
637 |
diff --git a/bar b/bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
638 |
2 hunks, 2 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
639 |
examine changes to 'bar'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
640 |
(enter ? for help) [Ynesfdaq?] f |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
641 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
642 |
diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
643 |
1 hunks, 1 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
644 |
examine changes to 'foo'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
645 |
(enter ? for help) [Ynesfdaq?] n |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
646 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
647 |
EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
648 |
EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
649 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
650 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
651 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
652 |
EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
653 |
EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
654 |
EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
655 |
EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
656 |
EDITOR: HG: changed bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
657 |
created new head |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
658 |
diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
659 |
1 hunks, 1 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
660 |
examine changes to 'foo'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
661 |
(enter ? for help) [Ynesfdaq?] f |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
662 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
663 |
EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
664 |
EDITOR: HG: - f205aea1c624: split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
665 |
EDITOR: HG: Write commit message for the next split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
666 |
EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
667 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
668 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
669 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
670 |
EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
671 |
EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
672 |
EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
673 |
EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
674 |
EDITOR: HG: changed foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
675 |
saved backup bundle to $TESTTMP/f/a/.hg/strip-backup/dd3c45017cbf-463441b5-split.hg (obsstore-off !) |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
676 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
677 |
Let's try that again, with a slightly different set of patches, to ensure that |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
678 |
the ignoreblanklines thing isn't somehow position dependent. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
679 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
680 |
$ hg init $TESTTMP/f/b |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
681 |
$ cd $TESTTMP/f/b |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
682 |
$ printf '1\n2\n3\n4\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
683 |
$ cp foo bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
684 |
$ hg ci -qAm initial |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
685 |
$ printf '1\n2\n3\ntest\n4\n5\n' > bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
686 |
$ printf '1\n2\n3\ntest\n4\n\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
687 |
$ hg ci -qm splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
688 |
$ cat > $TESTTMP/messages <<EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
689 |
> split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
690 |
> -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
691 |
> split 2 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
692 |
> EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
693 |
$ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
694 |
diff --git a/bar b/bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
695 |
1 hunks, 1 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
696 |
examine changes to 'bar'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
697 |
(enter ? for help) [Ynesfdaq?] f |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
698 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
699 |
diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
700 |
2 hunks, 2 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
701 |
examine changes to 'foo'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
702 |
(enter ? for help) [Ynesfdaq?] n |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
703 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
704 |
EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
705 |
EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
706 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
707 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
708 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
709 |
EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
710 |
EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
711 |
EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
712 |
EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
713 |
EDITOR: HG: changed bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
714 |
created new head |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
715 |
diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
716 |
2 hunks, 2 lines changed |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
717 |
examine changes to 'foo'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
718 |
(enter ? for help) [Ynesfdaq?] f |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
719 |
|
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
720 |
EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
721 |
EDITOR: HG: - ffecf40fa954: split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
722 |
EDITOR: HG: Write commit message for the next split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
723 |
EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
724 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
725 |
EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
726 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
727 |
EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
728 |
EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
729 |
EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
730 |
EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
731 |
EDITOR: HG: changed foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
732 |
saved backup bundle to $TESTTMP/f/b/.hg/strip-backup/904c80b40a4a-47fb907f-split.hg (obsstore-off !) |
41890
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
733 |
|
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
734 |
|
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
735 |
Testing the case in split when commiting flag-only file changes (issue5864) |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
736 |
--------------------------------------------------------------------------- |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
737 |
$ hg init $TESTTMP/issue5864 |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
738 |
$ cd $TESTTMP/issue5864 |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
739 |
$ echo foo > foo |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
740 |
$ hg add foo |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
741 |
$ hg ci -m "initial" |
41892
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
742 |
$ hg import -q --bypass -m "make executable" - <<EOF |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
743 |
> diff --git a/foo b/foo |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
744 |
> old mode 100644 |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
745 |
> new mode 100755 |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
746 |
> EOF |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
747 |
$ hg up -q |
41890
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
748 |
|
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
749 |
$ hg glog |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
750 |
@ 1:3a2125f0f4cb make executable |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
751 |
| |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
752 |
o 0:51f273a58d82 initial |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
753 |
|
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
754 |
|
41892
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
755 |
#if no-windows |
41982
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
756 |
$ cat > $TESTTMP/messages <<EOF |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
757 |
> split 1 |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
758 |
> EOF |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
759 |
$ printf 'y\n' | hg split |
41890
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
760 |
diff --git a/foo b/foo |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
761 |
old mode 100644 |
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
762 |
new mode 100755 |
42566
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
763 |
examine changes to 'foo'? |
f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41982
diff
changeset
|
764 |
(enter ? for help) [Ynesfdaq?] y |
41890
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
765 |
|
41982
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
766 |
EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset. |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
767 |
EDITOR: make executable |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
768 |
EDITOR: |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
769 |
EDITOR: |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
770 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
771 |
EDITOR: HG: Leave message empty to abort commit. |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
772 |
EDITOR: HG: -- |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
773 |
EDITOR: HG: user: test |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
774 |
EDITOR: HG: branch 'default' |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
775 |
EDITOR: HG: changed foo |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
776 |
created new head |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
777 |
saved backup bundle to $TESTTMP/issue5864/.hg/strip-backup/3a2125f0f4cb-629e4432-split.hg (obsstore-off !) |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
778 |
|
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
779 |
$ hg log -G -T "{node|short} {desc}\n" |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
780 |
@ b154670c87da split 1 |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
781 |
| |
f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41892
diff
changeset
|
782 |
o 51f273a58d82 initial |
41890
7da6307cc07a
split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41560
diff
changeset
|
783 |
|
41892
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
784 |
#else |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
785 |
|
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
786 |
TODO: Fix this on Windows. See issue 2020 and 5883 |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
787 |
|
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
788 |
$ printf 'y\ny\ny\n' | hg split |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
789 |
abort: cannot split an empty revision |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
790 |
[255] |
0cbcb3e13fcf
tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41890
diff
changeset
|
791 |
#endif |
42855
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
792 |
|
42856
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
793 |
Test that splitting moves works properly (issue5723) |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
794 |
---------------------------------------------------- |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
795 |
|
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
796 |
$ hg init $TESTTMP/issue5723-mv |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
797 |
$ cd $TESTTMP/issue5723-mv |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
798 |
$ printf '1\n2\n' > file |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
799 |
$ hg ci -qAm initial |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
800 |
$ hg mv file file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
801 |
$ printf 'a\nb\n1\n2\n3\n4\n' > file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
802 |
$ cat > $TESTTMP/messages <<EOF |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
803 |
> split1, keeping only the numbered lines |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
804 |
> -- |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
805 |
> split2, keeping the lettered lines |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
806 |
> EOF |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
807 |
$ hg ci -m 'move and modify' |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
808 |
$ printf 'y\nn\na\na\n' | hg split |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
809 |
diff --git a/file b/file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
810 |
rename from file |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
811 |
rename to file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
812 |
2 hunks, 4 lines changed |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
813 |
examine changes to 'file' and 'file2'? |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
814 |
(enter ? for help) [Ynesfdaq?] y |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
815 |
|
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
816 |
@@ -0,0 +1,2 @@ |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
817 |
+a |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
818 |
+b |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
819 |
record change 1/2 to 'file2'? |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
820 |
(enter ? for help) [Ynesfdaq?] n |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
821 |
|
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
822 |
@@ -2,0 +5,2 @@ 2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
823 |
+3 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
824 |
+4 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
825 |
record change 2/2 to 'file2'? |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
826 |
(enter ? for help) [Ynesfdaq?] a |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
827 |
|
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
828 |
EDITOR: HG: Splitting 8c42fa635116. Write commit message for the first split changeset. |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
829 |
EDITOR: move and modify |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
830 |
EDITOR: |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
831 |
EDITOR: |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
832 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
833 |
EDITOR: HG: Leave message empty to abort commit. |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
834 |
EDITOR: HG: -- |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
835 |
EDITOR: HG: user: test |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
836 |
EDITOR: HG: branch 'default' |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
837 |
EDITOR: HG: added file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
838 |
EDITOR: HG: removed file |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
839 |
created new head |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
840 |
diff --git a/file2 b/file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
841 |
1 hunks, 2 lines changed |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
842 |
examine changes to 'file2'? |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
843 |
(enter ? for help) [Ynesfdaq?] a |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
844 |
|
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
845 |
EDITOR: HG: Splitting 8c42fa635116. So far it has been split into: |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
846 |
EDITOR: HG: - 478be2a70c27: split1, keeping only the numbered lines |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
847 |
EDITOR: HG: Write commit message for the next split changeset. |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
848 |
EDITOR: move and modify |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
849 |
EDITOR: |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
850 |
EDITOR: |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
851 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
852 |
EDITOR: HG: Leave message empty to abort commit. |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
853 |
EDITOR: HG: -- |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
854 |
EDITOR: HG: user: test |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
855 |
EDITOR: HG: branch 'default' |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
856 |
EDITOR: HG: changed file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
857 |
saved backup bundle to $TESTTMP/issue5723-mv/.hg/strip-backup/8c42fa635116-a38044d4-split.hg (obsstore-off !) |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
858 |
$ hg log -T '{desc}: {files%"{file} "}\n' |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
859 |
split2, keeping the lettered lines: file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
860 |
split1, keeping only the numbered lines: file file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
861 |
initial: file |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
862 |
$ cat file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
863 |
a |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
864 |
b |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
865 |
1 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
866 |
2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
867 |
3 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
868 |
4 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
869 |
$ hg cat -r ".^" file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
870 |
1 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
871 |
2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
872 |
3 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
873 |
4 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
874 |
$ hg cat -r . file2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
875 |
a |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
876 |
b |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
877 |
1 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
878 |
2 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
879 |
3 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
880 |
4 |
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
881 |
|
3cf091843b4f
split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents:
42855
diff
changeset
|
882 |
|
42855
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
883 |
Test that splitting copies works properly (issue5723) |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
884 |
---------------------------------------------------- |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
885 |
|
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
886 |
$ hg init $TESTTMP/issue5723-cp |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
887 |
$ cd $TESTTMP/issue5723-cp |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
888 |
$ printf '1\n2\n' > file |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
889 |
$ hg ci -qAm initial |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
890 |
$ hg cp file file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
891 |
$ printf 'a\nb\n1\n2\n3\n4\n' > file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
892 |
Also modify 'file' to prove that the changes aren't being pulled in |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
893 |
accidentally. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
894 |
$ printf 'this is the new contents of "file"' > file |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
895 |
$ cat > $TESTTMP/messages <<EOF |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
896 |
> split1, keeping "file" and only the numbered lines in file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
897 |
> -- |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
898 |
> split2, keeping the lettered lines in file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
899 |
> EOF |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
900 |
$ hg ci -m 'copy file->file2, modify both' |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
901 |
$ printf 'f\ny\nn\na\na\n' | hg split |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
902 |
diff --git a/file b/file |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
903 |
1 hunks, 2 lines changed |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
904 |
examine changes to 'file'? |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
905 |
(enter ? for help) [Ynesfdaq?] f |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
906 |
|
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
907 |
diff --git a/file b/file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
908 |
copy from file |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
909 |
copy to file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
910 |
2 hunks, 4 lines changed |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
911 |
examine changes to 'file' and 'file2'? |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
912 |
(enter ? for help) [Ynesfdaq?] y |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
913 |
|
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
914 |
@@ -0,0 +1,2 @@ |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
915 |
+a |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
916 |
+b |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
917 |
record change 2/3 to 'file2'? |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
918 |
(enter ? for help) [Ynesfdaq?] n |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
919 |
|
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
920 |
@@ -2,0 +5,2 @@ 2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
921 |
+3 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
922 |
+4 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
923 |
record change 3/3 to 'file2'? |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
924 |
(enter ? for help) [Ynesfdaq?] a |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
925 |
|
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
926 |
EDITOR: HG: Splitting 41c861dfa61e. Write commit message for the first split changeset. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
927 |
EDITOR: copy file->file2, modify both |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
928 |
EDITOR: |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
929 |
EDITOR: |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
930 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
931 |
EDITOR: HG: Leave message empty to abort commit. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
932 |
EDITOR: HG: -- |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
933 |
EDITOR: HG: user: test |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
934 |
EDITOR: HG: branch 'default' |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
935 |
EDITOR: HG: added file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
936 |
EDITOR: HG: changed file |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
937 |
created new head |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
938 |
diff --git a/file2 b/file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
939 |
1 hunks, 2 lines changed |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
940 |
examine changes to 'file2'? |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
941 |
(enter ? for help) [Ynesfdaq?] a |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
942 |
|
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
943 |
EDITOR: HG: Splitting 41c861dfa61e. So far it has been split into: |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
944 |
EDITOR: HG: - 4b19e06610eb: split1, keeping "file" and only the numbered lines in file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
945 |
EDITOR: HG: Write commit message for the next split changeset. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
946 |
EDITOR: copy file->file2, modify both |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
947 |
EDITOR: |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
948 |
EDITOR: |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
949 |
EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
950 |
EDITOR: HG: Leave message empty to abort commit. |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
951 |
EDITOR: HG: -- |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
952 |
EDITOR: HG: user: test |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
953 |
EDITOR: HG: branch 'default' |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
954 |
EDITOR: HG: changed file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
955 |
saved backup bundle to $TESTTMP/issue5723-cp/.hg/strip-backup/41c861dfa61e-467e8d3c-split.hg (obsstore-off !) |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
956 |
$ hg log -T '{desc}: {files%"{file} "}\n' |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
957 |
split2, keeping the lettered lines in file2: file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
958 |
split1, keeping "file" and only the numbered lines in file2: file file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
959 |
initial: file |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
960 |
$ cat file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
961 |
a |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
962 |
b |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
963 |
1 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
964 |
2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
965 |
3 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
966 |
4 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
967 |
$ hg cat -r ".^" file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
968 |
1 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
969 |
2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
970 |
3 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
971 |
4 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
972 |
$ hg cat -r . file2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
973 |
a |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
974 |
b |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
975 |
1 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
976 |
2 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
977 |
3 |
1fd530b1e1cf
split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents:
42566
diff
changeset
|
978 |
4 |