Show More
@@ -1,922 +1,969 | |||||
1 | #require symlink execbit |
|
1 | #require symlink execbit | |
2 | $ cat << EOF >> $HGRCPATH |
|
2 | $ cat << EOF >> $HGRCPATH | |
3 | > [phases] |
|
3 | > [phases] | |
4 | > publish=False |
|
4 | > publish=False | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > amend= |
|
6 | > amend= | |
7 | > rebase= |
|
7 | > rebase= | |
8 | > debugdrawdag=$TESTDIR/drawdag.py |
|
8 | > debugdrawdag=$TESTDIR/drawdag.py | |
9 | > strip= |
|
9 | > strip= | |
10 | > [rebase] |
|
10 | > [rebase] | |
11 | > experimental.inmemory=1 |
|
11 | > experimental.inmemory=1 | |
12 | > [diff] |
|
12 | > [diff] | |
13 | > git=1 |
|
13 | > git=1 | |
14 | > [alias] |
|
14 | > [alias] | |
15 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" |
|
15 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" | |
16 | > EOF |
|
16 | > EOF | |
17 |
|
17 | |||
18 | Rebase a simple DAG: |
|
18 | Rebase a simple DAG: | |
19 | $ hg init repo1 |
|
19 | $ hg init repo1 | |
20 | $ cd repo1 |
|
20 | $ cd repo1 | |
21 | $ hg debugdrawdag <<'EOS' |
|
21 | $ hg debugdrawdag <<'EOS' | |
22 | > c b |
|
22 | > c b | |
23 | > |/ |
|
23 | > |/ | |
24 | > d |
|
24 | > d | |
25 | > | |
|
25 | > | | |
26 | > a |
|
26 | > a | |
27 | > EOS |
|
27 | > EOS | |
28 | $ hg up -C a |
|
28 | $ hg up -C a | |
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | $ hg tglog |
|
30 | $ hg tglog | |
31 | o 3: 814f6bd05178 'c' |
|
31 | o 3: 814f6bd05178 'c' | |
32 | | |
|
32 | | | |
33 | | o 2: db0e82a16a62 'b' |
|
33 | | o 2: db0e82a16a62 'b' | |
34 | |/ |
|
34 | |/ | |
35 | o 1: 02952614a83d 'd' |
|
35 | o 1: 02952614a83d 'd' | |
36 | | |
|
36 | | | |
37 | @ 0: b173517d0057 'a' |
|
37 | @ 0: b173517d0057 'a' | |
38 |
|
38 | |||
39 | $ hg cat -r 3 c |
|
39 | $ hg cat -r 3 c | |
40 | c (no-eol) |
|
40 | c (no-eol) | |
41 | $ hg cat -r 2 b |
|
41 | $ hg cat -r 2 b | |
42 | b (no-eol) |
|
42 | b (no-eol) | |
43 | $ hg rebase --debug -r b -d c | grep rebasing |
|
43 | $ hg rebase --debug -r b -d c | grep rebasing | |
44 | rebasing in-memory |
|
44 | rebasing in-memory | |
45 | rebasing 2:db0e82a16a62 "b" (b) |
|
45 | rebasing 2:db0e82a16a62 "b" (b) | |
46 | $ hg tglog |
|
46 | $ hg tglog | |
47 | o 3: ca58782ad1e4 'b' |
|
47 | o 3: ca58782ad1e4 'b' | |
48 | | |
|
48 | | | |
49 | o 2: 814f6bd05178 'c' |
|
49 | o 2: 814f6bd05178 'c' | |
50 | | |
|
50 | | | |
51 | o 1: 02952614a83d 'd' |
|
51 | o 1: 02952614a83d 'd' | |
52 | | |
|
52 | | | |
53 | @ 0: b173517d0057 'a' |
|
53 | @ 0: b173517d0057 'a' | |
54 |
|
54 | |||
55 | $ hg cat -r 3 b |
|
55 | $ hg cat -r 3 b | |
56 | b (no-eol) |
|
56 | b (no-eol) | |
57 | $ hg cat -r 2 c |
|
57 | $ hg cat -r 2 c | |
58 | c (no-eol) |
|
58 | c (no-eol) | |
59 | $ cd .. |
|
59 | $ cd .. | |
60 |
|
60 | |||
61 | Case 2: |
|
61 | Case 2: | |
62 | $ hg init repo2 |
|
62 | $ hg init repo2 | |
63 | $ cd repo2 |
|
63 | $ cd repo2 | |
64 | $ hg debugdrawdag <<'EOS' |
|
64 | $ hg debugdrawdag <<'EOS' | |
65 | > c b |
|
65 | > c b | |
66 | > |/ |
|
66 | > |/ | |
67 | > d |
|
67 | > d | |
68 | > | |
|
68 | > | | |
69 | > a |
|
69 | > a | |
70 | > EOS |
|
70 | > EOS | |
71 |
|
71 | |||
72 | Add a symlink and executable file: |
|
72 | Add a symlink and executable file: | |
73 | $ hg up -C c |
|
73 | $ hg up -C c | |
74 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | $ ln -s somefile e |
|
75 | $ ln -s somefile e | |
76 | $ echo f > f |
|
76 | $ echo f > f | |
77 | $ chmod +x f |
|
77 | $ chmod +x f | |
78 | $ hg add e f |
|
78 | $ hg add e f | |
79 | $ hg amend -q |
|
79 | $ hg amend -q | |
80 | $ hg up -Cq a |
|
80 | $ hg up -Cq a | |
81 |
|
81 | |||
82 | Write files to the working copy, and ensure they're still there after the rebase |
|
82 | Write files to the working copy, and ensure they're still there after the rebase | |
83 | $ echo "abc" > a |
|
83 | $ echo "abc" > a | |
84 | $ ln -s def b |
|
84 | $ ln -s def b | |
85 | $ echo "ghi" > c |
|
85 | $ echo "ghi" > c | |
86 | $ echo "jkl" > d |
|
86 | $ echo "jkl" > d | |
87 | $ echo "mno" > e |
|
87 | $ echo "mno" > e | |
88 | $ hg tglog |
|
88 | $ hg tglog | |
89 | o 3: f56b71190a8f 'c' |
|
89 | o 3: f56b71190a8f 'c' | |
90 | | |
|
90 | | | |
91 | | o 2: db0e82a16a62 'b' |
|
91 | | o 2: db0e82a16a62 'b' | |
92 | |/ |
|
92 | |/ | |
93 | o 1: 02952614a83d 'd' |
|
93 | o 1: 02952614a83d 'd' | |
94 | | |
|
94 | | | |
95 | @ 0: b173517d0057 'a' |
|
95 | @ 0: b173517d0057 'a' | |
96 |
|
96 | |||
97 | $ hg cat -r 3 c |
|
97 | $ hg cat -r 3 c | |
98 | c (no-eol) |
|
98 | c (no-eol) | |
99 | $ hg cat -r 2 b |
|
99 | $ hg cat -r 2 b | |
100 | b (no-eol) |
|
100 | b (no-eol) | |
101 | $ hg cat -r 3 e |
|
101 | $ hg cat -r 3 e | |
102 | somefile (no-eol) |
|
102 | somefile (no-eol) | |
103 | $ hg rebase --debug -s b -d a | grep rebasing |
|
103 | $ hg rebase --debug -s b -d a | grep rebasing | |
104 | rebasing in-memory |
|
104 | rebasing in-memory | |
105 | rebasing 2:db0e82a16a62 "b" (b) |
|
105 | rebasing 2:db0e82a16a62 "b" (b) | |
106 | $ hg tglog |
|
106 | $ hg tglog | |
107 | o 3: fc055c3b4d33 'b' |
|
107 | o 3: fc055c3b4d33 'b' | |
108 | | |
|
108 | | | |
109 | | o 2: f56b71190a8f 'c' |
|
109 | | o 2: f56b71190a8f 'c' | |
110 | | | |
|
110 | | | | |
111 | | o 1: 02952614a83d 'd' |
|
111 | | o 1: 02952614a83d 'd' | |
112 | |/ |
|
112 | |/ | |
113 | @ 0: b173517d0057 'a' |
|
113 | @ 0: b173517d0057 'a' | |
114 |
|
114 | |||
115 | $ hg cat -r 2 c |
|
115 | $ hg cat -r 2 c | |
116 | c (no-eol) |
|
116 | c (no-eol) | |
117 | $ hg cat -r 3 b |
|
117 | $ hg cat -r 3 b | |
118 | b (no-eol) |
|
118 | b (no-eol) | |
119 | $ hg rebase --debug -s 1 -d 3 | grep rebasing |
|
119 | $ hg rebase --debug -s 1 -d 3 | grep rebasing | |
120 | rebasing in-memory |
|
120 | rebasing in-memory | |
121 | rebasing 1:02952614a83d "d" (d) |
|
121 | rebasing 1:02952614a83d "d" (d) | |
122 | rebasing 2:f56b71190a8f "c" |
|
122 | rebasing 2:f56b71190a8f "c" | |
123 | $ hg tglog |
|
123 | $ hg tglog | |
124 | o 3: 753feb6fd12a 'c' |
|
124 | o 3: 753feb6fd12a 'c' | |
125 | | |
|
125 | | | |
126 | o 2: 09c044d2cb43 'd' |
|
126 | o 2: 09c044d2cb43 'd' | |
127 | | |
|
127 | | | |
128 | o 1: fc055c3b4d33 'b' |
|
128 | o 1: fc055c3b4d33 'b' | |
129 | | |
|
129 | | | |
130 | @ 0: b173517d0057 'a' |
|
130 | @ 0: b173517d0057 'a' | |
131 |
|
131 | |||
132 | Ensure working copy files are still there: |
|
132 | Ensure working copy files are still there: | |
133 | $ cat a |
|
133 | $ cat a | |
134 | abc |
|
134 | abc | |
135 | $ readlink.py b |
|
135 | $ readlink.py b | |
136 | b -> def |
|
136 | b -> def | |
137 | $ cat e |
|
137 | $ cat e | |
138 | mno |
|
138 | mno | |
139 |
|
139 | |||
140 | Ensure symlink and executable files were rebased properly: |
|
140 | Ensure symlink and executable files were rebased properly: | |
141 | $ hg up -Cq 3 |
|
141 | $ hg up -Cq 3 | |
142 | $ readlink.py e |
|
142 | $ readlink.py e | |
143 | e -> somefile |
|
143 | e -> somefile | |
144 | $ ls -l f | cut -c -10 |
|
144 | $ ls -l f | cut -c -10 | |
145 | -rwxr-xr-x |
|
145 | -rwxr-xr-x | |
146 |
|
146 | |||
147 | Rebase the working copy parent |
|
147 | Rebase the working copy parent | |
148 | $ hg up -C 3 |
|
148 | $ hg up -C 3 | |
149 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
150 | $ hg rebase -r 3 -d 0 --debug | grep rebasing |
|
150 | $ hg rebase -r 3 -d 0 --debug | grep rebasing | |
151 | rebasing in-memory |
|
151 | rebasing in-memory | |
152 | rebasing 3:753feb6fd12a "c" (tip) |
|
152 | rebasing 3:753feb6fd12a "c" (tip) | |
153 | $ hg tglog |
|
153 | $ hg tglog | |
154 | @ 3: 844a7de3e617 'c' |
|
154 | @ 3: 844a7de3e617 'c' | |
155 | | |
|
155 | | | |
156 | | o 2: 09c044d2cb43 'd' |
|
156 | | o 2: 09c044d2cb43 'd' | |
157 | | | |
|
157 | | | | |
158 | | o 1: fc055c3b4d33 'b' |
|
158 | | o 1: fc055c3b4d33 'b' | |
159 | |/ |
|
159 | |/ | |
160 | o 0: b173517d0057 'a' |
|
160 | o 0: b173517d0057 'a' | |
161 |
|
161 | |||
162 |
|
162 | |||
163 | Test reporting of path conflicts |
|
163 | Test reporting of path conflicts | |
164 |
|
164 | |||
165 | $ hg rm a |
|
165 | $ hg rm a | |
166 | $ mkdir a |
|
166 | $ mkdir a | |
167 | $ touch a/a |
|
167 | $ touch a/a | |
168 | $ hg ci -Am "a/a" |
|
168 | $ hg ci -Am "a/a" | |
169 | adding a/a |
|
169 | adding a/a | |
170 | $ hg tglog |
|
170 | $ hg tglog | |
171 | @ 4: daf7dfc139cb 'a/a' |
|
171 | @ 4: daf7dfc139cb 'a/a' | |
172 | | |
|
172 | | | |
173 | o 3: 844a7de3e617 'c' |
|
173 | o 3: 844a7de3e617 'c' | |
174 | | |
|
174 | | | |
175 | | o 2: 09c044d2cb43 'd' |
|
175 | | o 2: 09c044d2cb43 'd' | |
176 | | | |
|
176 | | | | |
177 | | o 1: fc055c3b4d33 'b' |
|
177 | | o 1: fc055c3b4d33 'b' | |
178 | |/ |
|
178 | |/ | |
179 | o 0: b173517d0057 'a' |
|
179 | o 0: b173517d0057 'a' | |
180 |
|
180 | |||
181 | $ hg rebase -r . -d 2 |
|
181 | $ hg rebase -r . -d 2 | |
182 | rebasing 4:daf7dfc139cb "a/a" (tip) |
|
182 | rebasing 4:daf7dfc139cb "a/a" (tip) | |
183 | saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg |
|
183 | saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg | |
184 |
|
184 | |||
185 | $ hg tglog |
|
185 | $ hg tglog | |
186 | @ 4: c6ad37a4f250 'a/a' |
|
186 | @ 4: c6ad37a4f250 'a/a' | |
187 | | |
|
187 | | | |
188 | | o 3: 844a7de3e617 'c' |
|
188 | | o 3: 844a7de3e617 'c' | |
189 | | | |
|
189 | | | | |
190 | o | 2: 09c044d2cb43 'd' |
|
190 | o | 2: 09c044d2cb43 'd' | |
191 | | | |
|
191 | | | | |
192 | o | 1: fc055c3b4d33 'b' |
|
192 | o | 1: fc055c3b4d33 'b' | |
193 | |/ |
|
193 | |/ | |
194 | o 0: b173517d0057 'a' |
|
194 | o 0: b173517d0057 'a' | |
195 |
|
195 | |||
196 | $ echo foo > foo |
|
196 | $ echo foo > foo | |
197 | $ hg ci -Aqm "added foo" |
|
197 | $ hg ci -Aqm "added foo" | |
198 | $ hg up '.^' |
|
198 | $ hg up '.^' | |
199 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
199 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
200 | $ echo bar > bar |
|
200 | $ echo bar > bar | |
201 | $ hg ci -Aqm "added bar" |
|
201 | $ hg ci -Aqm "added bar" | |
202 | $ hg rm a/a |
|
202 | $ hg rm a/a | |
203 | $ echo a > a |
|
203 | $ echo a > a | |
204 | $ hg ci -Aqm "added a back!" |
|
204 | $ hg ci -Aqm "added a back!" | |
205 | $ hg tglog |
|
205 | $ hg tglog | |
206 | @ 7: 855e9797387e 'added a back!' |
|
206 | @ 7: 855e9797387e 'added a back!' | |
207 | | |
|
207 | | | |
208 | o 6: d14530e5e3e6 'added bar' |
|
208 | o 6: d14530e5e3e6 'added bar' | |
209 | | |
|
209 | | | |
210 | | o 5: 9b94b9373deb 'added foo' |
|
210 | | o 5: 9b94b9373deb 'added foo' | |
211 | |/ |
|
211 | |/ | |
212 | o 4: c6ad37a4f250 'a/a' |
|
212 | o 4: c6ad37a4f250 'a/a' | |
213 | | |
|
213 | | | |
214 | | o 3: 844a7de3e617 'c' |
|
214 | | o 3: 844a7de3e617 'c' | |
215 | | | |
|
215 | | | | |
216 | o | 2: 09c044d2cb43 'd' |
|
216 | o | 2: 09c044d2cb43 'd' | |
217 | | | |
|
217 | | | | |
218 | o | 1: fc055c3b4d33 'b' |
|
218 | o | 1: fc055c3b4d33 'b' | |
219 | |/ |
|
219 | |/ | |
220 | o 0: b173517d0057 'a' |
|
220 | o 0: b173517d0057 'a' | |
221 |
|
221 | |||
222 | $ hg rebase -r . -d 5 |
|
222 | $ hg rebase -r . -d 5 | |
223 | rebasing 7:855e9797387e "added a back!" (tip) |
|
223 | rebasing 7:855e9797387e "added a back!" (tip) | |
224 | saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/855e9797387e-81ee4c5d-rebase.hg |
|
224 | saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/855e9797387e-81ee4c5d-rebase.hg | |
225 |
|
225 | |||
226 | $ hg tglog |
|
226 | $ hg tglog | |
227 | @ 7: bb3f02be2688 'added a back!' |
|
227 | @ 7: bb3f02be2688 'added a back!' | |
228 | | |
|
228 | | | |
229 | | o 6: d14530e5e3e6 'added bar' |
|
229 | | o 6: d14530e5e3e6 'added bar' | |
230 | | | |
|
230 | | | | |
231 | o | 5: 9b94b9373deb 'added foo' |
|
231 | o | 5: 9b94b9373deb 'added foo' | |
232 | |/ |
|
232 | |/ | |
233 | o 4: c6ad37a4f250 'a/a' |
|
233 | o 4: c6ad37a4f250 'a/a' | |
234 | | |
|
234 | | | |
235 | | o 3: 844a7de3e617 'c' |
|
235 | | o 3: 844a7de3e617 'c' | |
236 | | | |
|
236 | | | | |
237 | o | 2: 09c044d2cb43 'd' |
|
237 | o | 2: 09c044d2cb43 'd' | |
238 | | | |
|
238 | | | | |
239 | o | 1: fc055c3b4d33 'b' |
|
239 | o | 1: fc055c3b4d33 'b' | |
240 | |/ |
|
240 | |/ | |
241 | o 0: b173517d0057 'a' |
|
241 | o 0: b173517d0057 'a' | |
242 |
|
242 | |||
243 | $ mkdir -p c/subdir |
|
243 | $ mkdir -p c/subdir | |
244 | $ echo c > c/subdir/file.txt |
|
244 | $ echo c > c/subdir/file.txt | |
245 | $ hg add c/subdir/file.txt |
|
245 | $ hg add c/subdir/file.txt | |
246 | $ hg ci -m 'c/subdir/file.txt' |
|
246 | $ hg ci -m 'c/subdir/file.txt' | |
247 | $ hg rebase -r . -d 3 -n |
|
247 | $ hg rebase -r . -d 3 -n | |
248 | starting dry-run rebase; repository will not be changed |
|
248 | starting dry-run rebase; repository will not be changed | |
249 | rebasing 8:e147e6e3c490 "c/subdir/file.txt" (tip) |
|
249 | rebasing 8:e147e6e3c490 "c/subdir/file.txt" (tip) | |
250 | abort: error: 'c/subdir/file.txt' conflicts with file 'c' in 3. |
|
250 | abort: error: 'c/subdir/file.txt' conflicts with file 'c' in 3. | |
251 | [255] |
|
251 | [255] | |
252 | FIXME: shouldn't need this, but when we hit path conflicts in dryrun mode, we |
|
252 | FIXME: shouldn't need this, but when we hit path conflicts in dryrun mode, we | |
253 | don't clean up rebasestate. |
|
253 | don't clean up rebasestate. | |
254 | $ hg rebase --abort |
|
254 | $ hg rebase --abort | |
255 | rebase aborted |
|
255 | rebase aborted | |
256 | $ hg rebase -r 3 -d . -n |
|
256 | $ hg rebase -r 3 -d . -n | |
257 | starting dry-run rebase; repository will not be changed |
|
257 | starting dry-run rebase; repository will not be changed | |
258 | rebasing 3:844a7de3e617 "c" |
|
258 | rebasing 3:844a7de3e617 "c" | |
259 | abort: error: file 'c' cannot be written because 'c/' is a directory in e147e6e3c490 (containing 1 entries: c/subdir/file.txt) |
|
259 | abort: error: file 'c' cannot be written because 'c/' is a directory in e147e6e3c490 (containing 1 entries: c/subdir/file.txt) | |
260 | [255] |
|
260 | [255] | |
261 |
|
261 | |||
262 | $ cd .. |
|
262 | $ cd .. | |
263 |
|
263 | |||
264 | Test path auditing (issue5818) |
|
264 | Test path auditing (issue5818) | |
265 |
|
265 | |||
266 | $ mkdir lib_ |
|
266 | $ mkdir lib_ | |
267 | $ ln -s lib_ lib |
|
267 | $ ln -s lib_ lib | |
268 | $ hg init repo |
|
268 | $ hg init repo | |
269 | $ cd repo |
|
269 | $ cd repo | |
270 | $ mkdir -p ".$TESTTMP/lib" |
|
270 | $ mkdir -p ".$TESTTMP/lib" | |
271 | $ touch ".$TESTTMP/lib/a" |
|
271 | $ touch ".$TESTTMP/lib/a" | |
272 | $ hg add ".$TESTTMP/lib/a" |
|
272 | $ hg add ".$TESTTMP/lib/a" | |
273 | $ hg ci -m 'a' |
|
273 | $ hg ci -m 'a' | |
274 |
|
274 | |||
275 | $ touch ".$TESTTMP/lib/b" |
|
275 | $ touch ".$TESTTMP/lib/b" | |
276 | $ hg add ".$TESTTMP/lib/b" |
|
276 | $ hg add ".$TESTTMP/lib/b" | |
277 | $ hg ci -m 'b' |
|
277 | $ hg ci -m 'b' | |
278 |
|
278 | |||
279 | $ hg up -q '.^' |
|
279 | $ hg up -q '.^' | |
280 | $ touch ".$TESTTMP/lib/c" |
|
280 | $ touch ".$TESTTMP/lib/c" | |
281 | $ hg add ".$TESTTMP/lib/c" |
|
281 | $ hg add ".$TESTTMP/lib/c" | |
282 | $ hg ci -m 'c' |
|
282 | $ hg ci -m 'c' | |
283 | created new head |
|
283 | created new head | |
284 | $ hg rebase -s 1 -d . |
|
284 | $ hg rebase -s 1 -d . | |
285 | rebasing 1:* "b" (glob) |
|
285 | rebasing 1:* "b" (glob) | |
286 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-rebase.hg (glob) |
|
286 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-rebase.hg (glob) | |
287 | $ cd .. |
|
287 | $ cd .. | |
288 |
|
288 | |||
289 | Test dry-run rebasing |
|
289 | Test dry-run rebasing | |
290 |
|
290 | |||
291 | $ hg init repo3 |
|
291 | $ hg init repo3 | |
292 | $ cd repo3 |
|
292 | $ cd repo3 | |
293 | $ echo a>a |
|
293 | $ echo a>a | |
294 | $ hg ci -Aqma |
|
294 | $ hg ci -Aqma | |
295 | $ echo b>b |
|
295 | $ echo b>b | |
296 | $ hg ci -Aqmb |
|
296 | $ hg ci -Aqmb | |
297 | $ echo c>c |
|
297 | $ echo c>c | |
298 | $ hg ci -Aqmc |
|
298 | $ hg ci -Aqmc | |
299 | $ echo d>d |
|
299 | $ echo d>d | |
300 | $ hg ci -Aqmd |
|
300 | $ hg ci -Aqmd | |
301 | $ echo e>e |
|
301 | $ echo e>e | |
302 | $ hg ci -Aqme |
|
302 | $ hg ci -Aqme | |
303 |
|
303 | |||
304 | $ hg up 1 -q |
|
304 | $ hg up 1 -q | |
305 | $ echo f>f |
|
305 | $ echo f>f | |
306 | $ hg ci -Amf |
|
306 | $ hg ci -Amf | |
307 | adding f |
|
307 | adding f | |
308 | created new head |
|
308 | created new head | |
309 | $ echo g>g |
|
309 | $ echo g>g | |
310 | $ hg ci -Aqmg |
|
310 | $ hg ci -Aqmg | |
311 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
311 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
312 | @ 6:baf10c5166d4 test |
|
312 | @ 6:baf10c5166d4 test | |
313 | | g |
|
313 | | g | |
314 | | |
|
314 | | | |
315 | o 5:6343ca3eff20 test |
|
315 | o 5:6343ca3eff20 test | |
316 | | f |
|
316 | | f | |
317 | | |
|
317 | | | |
318 | | o 4:e860deea161a test |
|
318 | | o 4:e860deea161a test | |
319 | | | e |
|
319 | | | e | |
320 | | | |
|
320 | | | | |
321 | | o 3:055a42cdd887 test |
|
321 | | o 3:055a42cdd887 test | |
322 | | | d |
|
322 | | | d | |
323 | | | |
|
323 | | | | |
324 | | o 2:177f92b77385 test |
|
324 | | o 2:177f92b77385 test | |
325 | |/ c |
|
325 | |/ c | |
326 | | |
|
326 | | | |
327 | o 1:d2ae7f538514 test |
|
327 | o 1:d2ae7f538514 test | |
328 | | b |
|
328 | | b | |
329 | | |
|
329 | | | |
330 | o 0:cb9a9f314b8b test |
|
330 | o 0:cb9a9f314b8b test | |
331 | a |
|
331 | a | |
332 |
|
332 | |||
333 | Make sure it throws error while passing --continue or --abort with --dry-run |
|
333 | Make sure it throws error while passing --continue or --abort with --dry-run | |
334 | $ hg rebase -s 2 -d 6 -n --continue |
|
334 | $ hg rebase -s 2 -d 6 -n --continue | |
335 | abort: cannot specify both --continue and --dry-run |
|
335 | abort: cannot specify both --continue and --dry-run | |
336 | [255] |
|
336 | [255] | |
337 | $ hg rebase -s 2 -d 6 -n --abort |
|
337 | $ hg rebase -s 2 -d 6 -n --abort | |
338 | abort: cannot specify both --abort and --dry-run |
|
338 | abort: cannot specify both --abort and --dry-run | |
339 | [255] |
|
339 | [255] | |
340 |
|
340 | |||
341 | Check dryrun gives correct results when there is no conflict in rebasing |
|
341 | Check dryrun gives correct results when there is no conflict in rebasing | |
342 | $ hg rebase -s 2 -d 6 -n |
|
342 | $ hg rebase -s 2 -d 6 -n | |
343 | starting dry-run rebase; repository will not be changed |
|
343 | starting dry-run rebase; repository will not be changed | |
344 | rebasing 2:177f92b77385 "c" |
|
344 | rebasing 2:177f92b77385 "c" | |
345 | rebasing 3:055a42cdd887 "d" |
|
345 | rebasing 3:055a42cdd887 "d" | |
346 | rebasing 4:e860deea161a "e" |
|
346 | rebasing 4:e860deea161a "e" | |
347 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase |
|
347 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase | |
348 |
|
348 | |||
349 | $ hg diff |
|
349 | $ hg diff | |
350 | $ hg status |
|
350 | $ hg status | |
351 |
|
351 | |||
352 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
352 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
353 | @ 6:baf10c5166d4 test |
|
353 | @ 6:baf10c5166d4 test | |
354 | | g |
|
354 | | g | |
355 | | |
|
355 | | | |
356 | o 5:6343ca3eff20 test |
|
356 | o 5:6343ca3eff20 test | |
357 | | f |
|
357 | | f | |
358 | | |
|
358 | | | |
359 | | o 4:e860deea161a test |
|
359 | | o 4:e860deea161a test | |
360 | | | e |
|
360 | | | e | |
361 | | | |
|
361 | | | | |
362 | | o 3:055a42cdd887 test |
|
362 | | o 3:055a42cdd887 test | |
363 | | | d |
|
363 | | | d | |
364 | | | |
|
364 | | | | |
365 | | o 2:177f92b77385 test |
|
365 | | o 2:177f92b77385 test | |
366 | |/ c |
|
366 | |/ c | |
367 | | |
|
367 | | | |
368 | o 1:d2ae7f538514 test |
|
368 | o 1:d2ae7f538514 test | |
369 | | b |
|
369 | | b | |
370 | | |
|
370 | | | |
371 | o 0:cb9a9f314b8b test |
|
371 | o 0:cb9a9f314b8b test | |
372 | a |
|
372 | a | |
373 |
|
373 | |||
374 | Check dryrun working with --collapse when there is no conflict |
|
374 | Check dryrun working with --collapse when there is no conflict | |
375 | $ hg rebase -s 2 -d 6 -n --collapse |
|
375 | $ hg rebase -s 2 -d 6 -n --collapse | |
376 | starting dry-run rebase; repository will not be changed |
|
376 | starting dry-run rebase; repository will not be changed | |
377 | rebasing 2:177f92b77385 "c" |
|
377 | rebasing 2:177f92b77385 "c" | |
378 | rebasing 3:055a42cdd887 "d" |
|
378 | rebasing 3:055a42cdd887 "d" | |
379 | rebasing 4:e860deea161a "e" |
|
379 | rebasing 4:e860deea161a "e" | |
380 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase |
|
380 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase | |
381 |
|
381 | |||
382 | Check dryrun gives correct results when there is conflict in rebasing |
|
382 | Check dryrun gives correct results when there is conflict in rebasing | |
383 | Make a conflict: |
|
383 | Make a conflict: | |
384 | $ hg up 6 -q |
|
384 | $ hg up 6 -q | |
385 | $ echo conflict>e |
|
385 | $ echo conflict>e | |
386 | $ hg ci -Aqm "conflict with e" |
|
386 | $ hg ci -Aqm "conflict with e" | |
387 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
387 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
388 | @ 7:d2c195b28050 test |
|
388 | @ 7:d2c195b28050 test | |
389 | | conflict with e |
|
389 | | conflict with e | |
390 | | |
|
390 | | | |
391 | o 6:baf10c5166d4 test |
|
391 | o 6:baf10c5166d4 test | |
392 | | g |
|
392 | | g | |
393 | | |
|
393 | | | |
394 | o 5:6343ca3eff20 test |
|
394 | o 5:6343ca3eff20 test | |
395 | | f |
|
395 | | f | |
396 | | |
|
396 | | | |
397 | | o 4:e860deea161a test |
|
397 | | o 4:e860deea161a test | |
398 | | | e |
|
398 | | | e | |
399 | | | |
|
399 | | | | |
400 | | o 3:055a42cdd887 test |
|
400 | | o 3:055a42cdd887 test | |
401 | | | d |
|
401 | | | d | |
402 | | | |
|
402 | | | | |
403 | | o 2:177f92b77385 test |
|
403 | | o 2:177f92b77385 test | |
404 | |/ c |
|
404 | |/ c | |
405 | | |
|
405 | | | |
406 | o 1:d2ae7f538514 test |
|
406 | o 1:d2ae7f538514 test | |
407 | | b |
|
407 | | b | |
408 | | |
|
408 | | | |
409 | o 0:cb9a9f314b8b test |
|
409 | o 0:cb9a9f314b8b test | |
410 | a |
|
410 | a | |
411 |
|
411 | |||
412 | $ hg rebase -s 2 -d 7 -n |
|
412 | $ hg rebase -s 2 -d 7 -n | |
413 | starting dry-run rebase; repository will not be changed |
|
413 | starting dry-run rebase; repository will not be changed | |
414 | rebasing 2:177f92b77385 "c" |
|
414 | rebasing 2:177f92b77385 "c" | |
415 | rebasing 3:055a42cdd887 "d" |
|
415 | rebasing 3:055a42cdd887 "d" | |
416 | rebasing 4:e860deea161a "e" |
|
416 | rebasing 4:e860deea161a "e" | |
417 | merging e |
|
417 | merging e | |
418 | transaction abort! |
|
418 | transaction abort! | |
419 | rollback completed |
|
419 | rollback completed | |
420 | hit a merge conflict |
|
420 | hit a merge conflict | |
421 | [1] |
|
421 | [1] | |
422 | $ hg diff |
|
422 | $ hg diff | |
423 | $ hg status |
|
423 | $ hg status | |
424 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
424 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
425 | @ 7:d2c195b28050 test |
|
425 | @ 7:d2c195b28050 test | |
426 | | conflict with e |
|
426 | | conflict with e | |
427 | | |
|
427 | | | |
428 | o 6:baf10c5166d4 test |
|
428 | o 6:baf10c5166d4 test | |
429 | | g |
|
429 | | g | |
430 | | |
|
430 | | | |
431 | o 5:6343ca3eff20 test |
|
431 | o 5:6343ca3eff20 test | |
432 | | f |
|
432 | | f | |
433 | | |
|
433 | | | |
434 | | o 4:e860deea161a test |
|
434 | | o 4:e860deea161a test | |
435 | | | e |
|
435 | | | e | |
436 | | | |
|
436 | | | | |
437 | | o 3:055a42cdd887 test |
|
437 | | o 3:055a42cdd887 test | |
438 | | | d |
|
438 | | | d | |
439 | | | |
|
439 | | | | |
440 | | o 2:177f92b77385 test |
|
440 | | o 2:177f92b77385 test | |
441 | |/ c |
|
441 | |/ c | |
442 | | |
|
442 | | | |
443 | o 1:d2ae7f538514 test |
|
443 | o 1:d2ae7f538514 test | |
444 | | b |
|
444 | | b | |
445 | | |
|
445 | | | |
446 | o 0:cb9a9f314b8b test |
|
446 | o 0:cb9a9f314b8b test | |
447 | a |
|
447 | a | |
448 |
|
448 | |||
449 | Check dryrun working with --collapse when there is conflicts |
|
449 | Check dryrun working with --collapse when there is conflicts | |
450 | $ hg rebase -s 2 -d 7 -n --collapse |
|
450 | $ hg rebase -s 2 -d 7 -n --collapse | |
451 | starting dry-run rebase; repository will not be changed |
|
451 | starting dry-run rebase; repository will not be changed | |
452 | rebasing 2:177f92b77385 "c" |
|
452 | rebasing 2:177f92b77385 "c" | |
453 | rebasing 3:055a42cdd887 "d" |
|
453 | rebasing 3:055a42cdd887 "d" | |
454 | rebasing 4:e860deea161a "e" |
|
454 | rebasing 4:e860deea161a "e" | |
455 | merging e |
|
455 | merging e | |
456 | hit a merge conflict |
|
456 | hit a merge conflict | |
457 | [1] |
|
457 | [1] | |
458 |
|
458 | |||
459 | In-memory rebase that fails due to merge conflicts |
|
459 | In-memory rebase that fails due to merge conflicts | |
460 |
|
460 | |||
461 | $ hg rebase -s 2 -d 7 |
|
461 | $ hg rebase -s 2 -d 7 | |
462 | rebasing 2:177f92b77385 "c" |
|
462 | rebasing 2:177f92b77385 "c" | |
463 | rebasing 3:055a42cdd887 "d" |
|
463 | rebasing 3:055a42cdd887 "d" | |
464 | rebasing 4:e860deea161a "e" |
|
464 | rebasing 4:e860deea161a "e" | |
465 | merging e |
|
465 | merging e | |
466 | transaction abort! |
|
466 | transaction abort! | |
467 | rollback completed |
|
467 | rollback completed | |
468 | hit merge conflicts; re-running rebase without in-memory merge |
|
468 | hit merge conflicts; re-running rebase without in-memory merge | |
469 | rebasing 2:177f92b77385 "c" |
|
469 | rebasing 2:177f92b77385 "c" | |
470 | rebasing 3:055a42cdd887 "d" |
|
470 | rebasing 3:055a42cdd887 "d" | |
471 | rebasing 4:e860deea161a "e" |
|
471 | rebasing 4:e860deea161a "e" | |
472 | merging e |
|
472 | merging e | |
473 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
473 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
474 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
474 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
475 | [1] |
|
475 | [1] | |
476 | $ hg rebase --abort |
|
476 | $ hg rebase --abort | |
477 | saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg |
|
477 | saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg | |
478 | rebase aborted |
|
478 | rebase aborted | |
479 |
|
479 | |||
480 | Retrying without in-memory merge won't lose working copy changes |
|
480 | Retrying without in-memory merge won't lose working copy changes | |
481 | $ cd .. |
|
481 | $ cd .. | |
482 | $ hg clone repo3 repo3-dirty -q |
|
482 | $ hg clone repo3 repo3-dirty -q | |
483 | $ cd repo3-dirty |
|
483 | $ cd repo3-dirty | |
484 | $ echo dirty > a |
|
484 | $ echo dirty > a | |
485 | $ hg rebase -s 2 -d 7 |
|
485 | $ hg rebase -s 2 -d 7 | |
486 | rebasing 2:177f92b77385 "c" |
|
486 | rebasing 2:177f92b77385 "c" | |
487 | rebasing 3:055a42cdd887 "d" |
|
487 | rebasing 3:055a42cdd887 "d" | |
488 | rebasing 4:e860deea161a "e" |
|
488 | rebasing 4:e860deea161a "e" | |
489 | merging e |
|
489 | merging e | |
490 | transaction abort! |
|
490 | transaction abort! | |
491 | rollback completed |
|
491 | rollback completed | |
492 | hit merge conflicts; re-running rebase without in-memory merge |
|
492 | hit merge conflicts; re-running rebase without in-memory merge | |
493 | abort: uncommitted changes |
|
493 | abort: uncommitted changes | |
494 | [255] |
|
494 | [255] | |
495 | $ cat a |
|
495 | $ cat a | |
496 | dirty |
|
496 | dirty | |
497 |
|
497 | |||
498 | Retrying without in-memory merge won't lose merge state |
|
498 | Retrying without in-memory merge won't lose merge state | |
499 | $ cd .. |
|
499 | $ cd .. | |
500 | $ hg clone repo3 repo3-merge-state -q |
|
500 | $ hg clone repo3 repo3-merge-state -q | |
501 | $ cd repo3-merge-state |
|
501 | $ cd repo3-merge-state | |
502 | $ hg merge 4 |
|
502 | $ hg merge 4 | |
503 | merging e |
|
503 | merging e | |
504 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
504 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
505 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
505 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
506 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
506 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
507 | [1] |
|
507 | [1] | |
508 | $ hg resolve -l |
|
508 | $ hg resolve -l | |
509 | U e |
|
509 | U e | |
510 | $ hg rebase -s 2 -d 7 |
|
510 | $ hg rebase -s 2 -d 7 | |
511 | abort: outstanding uncommitted merge |
|
511 | abort: outstanding uncommitted merge | |
512 | (use 'hg commit' or 'hg merge --abort') |
|
512 | (use 'hg commit' or 'hg merge --abort') | |
513 | [255] |
|
513 | [255] | |
514 | $ hg resolve -l |
|
514 | $ hg resolve -l | |
515 | U e |
|
515 | U e | |
516 |
|
516 | |||
517 | ========================== |
|
517 | ========================== | |
518 | Test for --confirm option| |
|
518 | Test for --confirm option| | |
519 | ========================== |
|
519 | ========================== | |
520 | $ cd .. |
|
520 | $ cd .. | |
521 | $ hg clone repo3 repo4 -q |
|
521 | $ hg clone repo3 repo4 -q | |
522 | $ cd repo4 |
|
522 | $ cd repo4 | |
523 | $ hg strip 7 -q |
|
523 | $ hg strip 7 -q | |
524 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
524 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
525 | @ 6:baf10c5166d4 test |
|
525 | @ 6:baf10c5166d4 test | |
526 | | g |
|
526 | | g | |
527 | | |
|
527 | | | |
528 | o 5:6343ca3eff20 test |
|
528 | o 5:6343ca3eff20 test | |
529 | | f |
|
529 | | f | |
530 | | |
|
530 | | | |
531 | | o 4:e860deea161a test |
|
531 | | o 4:e860deea161a test | |
532 | | | e |
|
532 | | | e | |
533 | | | |
|
533 | | | | |
534 | | o 3:055a42cdd887 test |
|
534 | | o 3:055a42cdd887 test | |
535 | | | d |
|
535 | | | d | |
536 | | | |
|
536 | | | | |
537 | | o 2:177f92b77385 test |
|
537 | | o 2:177f92b77385 test | |
538 | |/ c |
|
538 | |/ c | |
539 | | |
|
539 | | | |
540 | o 1:d2ae7f538514 test |
|
540 | o 1:d2ae7f538514 test | |
541 | | b |
|
541 | | b | |
542 | | |
|
542 | | | |
543 | o 0:cb9a9f314b8b test |
|
543 | o 0:cb9a9f314b8b test | |
544 | a |
|
544 | a | |
545 |
|
545 | |||
546 | Check it gives error when both --dryrun and --confirm is used: |
|
546 | Check it gives error when both --dryrun and --confirm is used: | |
547 | $ hg rebase -s 2 -d . --confirm --dry-run |
|
547 | $ hg rebase -s 2 -d . --confirm --dry-run | |
548 | abort: cannot specify both --confirm and --dry-run |
|
548 | abort: cannot specify both --confirm and --dry-run | |
549 | [255] |
|
549 | [255] | |
550 | $ hg rebase -s 2 -d . --confirm --abort |
|
550 | $ hg rebase -s 2 -d . --confirm --abort | |
551 | abort: cannot specify both --abort and --confirm |
|
551 | abort: cannot specify both --abort and --confirm | |
552 | [255] |
|
552 | [255] | |
553 | $ hg rebase -s 2 -d . --confirm --continue |
|
553 | $ hg rebase -s 2 -d . --confirm --continue | |
554 | abort: cannot specify both --continue and --confirm |
|
554 | abort: cannot specify both --continue and --confirm | |
555 | [255] |
|
555 | [255] | |
556 |
|
556 | |||
557 | Test --confirm option when there are no conflicts: |
|
557 | Test --confirm option when there are no conflicts: | |
558 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF |
|
558 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | |
559 | > n |
|
559 | > n | |
560 | > EOF |
|
560 | > EOF | |
561 | starting in-memory rebase |
|
561 | starting in-memory rebase | |
562 | rebasing 2:177f92b77385 "c" |
|
562 | rebasing 2:177f92b77385 "c" | |
563 | rebasing 3:055a42cdd887 "d" |
|
563 | rebasing 3:055a42cdd887 "d" | |
564 | rebasing 4:e860deea161a "e" |
|
564 | rebasing 4:e860deea161a "e" | |
565 | rebase completed successfully |
|
565 | rebase completed successfully | |
566 | apply changes (yn)? n |
|
566 | apply changes (yn)? n | |
567 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
567 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
568 | @ 6:baf10c5166d4 test |
|
568 | @ 6:baf10c5166d4 test | |
569 | | g |
|
569 | | g | |
570 | | |
|
570 | | | |
571 | o 5:6343ca3eff20 test |
|
571 | o 5:6343ca3eff20 test | |
572 | | f |
|
572 | | f | |
573 | | |
|
573 | | | |
574 | | o 4:e860deea161a test |
|
574 | | o 4:e860deea161a test | |
575 | | | e |
|
575 | | | e | |
576 | | | |
|
576 | | | | |
577 | | o 3:055a42cdd887 test |
|
577 | | o 3:055a42cdd887 test | |
578 | | | d |
|
578 | | | d | |
579 | | | |
|
579 | | | | |
580 | | o 2:177f92b77385 test |
|
580 | | o 2:177f92b77385 test | |
581 | |/ c |
|
581 | |/ c | |
582 | | |
|
582 | | | |
583 | o 1:d2ae7f538514 test |
|
583 | o 1:d2ae7f538514 test | |
584 | | b |
|
584 | | b | |
585 | | |
|
585 | | | |
586 | o 0:cb9a9f314b8b test |
|
586 | o 0:cb9a9f314b8b test | |
587 | a |
|
587 | a | |
588 |
|
588 | |||
589 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF |
|
589 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | |
590 | > y |
|
590 | > y | |
591 | > EOF |
|
591 | > EOF | |
592 | starting in-memory rebase |
|
592 | starting in-memory rebase | |
593 | rebasing 2:177f92b77385 "c" |
|
593 | rebasing 2:177f92b77385 "c" | |
594 | rebasing 3:055a42cdd887 "d" |
|
594 | rebasing 3:055a42cdd887 "d" | |
595 | rebasing 4:e860deea161a "e" |
|
595 | rebasing 4:e860deea161a "e" | |
596 | rebase completed successfully |
|
596 | rebase completed successfully | |
597 | apply changes (yn)? y |
|
597 | apply changes (yn)? y | |
598 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
598 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
599 | o 9:9fd28f55f6dc test |
|
599 | o 9:9fd28f55f6dc test | |
600 | | e |
|
600 | | e | |
601 | | |
|
601 | | | |
602 | o 8:12cbf031f469 test |
|
602 | o 8:12cbf031f469 test | |
603 | | d |
|
603 | | d | |
604 | | |
|
604 | | | |
605 | o 7:c83b1da5b1ae test |
|
605 | o 7:c83b1da5b1ae test | |
606 | | c |
|
606 | | c | |
607 | | |
|
607 | | | |
608 | @ 6:baf10c5166d4 test |
|
608 | @ 6:baf10c5166d4 test | |
609 | | g |
|
609 | | g | |
610 | | |
|
610 | | | |
611 | o 5:6343ca3eff20 test |
|
611 | o 5:6343ca3eff20 test | |
612 | | f |
|
612 | | f | |
613 | | |
|
613 | | | |
614 | | o 4:e860deea161a test |
|
614 | | o 4:e860deea161a test | |
615 | | | e |
|
615 | | | e | |
616 | | | |
|
616 | | | | |
617 | | o 3:055a42cdd887 test |
|
617 | | o 3:055a42cdd887 test | |
618 | | | d |
|
618 | | | d | |
619 | | | |
|
619 | | | | |
620 | | o 2:177f92b77385 test |
|
620 | | o 2:177f92b77385 test | |
621 | |/ c |
|
621 | |/ c | |
622 | | |
|
622 | | | |
623 | o 1:d2ae7f538514 test |
|
623 | o 1:d2ae7f538514 test | |
624 | | b |
|
624 | | b | |
625 | | |
|
625 | | | |
626 | o 0:cb9a9f314b8b test |
|
626 | o 0:cb9a9f314b8b test | |
627 | a |
|
627 | a | |
628 |
|
628 | |||
629 | Test --confirm option when there is a conflict |
|
629 | Test --confirm option when there is a conflict | |
630 | $ hg up tip -q |
|
630 | $ hg up tip -q | |
631 | $ echo ee>e |
|
631 | $ echo ee>e | |
632 | $ hg ci --amend -m "conflict with e" -q |
|
632 | $ hg ci --amend -m "conflict with e" -q | |
633 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
633 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
634 | @ 9:906d72f66a59 test |
|
634 | @ 9:906d72f66a59 test | |
635 | | conflict with e |
|
635 | | conflict with e | |
636 | | |
|
636 | | | |
637 | o 8:12cbf031f469 test |
|
637 | o 8:12cbf031f469 test | |
638 | | d |
|
638 | | d | |
639 | | |
|
639 | | | |
640 | o 7:c83b1da5b1ae test |
|
640 | o 7:c83b1da5b1ae test | |
641 | | c |
|
641 | | c | |
642 | | |
|
642 | | | |
643 | o 6:baf10c5166d4 test |
|
643 | o 6:baf10c5166d4 test | |
644 | | g |
|
644 | | g | |
645 | | |
|
645 | | | |
646 | o 5:6343ca3eff20 test |
|
646 | o 5:6343ca3eff20 test | |
647 | | f |
|
647 | | f | |
648 | | |
|
648 | | | |
649 | | o 4:e860deea161a test |
|
649 | | o 4:e860deea161a test | |
650 | | | e |
|
650 | | | e | |
651 | | | |
|
651 | | | | |
652 | | o 3:055a42cdd887 test |
|
652 | | o 3:055a42cdd887 test | |
653 | | | d |
|
653 | | | d | |
654 | | | |
|
654 | | | | |
655 | | o 2:177f92b77385 test |
|
655 | | o 2:177f92b77385 test | |
656 | |/ c |
|
656 | |/ c | |
657 | | |
|
657 | | | |
658 | o 1:d2ae7f538514 test |
|
658 | o 1:d2ae7f538514 test | |
659 | | b |
|
659 | | b | |
660 | | |
|
660 | | | |
661 | o 0:cb9a9f314b8b test |
|
661 | o 0:cb9a9f314b8b test | |
662 | a |
|
662 | a | |
663 |
|
663 | |||
664 | $ hg rebase -s 4 -d . --keep --confirm |
|
664 | $ hg rebase -s 4 -d . --keep --confirm | |
665 | starting in-memory rebase |
|
665 | starting in-memory rebase | |
666 | rebasing 4:e860deea161a "e" |
|
666 | rebasing 4:e860deea161a "e" | |
667 | merging e |
|
667 | merging e | |
668 | hit a merge conflict |
|
668 | hit a merge conflict | |
669 | [1] |
|
669 | [1] | |
670 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
670 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
671 | @ 9:906d72f66a59 test |
|
671 | @ 9:906d72f66a59 test | |
672 | | conflict with e |
|
672 | | conflict with e | |
673 | | |
|
673 | | | |
674 | o 8:12cbf031f469 test |
|
674 | o 8:12cbf031f469 test | |
675 | | d |
|
675 | | d | |
676 | | |
|
676 | | | |
677 | o 7:c83b1da5b1ae test |
|
677 | o 7:c83b1da5b1ae test | |
678 | | c |
|
678 | | c | |
679 | | |
|
679 | | | |
680 | o 6:baf10c5166d4 test |
|
680 | o 6:baf10c5166d4 test | |
681 | | g |
|
681 | | g | |
682 | | |
|
682 | | | |
683 | o 5:6343ca3eff20 test |
|
683 | o 5:6343ca3eff20 test | |
684 | | f |
|
684 | | f | |
685 | | |
|
685 | | | |
686 | | o 4:e860deea161a test |
|
686 | | o 4:e860deea161a test | |
687 | | | e |
|
687 | | | e | |
688 | | | |
|
688 | | | | |
689 | | o 3:055a42cdd887 test |
|
689 | | o 3:055a42cdd887 test | |
690 | | | d |
|
690 | | | d | |
691 | | | |
|
691 | | | | |
692 | | o 2:177f92b77385 test |
|
692 | | o 2:177f92b77385 test | |
693 | |/ c |
|
693 | |/ c | |
694 | | |
|
694 | | | |
695 | o 1:d2ae7f538514 test |
|
695 | o 1:d2ae7f538514 test | |
696 | | b |
|
696 | | b | |
697 | | |
|
697 | | | |
698 | o 0:cb9a9f314b8b test |
|
698 | o 0:cb9a9f314b8b test | |
699 | a |
|
699 | a | |
700 |
|
700 | |||
701 | Test a metadata-only in-memory merge |
|
701 | Test a metadata-only in-memory merge | |
702 | $ cd $TESTTMP |
|
702 | $ cd $TESTTMP | |
703 | $ hg init no_exception |
|
703 | $ hg init no_exception | |
704 | $ cd no_exception |
|
704 | $ cd no_exception | |
705 | # Produce the following graph: |
|
705 | # Produce the following graph: | |
706 | # o 'add +x to foo.txt' |
|
706 | # o 'add +x to foo.txt' | |
707 | # | o r1 (adds bar.txt, just for something to rebase to) |
|
707 | # | o r1 (adds bar.txt, just for something to rebase to) | |
708 | # |/ |
|
708 | # |/ | |
709 | # o r0 (adds foo.txt, no +x) |
|
709 | # o r0 (adds foo.txt, no +x) | |
710 | $ echo hi > foo.txt |
|
710 | $ echo hi > foo.txt | |
711 | $ hg ci -qAm r0 |
|
711 | $ hg ci -qAm r0 | |
712 | $ echo hi > bar.txt |
|
712 | $ echo hi > bar.txt | |
713 | $ hg ci -qAm r1 |
|
713 | $ hg ci -qAm r1 | |
714 | $ hg co -qr ".^" |
|
714 | $ hg co -qr ".^" | |
715 | $ chmod +x foo.txt |
|
715 | $ chmod +x foo.txt | |
716 | $ hg ci -qAm 'add +x to foo.txt' |
|
716 | $ hg ci -qAm 'add +x to foo.txt' | |
717 | issue5960: this was raising an AttributeError exception |
|
717 | issue5960: this was raising an AttributeError exception | |
718 | $ hg rebase -r . -d 1 |
|
718 | $ hg rebase -r . -d 1 | |
719 | rebasing 2:539b93e77479 "add +x to foo.txt" (tip) |
|
719 | rebasing 2:539b93e77479 "add +x to foo.txt" (tip) | |
720 | saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) |
|
720 | saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) | |
721 | $ hg diff -c tip |
|
721 | $ hg diff -c tip | |
722 | diff --git a/foo.txt b/foo.txt |
|
722 | diff --git a/foo.txt b/foo.txt | |
723 | old mode 100644 |
|
723 | old mode 100644 | |
724 | new mode 100755 |
|
724 | new mode 100755 | |
725 |
|
725 | |||
726 | Test rebasing a commit with copy information, but no content changes |
|
726 | Test rebasing a commit with copy information, but no content changes | |
727 |
|
727 | |||
728 | $ cd .. |
|
728 | $ cd .. | |
729 | $ hg clone -q repo1 merge-and-rename |
|
729 | $ hg clone -q repo1 merge-and-rename | |
730 | $ cd merge-and-rename |
|
730 | $ cd merge-and-rename | |
731 | $ cat << EOF >> .hg/hgrc |
|
731 | $ cat << EOF >> .hg/hgrc | |
732 | > [experimental] |
|
732 | > [experimental] | |
733 | > evolution.createmarkers=True |
|
733 | > evolution.createmarkers=True | |
734 | > evolution.allowunstable=True |
|
734 | > evolution.allowunstable=True | |
735 | > EOF |
|
735 | > EOF | |
736 | $ hg co -q 1 |
|
736 | $ hg co -q 1 | |
737 | $ hg mv d e |
|
737 | $ hg mv d e | |
738 | $ hg ci -qm 'rename d to e' |
|
738 | $ hg ci -qm 'rename d to e' | |
739 | $ hg co -q 3 |
|
739 | $ hg co -q 3 | |
740 | $ hg merge -q 4 |
|
740 | $ hg merge -q 4 | |
741 | $ hg ci -m 'merge' |
|
741 | $ hg ci -m 'merge' | |
742 | $ hg co -q 2 |
|
742 | $ hg co -q 2 | |
743 | $ mv d e |
|
743 | $ mv d e | |
744 | $ hg addremove -qs 0 |
|
744 | $ hg addremove -qs 0 | |
745 | $ hg ci -qm 'untracked rename of d to e' |
|
745 | $ hg ci -qm 'untracked rename of d to e' | |
746 | $ hg debugobsolete -q `hg log -T '{node}' -r 4` `hg log -T '{node}' -r .` |
|
746 | $ hg debugobsolete -q `hg log -T '{node}' -r 4` `hg log -T '{node}' -r .` | |
747 | 1 new orphan changesets |
|
747 | 1 new orphan changesets | |
748 | $ hg tglog |
|
748 | $ hg tglog | |
749 | @ 6: 676538af172d 'untracked rename of d to e' |
|
749 | @ 6: 676538af172d 'untracked rename of d to e' | |
750 | | |
|
750 | | | |
751 | | * 5: 574d92ad16fc 'merge' |
|
751 | | * 5: 574d92ad16fc 'merge' | |
752 | | |\ |
|
752 | | |\ | |
753 | | | x 4: 2c8b5dad7956 'rename d to e' |
|
753 | | | x 4: 2c8b5dad7956 'rename d to e' | |
754 | | | | |
|
754 | | | | | |
755 | | o | 3: ca58782ad1e4 'b' |
|
755 | | o | 3: ca58782ad1e4 'b' | |
756 | |/ / |
|
756 | |/ / | |
757 | o / 2: 814f6bd05178 'c' |
|
757 | o / 2: 814f6bd05178 'c' | |
758 | |/ |
|
758 | |/ | |
759 | o 1: 02952614a83d 'd' |
|
759 | o 1: 02952614a83d 'd' | |
760 | | |
|
760 | | | |
761 | o 0: b173517d0057 'a' |
|
761 | o 0: b173517d0057 'a' | |
762 |
|
762 | |||
763 | $ hg rebase -b 5 -d tip |
|
763 | $ hg rebase -b 5 -d tip | |
764 | rebasing 3:ca58782ad1e4 "b" |
|
764 | rebasing 3:ca58782ad1e4 "b" | |
765 | rebasing 5:574d92ad16fc "merge" |
|
765 | rebasing 5:574d92ad16fc "merge" | |
766 | note: not rebasing 5:574d92ad16fc "merge", its destination already has all its changes |
|
766 | note: not rebasing 5:574d92ad16fc "merge", its destination already has all its changes | |
767 |
|
767 | |||
768 | $ cd .. |
|
768 | $ cd .. | |
769 |
|
769 | |||
770 | Test rebasing a commit with copy information |
|
770 | Test rebasing a commit with copy information | |
771 |
|
771 | |||
772 | $ hg init rebase-rename |
|
772 | $ hg init rebase-rename | |
773 | $ cd rebase-rename |
|
773 | $ cd rebase-rename | |
774 | $ echo a > a |
|
774 | $ echo a > a | |
775 | $ hg ci -Aqm 'add a' |
|
775 | $ hg ci -Aqm 'add a' | |
776 | $ echo a2 > a |
|
776 | $ echo a2 > a | |
777 | $ hg ci -m 'modify a' |
|
777 | $ hg ci -m 'modify a' | |
778 | $ hg co -q 0 |
|
778 | $ hg co -q 0 | |
779 | $ hg mv a b |
|
779 | $ hg mv a b | |
780 | $ hg ci -qm 'rename a to b' |
|
780 | $ hg ci -qm 'rename a to b' | |
781 | $ hg rebase -d 1 |
|
781 | $ hg rebase -d 1 | |
782 | rebasing 2:b977edf6f839 "rename a to b" (tip) |
|
782 | rebasing 2:b977edf6f839 "rename a to b" (tip) | |
783 | merging a and b to b |
|
783 | merging a and b to b | |
784 | saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg |
|
784 | saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg | |
785 | $ hg st --copies --change . |
|
785 | $ hg st --copies --change . | |
786 | A b |
|
786 | A b | |
787 | a |
|
787 | a | |
788 | R a |
|
788 | R a | |
789 | $ cd .. |
|
789 | $ cd .. | |
790 |
|
790 | |||
791 | Test rebasing a commit with copy information, where the target is empty |
|
791 | Test rebasing a commit with copy information, where the target is empty | |
792 |
|
792 | |||
793 | $ hg init rebase-rename-empty |
|
793 | $ hg init rebase-rename-empty | |
794 | $ cd rebase-rename-empty |
|
794 | $ cd rebase-rename-empty | |
795 | $ echo a > a |
|
795 | $ echo a > a | |
796 | $ hg ci -Aqm 'add a' |
|
796 | $ hg ci -Aqm 'add a' | |
797 | $ cat > a |
|
797 | $ cat > a | |
798 | $ hg ci -m 'make a empty' |
|
798 | $ hg ci -m 'make a empty' | |
799 | $ hg co -q 0 |
|
799 | $ hg co -q 0 | |
800 | $ hg mv a b |
|
800 | $ hg mv a b | |
801 | $ hg ci -qm 'rename a to b' |
|
801 | $ hg ci -qm 'rename a to b' | |
802 | $ hg rebase -d 1 |
|
802 | $ hg rebase -d 1 | |
803 | rebasing 2:b977edf6f839 "rename a to b" (tip) |
|
803 | rebasing 2:b977edf6f839 "rename a to b" (tip) | |
804 | merging a and b to b |
|
804 | merging a and b to b | |
805 | saved backup bundle to $TESTTMP/rebase-rename-empty/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg |
|
805 | saved backup bundle to $TESTTMP/rebase-rename-empty/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg | |
806 | $ hg st --copies --change . |
|
806 | $ hg st --copies --change . | |
807 | A b |
|
807 | A b | |
808 | a |
|
808 | a | |
809 | R a |
|
809 | R a | |
810 | $ cd .. |
|
810 | $ cd .. | |
811 | Rebase across a copy with --collapse |
|
811 | Rebase across a copy with --collapse | |
812 |
|
812 | |||
813 | $ hg init rebase-rename-collapse |
|
813 | $ hg init rebase-rename-collapse | |
814 | $ cd rebase-rename-collapse |
|
814 | $ cd rebase-rename-collapse | |
815 | $ echo a > a |
|
815 | $ echo a > a | |
816 | $ hg ci -Aqm 'add a' |
|
816 | $ hg ci -Aqm 'add a' | |
817 | $ hg mv a b |
|
817 | $ hg mv a b | |
818 | $ hg ci -m 'rename a to b' |
|
818 | $ hg ci -m 'rename a to b' | |
819 | $ hg co -q 0 |
|
819 | $ hg co -q 0 | |
820 | $ echo a2 > a |
|
820 | $ echo a2 > a | |
821 | $ hg ci -qm 'modify a' |
|
821 | $ hg ci -qm 'modify a' | |
822 | $ hg rebase -r . -d 1 --collapse |
|
822 | $ hg rebase -r . -d 1 --collapse | |
823 | rebasing 2:41c4ea50d4cf "modify a" (tip) |
|
823 | rebasing 2:41c4ea50d4cf "modify a" (tip) | |
824 | merging b and a to b |
|
824 | merging b and a to b | |
825 | saved backup bundle to $TESTTMP/rebase-rename-collapse/.hg/strip-backup/41c4ea50d4cf-b90b7994-rebase.hg |
|
825 | saved backup bundle to $TESTTMP/rebase-rename-collapse/.hg/strip-backup/41c4ea50d4cf-b90b7994-rebase.hg | |
826 | $ cd .. |
|
826 | $ cd .. | |
827 |
|
827 | |||
828 | Test rebasing when the file we are merging in destination is empty |
|
828 | Test rebasing when the file we are merging in destination is empty | |
829 |
|
829 | |||
830 | $ hg init test |
|
830 | $ hg init test | |
831 | $ cd test |
|
831 | $ cd test | |
832 | $ echo a > foo |
|
832 | $ echo a > foo | |
833 | $ hg ci -Aqm 'added a to foo' |
|
833 | $ hg ci -Aqm 'added a to foo' | |
834 |
|
834 | |||
835 | $ rm foo |
|
835 | $ rm foo | |
836 | $ touch foo |
|
836 | $ touch foo | |
837 | $ hg di |
|
837 | $ hg di | |
838 | diff --git a/foo b/foo |
|
838 | diff --git a/foo b/foo | |
839 | --- a/foo |
|
839 | --- a/foo | |
840 | +++ b/foo |
|
840 | +++ b/foo | |
841 | @@ -1,1 +0,0 @@ |
|
841 | @@ -1,1 +0,0 @@ | |
842 | -a |
|
842 | -a | |
843 |
|
843 | |||
844 | $ hg ci -m "make foo an empty file" |
|
844 | $ hg ci -m "make foo an empty file" | |
845 |
|
845 | |||
846 | $ hg up '.^' |
|
846 | $ hg up '.^' | |
847 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
847 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
848 | $ echo b > foo |
|
848 | $ echo b > foo | |
849 | $ hg di |
|
849 | $ hg di | |
850 | diff --git a/foo b/foo |
|
850 | diff --git a/foo b/foo | |
851 | --- a/foo |
|
851 | --- a/foo | |
852 | +++ b/foo |
|
852 | +++ b/foo | |
853 | @@ -1,1 +1,1 @@ |
|
853 | @@ -1,1 +1,1 @@ | |
854 | -a |
|
854 | -a | |
855 | +b |
|
855 | +b | |
856 | $ hg ci -m "add b to foo" |
|
856 | $ hg ci -m "add b to foo" | |
857 | created new head |
|
857 | created new head | |
858 |
|
858 | |||
859 | $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 |
|
859 | $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 | |
860 | rebasing 2:fb62b706688e "add b to foo" (tip) |
|
860 | rebasing 2:fb62b706688e "add b to foo" (tip) | |
861 | merging foo |
|
861 | merging foo | |
862 | hit merge conflicts; re-running rebase without in-memory merge |
|
862 | hit merge conflicts; re-running rebase without in-memory merge | |
863 | rebasing 2:fb62b706688e "add b to foo" (tip) |
|
863 | rebasing 2:fb62b706688e "add b to foo" (tip) | |
864 | merging foo |
|
864 | merging foo | |
865 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
865 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
866 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
866 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
867 | [1] |
|
867 | [1] | |
868 |
|
868 | |||
869 | $ cd $TESTTMP |
|
869 | $ cd $TESTTMP | |
870 |
|
870 | |||
871 | Test rebasing when we're in the middle of a rebase already |
|
871 | Test rebasing when we're in the middle of a rebase already | |
872 | $ hg init test_issue6214 |
|
872 | $ hg init test_issue6214 | |
873 | $ cd test_issue6214 |
|
873 | $ cd test_issue6214 | |
874 | $ echo r0 > r0 |
|
874 | $ echo r0 > r0 | |
875 | $ hg ci -qAm 'r0' |
|
875 | $ hg ci -qAm 'r0' | |
876 | $ echo hi > foo |
|
876 | $ echo hi > foo | |
877 | $ hg ci -qAm 'hi from foo' |
|
877 | $ hg ci -qAm 'hi from foo' | |
878 | $ hg co -q '.^' |
|
878 | $ hg co -q '.^' | |
879 | $ echo bye > foo |
|
879 | $ echo bye > foo | |
880 | $ hg ci -qAm 'bye from foo' |
|
880 | $ hg ci -qAm 'bye from foo' | |
881 | $ hg co -q '.^' |
|
881 | $ hg co -q '.^' | |
882 | $ echo unrelated > some_other_file |
|
882 | $ echo unrelated > some_other_file | |
883 | $ hg ci -qAm 'some unrelated changes' |
|
883 | $ hg ci -qAm 'some unrelated changes' | |
884 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' |
|
884 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' | |
885 | @ 3: some unrelated changes |
|
885 | @ 3: some unrelated changes | |
886 | | some_other_file |
|
886 | | some_other_file | |
887 | | o 2: bye from foo |
|
887 | | o 2: bye from foo | |
888 | |/ foo |
|
888 | |/ foo | |
889 | | o 1: hi from foo |
|
889 | | o 1: hi from foo | |
890 | |/ foo |
|
890 | |/ foo | |
891 | o 0: r0 |
|
891 | o 0: r0 | |
892 | r0 |
|
892 | r0 | |
893 | $ hg rebase -r 2 -d 1 -t:merge3 |
|
893 | $ hg rebase -r 2 -d 1 -t:merge3 | |
894 | rebasing 2:b4d249fbf8dd "bye from foo" |
|
894 | rebasing 2:b4d249fbf8dd "bye from foo" | |
895 | merging foo |
|
895 | merging foo | |
896 | hit merge conflicts; re-running rebase without in-memory merge |
|
896 | hit merge conflicts; re-running rebase without in-memory merge | |
897 | rebasing 2:b4d249fbf8dd "bye from foo" |
|
897 | rebasing 2:b4d249fbf8dd "bye from foo" | |
898 | merging foo |
|
898 | merging foo | |
899 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
899 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
900 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
900 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
901 | [1] |
|
901 | [1] | |
902 | $ hg rebase -r 3 -d 1 -t:merge3 |
|
902 | $ hg rebase -r 3 -d 1 -t:merge3 | |
903 | abort: rebase in progress |
|
903 | abort: rebase in progress | |
904 | (use 'hg rebase --continue' or 'hg rebase --abort') |
|
904 | (use 'hg rebase --continue' or 'hg rebase --abort') | |
905 | [255] |
|
905 | [255] | |
906 | $ hg resolve --list |
|
906 | $ hg resolve --list | |
907 | U foo |
|
907 | U foo | |
908 | $ hg resolve --all --re-merge -t:other |
|
908 | $ hg resolve --all --re-merge -t:other | |
909 | (no more unresolved files) |
|
909 | (no more unresolved files) | |
910 | continue: hg rebase --continue |
|
910 | continue: hg rebase --continue | |
911 | $ hg rebase --continue |
|
911 | $ hg rebase --continue | |
912 | rebasing 2:b4d249fbf8dd "bye from foo" |
|
912 | rebasing 2:b4d249fbf8dd "bye from foo" | |
913 | saved backup bundle to $TESTTMP/test_issue6214/.hg/strip-backup/b4d249fbf8dd-299ec25c-rebase.hg |
|
913 | saved backup bundle to $TESTTMP/test_issue6214/.hg/strip-backup/b4d249fbf8dd-299ec25c-rebase.hg | |
914 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' |
|
914 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' | |
915 | o 3: bye from foo |
|
915 | o 3: bye from foo | |
916 | | foo |
|
916 | | foo | |
917 | | @ 2: some unrelated changes |
|
917 | | @ 2: some unrelated changes | |
918 | | | some_other_file |
|
918 | | | some_other_file | |
919 | o | 1: hi from foo |
|
919 | o | 1: hi from foo | |
920 | |/ foo |
|
920 | |/ foo | |
921 | o 0: r0 |
|
921 | o 0: r0 | |
922 | r0 |
|
922 | r0 | |
|
923 | ||||
|
924 | $ cd .. | |||
|
925 | ||||
|
926 | Changesets that become empty should not be committed. Merges are not empty by | |||
|
927 | definition. | |||
|
928 | ||||
|
929 | $ hg init keep_merge | |||
|
930 | $ cd keep_merge | |||
|
931 | $ echo base > base; hg add base; hg ci -m base | |||
|
932 | $ echo test > test; hg add test; hg ci -m a | |||
|
933 | $ hg up 0 -q | |||
|
934 | $ echo test > test; hg add test; hg ci -m b -q | |||
|
935 | $ hg up 0 -q | |||
|
936 | $ echo test > test; hg add test; hg ci -m c -q | |||
|
937 | $ hg up 1 -q | |||
|
938 | $ hg merge 2 -q | |||
|
939 | $ hg ci -m merge | |||
|
940 | $ hg up null -q | |||
|
941 | $ hg tglog | |||
|
942 | o 4: 59c8292117b1 'merge' | |||
|
943 | |\ | |||
|
944 | | | o 3: 531f80391e4a 'c' | |||
|
945 | | | | | |||
|
946 | | o | 2: 0194f1db184a 'b' | |||
|
947 | | |/ | |||
|
948 | o / 1: 6f252845ea45 'a' | |||
|
949 | |/ | |||
|
950 | o 0: d20a80d4def3 'base' | |||
|
951 | ||||
|
952 | FIXME: It's broken for inmemory merges. | |||
|
953 | $ hg rebase -s 2 -d 3 | |||
|
954 | rebasing 2:0194f1db184a "b" | |||
|
955 | note: not rebasing 2:0194f1db184a "b", its destination already has all its changes | |||
|
956 | rebasing 4:59c8292117b1 "merge" (tip) | |||
|
957 | note: not rebasing 4:59c8292117b1 "merge" (tip), its destination already has all its changes (true !) | |||
|
958 | saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg | |||
|
959 | #if false | |||
|
960 | $ hg tglog | |||
|
961 | o 3: 506e2454484b 'merge' | |||
|
962 | |\ | |||
|
963 | | o 2: 531f80391e4a 'c' | |||
|
964 | | | | |||
|
965 | o | 1: 6f252845ea45 'a' | |||
|
966 | |/ | |||
|
967 | o 0: d20a80d4def3 'base' | |||
|
968 | ||||
|
969 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now