Show More
@@ -1,974 +1,982 | |||||
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 | hit a merge conflict |
|
418 | hit a merge conflict | |
419 | [1] |
|
419 | [1] | |
420 | $ hg diff |
|
420 | $ hg diff | |
421 | $ hg status |
|
421 | $ hg status | |
422 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
422 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
423 | @ 7:d2c195b28050 test |
|
423 | @ 7:d2c195b28050 test | |
424 | | conflict with e |
|
424 | | conflict with e | |
425 | | |
|
425 | | | |
426 | o 6:baf10c5166d4 test |
|
426 | o 6:baf10c5166d4 test | |
427 | | g |
|
427 | | g | |
428 | | |
|
428 | | | |
429 | o 5:6343ca3eff20 test |
|
429 | o 5:6343ca3eff20 test | |
430 | | f |
|
430 | | f | |
431 | | |
|
431 | | | |
432 | | o 4:e860deea161a test |
|
432 | | o 4:e860deea161a test | |
433 | | | e |
|
433 | | | e | |
434 | | | |
|
434 | | | | |
435 | | o 3:055a42cdd887 test |
|
435 | | o 3:055a42cdd887 test | |
436 | | | d |
|
436 | | | d | |
437 | | | |
|
437 | | | | |
438 | | o 2:177f92b77385 test |
|
438 | | o 2:177f92b77385 test | |
439 | |/ c |
|
439 | |/ c | |
440 | | |
|
440 | | | |
441 | o 1:d2ae7f538514 test |
|
441 | o 1:d2ae7f538514 test | |
442 | | b |
|
442 | | b | |
443 | | |
|
443 | | | |
444 | o 0:cb9a9f314b8b test |
|
444 | o 0:cb9a9f314b8b test | |
445 | a |
|
445 | a | |
446 |
|
446 | |||
447 | Check dryrun working with --collapse when there is conflicts |
|
447 | Check dryrun working with --collapse when there is conflicts | |
448 | $ hg rebase -s 2 -d 7 -n --collapse |
|
448 | $ hg rebase -s 2 -d 7 -n --collapse | |
449 | starting dry-run rebase; repository will not be changed |
|
449 | starting dry-run rebase; repository will not be changed | |
450 | rebasing 2:177f92b77385 "c" |
|
450 | rebasing 2:177f92b77385 "c" | |
451 | rebasing 3:055a42cdd887 "d" |
|
451 | rebasing 3:055a42cdd887 "d" | |
452 | rebasing 4:e860deea161a "e" |
|
452 | rebasing 4:e860deea161a "e" | |
453 | merging e |
|
453 | merging e | |
454 | hit a merge conflict |
|
454 | hit a merge conflict | |
455 | [1] |
|
455 | [1] | |
456 |
|
456 | |||
457 | In-memory rebase that fails due to merge conflicts |
|
457 | In-memory rebase that fails due to merge conflicts | |
458 |
|
458 | |||
459 | $ hg rebase -s 2 -d 7 |
|
459 | $ hg rebase -s 2 -d 7 | |
460 | rebasing 2:177f92b77385 "c" |
|
460 | rebasing 2:177f92b77385 "c" | |
461 | rebasing 3:055a42cdd887 "d" |
|
461 | rebasing 3:055a42cdd887 "d" | |
462 | rebasing 4:e860deea161a "e" |
|
462 | rebasing 4:e860deea161a "e" | |
463 | merging e |
|
463 | merging e | |
464 | hit merge conflicts; rebasing that commit again in the working copy |
|
464 | hit merge conflicts; rebasing that commit again in the working copy | |
465 | merging e |
|
465 | merging e | |
466 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
466 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
467 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
467 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
468 | [1] |
|
468 | [1] | |
469 | $ hg rebase --abort |
|
469 | $ hg rebase --abort | |
470 | saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg |
|
470 | saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg | |
471 | rebase aborted |
|
471 | rebase aborted | |
472 |
|
472 | |||
473 | Retrying without in-memory merge won't lose working copy changes |
|
473 | Retrying without in-memory merge won't lose working copy changes | |
474 | $ cd .. |
|
474 | $ cd .. | |
475 | $ hg clone repo3 repo3-dirty -q |
|
475 | $ hg clone repo3 repo3-dirty -q | |
476 | $ cd repo3-dirty |
|
476 | $ cd repo3-dirty | |
477 | $ echo dirty > a |
|
477 | $ echo dirty > a | |
478 | $ hg rebase -s 2 -d 7 |
|
478 | $ hg rebase -s 2 -d 7 | |
479 | rebasing 2:177f92b77385 "c" |
|
479 | rebasing 2:177f92b77385 "c" | |
480 | rebasing 3:055a42cdd887 "d" |
|
480 | rebasing 3:055a42cdd887 "d" | |
481 | rebasing 4:e860deea161a "e" |
|
481 | rebasing 4:e860deea161a "e" | |
482 | merging e |
|
482 | merging e | |
483 | hit merge conflicts; rebasing that commit again in the working copy |
|
483 | hit merge conflicts; rebasing that commit again in the working copy | |
484 | transaction abort! |
|
484 | transaction abort! | |
485 | rollback completed |
|
485 | rollback completed | |
486 | abort: uncommitted changes |
|
486 | abort: uncommitted changes | |
487 | [255] |
|
487 | [255] | |
488 | $ cat a |
|
488 | $ cat a | |
489 | dirty |
|
489 | dirty | |
|
490 | $ hg status -v | |||
|
491 | M a | |||
|
492 | # The repository is in an unfinished *rebase* state. | |||
|
493 | ||||
|
494 | # To continue: hg rebase --continue | |||
|
495 | # To abort: hg rebase --abort | |||
|
496 | # To stop: hg rebase --stop | |||
|
497 | ||||
490 |
|
498 | |||
491 | Retrying without in-memory merge won't lose merge state |
|
499 | Retrying without in-memory merge won't lose merge state | |
492 | $ cd .. |
|
500 | $ cd .. | |
493 | $ hg clone repo3 repo3-merge-state -q |
|
501 | $ hg clone repo3 repo3-merge-state -q | |
494 | $ cd repo3-merge-state |
|
502 | $ cd repo3-merge-state | |
495 | $ hg merge 4 |
|
503 | $ hg merge 4 | |
496 | merging e |
|
504 | merging e | |
497 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
505 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
498 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
506 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
499 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
507 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
500 | [1] |
|
508 | [1] | |
501 | $ hg resolve -l |
|
509 | $ hg resolve -l | |
502 | U e |
|
510 | U e | |
503 | $ hg rebase -s 2 -d 7 |
|
511 | $ hg rebase -s 2 -d 7 | |
504 | abort: outstanding uncommitted merge |
|
512 | abort: outstanding uncommitted merge | |
505 | (use 'hg commit' or 'hg merge --abort') |
|
513 | (use 'hg commit' or 'hg merge --abort') | |
506 | [255] |
|
514 | [255] | |
507 | $ hg resolve -l |
|
515 | $ hg resolve -l | |
508 | U e |
|
516 | U e | |
509 |
|
517 | |||
510 | ========================== |
|
518 | ========================== | |
511 | Test for --confirm option| |
|
519 | Test for --confirm option| | |
512 | ========================== |
|
520 | ========================== | |
513 | $ cd .. |
|
521 | $ cd .. | |
514 | $ hg clone repo3 repo4 -q |
|
522 | $ hg clone repo3 repo4 -q | |
515 | $ cd repo4 |
|
523 | $ cd repo4 | |
516 | $ hg strip 7 -q |
|
524 | $ hg strip 7 -q | |
517 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
525 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
518 | @ 6:baf10c5166d4 test |
|
526 | @ 6:baf10c5166d4 test | |
519 | | g |
|
527 | | g | |
520 | | |
|
528 | | | |
521 | o 5:6343ca3eff20 test |
|
529 | o 5:6343ca3eff20 test | |
522 | | f |
|
530 | | f | |
523 | | |
|
531 | | | |
524 | | o 4:e860deea161a test |
|
532 | | o 4:e860deea161a test | |
525 | | | e |
|
533 | | | e | |
526 | | | |
|
534 | | | | |
527 | | o 3:055a42cdd887 test |
|
535 | | o 3:055a42cdd887 test | |
528 | | | d |
|
536 | | | d | |
529 | | | |
|
537 | | | | |
530 | | o 2:177f92b77385 test |
|
538 | | o 2:177f92b77385 test | |
531 | |/ c |
|
539 | |/ c | |
532 | | |
|
540 | | | |
533 | o 1:d2ae7f538514 test |
|
541 | o 1:d2ae7f538514 test | |
534 | | b |
|
542 | | b | |
535 | | |
|
543 | | | |
536 | o 0:cb9a9f314b8b test |
|
544 | o 0:cb9a9f314b8b test | |
537 | a |
|
545 | a | |
538 |
|
546 | |||
539 | Check it gives error when both --dryrun and --confirm is used: |
|
547 | Check it gives error when both --dryrun and --confirm is used: | |
540 | $ hg rebase -s 2 -d . --confirm --dry-run |
|
548 | $ hg rebase -s 2 -d . --confirm --dry-run | |
541 | abort: cannot specify both --confirm and --dry-run |
|
549 | abort: cannot specify both --confirm and --dry-run | |
542 | [255] |
|
550 | [255] | |
543 | $ hg rebase -s 2 -d . --confirm --abort |
|
551 | $ hg rebase -s 2 -d . --confirm --abort | |
544 | abort: cannot specify both --abort and --confirm |
|
552 | abort: cannot specify both --abort and --confirm | |
545 | [255] |
|
553 | [255] | |
546 | $ hg rebase -s 2 -d . --confirm --continue |
|
554 | $ hg rebase -s 2 -d . --confirm --continue | |
547 | abort: cannot specify both --continue and --confirm |
|
555 | abort: cannot specify both --continue and --confirm | |
548 | [255] |
|
556 | [255] | |
549 |
|
557 | |||
550 | Test --confirm option when there are no conflicts: |
|
558 | Test --confirm option when there are no conflicts: | |
551 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF |
|
559 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | |
552 | > n |
|
560 | > n | |
553 | > EOF |
|
561 | > EOF | |
554 | starting in-memory rebase |
|
562 | starting in-memory rebase | |
555 | rebasing 2:177f92b77385 "c" |
|
563 | rebasing 2:177f92b77385 "c" | |
556 | rebasing 3:055a42cdd887 "d" |
|
564 | rebasing 3:055a42cdd887 "d" | |
557 | rebasing 4:e860deea161a "e" |
|
565 | rebasing 4:e860deea161a "e" | |
558 | rebase completed successfully |
|
566 | rebase completed successfully | |
559 | apply changes (yn)? n |
|
567 | apply changes (yn)? n | |
560 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
568 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
561 | @ 6:baf10c5166d4 test |
|
569 | @ 6:baf10c5166d4 test | |
562 | | g |
|
570 | | g | |
563 | | |
|
571 | | | |
564 | o 5:6343ca3eff20 test |
|
572 | o 5:6343ca3eff20 test | |
565 | | f |
|
573 | | f | |
566 | | |
|
574 | | | |
567 | | o 4:e860deea161a test |
|
575 | | o 4:e860deea161a test | |
568 | | | e |
|
576 | | | e | |
569 | | | |
|
577 | | | | |
570 | | o 3:055a42cdd887 test |
|
578 | | o 3:055a42cdd887 test | |
571 | | | d |
|
579 | | | d | |
572 | | | |
|
580 | | | | |
573 | | o 2:177f92b77385 test |
|
581 | | o 2:177f92b77385 test | |
574 | |/ c |
|
582 | |/ c | |
575 | | |
|
583 | | | |
576 | o 1:d2ae7f538514 test |
|
584 | o 1:d2ae7f538514 test | |
577 | | b |
|
585 | | b | |
578 | | |
|
586 | | | |
579 | o 0:cb9a9f314b8b test |
|
587 | o 0:cb9a9f314b8b test | |
580 | a |
|
588 | a | |
581 |
|
589 | |||
582 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF |
|
590 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | |
583 | > y |
|
591 | > y | |
584 | > EOF |
|
592 | > EOF | |
585 | starting in-memory rebase |
|
593 | starting in-memory rebase | |
586 | rebasing 2:177f92b77385 "c" |
|
594 | rebasing 2:177f92b77385 "c" | |
587 | rebasing 3:055a42cdd887 "d" |
|
595 | rebasing 3:055a42cdd887 "d" | |
588 | rebasing 4:e860deea161a "e" |
|
596 | rebasing 4:e860deea161a "e" | |
589 | rebase completed successfully |
|
597 | rebase completed successfully | |
590 | apply changes (yn)? y |
|
598 | apply changes (yn)? y | |
591 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
599 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
592 | o 9:9fd28f55f6dc test |
|
600 | o 9:9fd28f55f6dc test | |
593 | | e |
|
601 | | e | |
594 | | |
|
602 | | | |
595 | o 8:12cbf031f469 test |
|
603 | o 8:12cbf031f469 test | |
596 | | d |
|
604 | | d | |
597 | | |
|
605 | | | |
598 | o 7:c83b1da5b1ae test |
|
606 | o 7:c83b1da5b1ae test | |
599 | | c |
|
607 | | c | |
600 | | |
|
608 | | | |
601 | @ 6:baf10c5166d4 test |
|
609 | @ 6:baf10c5166d4 test | |
602 | | g |
|
610 | | g | |
603 | | |
|
611 | | | |
604 | o 5:6343ca3eff20 test |
|
612 | o 5:6343ca3eff20 test | |
605 | | f |
|
613 | | f | |
606 | | |
|
614 | | | |
607 | | o 4:e860deea161a test |
|
615 | | o 4:e860deea161a test | |
608 | | | e |
|
616 | | | e | |
609 | | | |
|
617 | | | | |
610 | | o 3:055a42cdd887 test |
|
618 | | o 3:055a42cdd887 test | |
611 | | | d |
|
619 | | | d | |
612 | | | |
|
620 | | | | |
613 | | o 2:177f92b77385 test |
|
621 | | o 2:177f92b77385 test | |
614 | |/ c |
|
622 | |/ c | |
615 | | |
|
623 | | | |
616 | o 1:d2ae7f538514 test |
|
624 | o 1:d2ae7f538514 test | |
617 | | b |
|
625 | | b | |
618 | | |
|
626 | | | |
619 | o 0:cb9a9f314b8b test |
|
627 | o 0:cb9a9f314b8b test | |
620 | a |
|
628 | a | |
621 |
|
629 | |||
622 | Test --confirm option when there is a conflict |
|
630 | Test --confirm option when there is a conflict | |
623 | $ hg up tip -q |
|
631 | $ hg up tip -q | |
624 | $ echo ee>e |
|
632 | $ echo ee>e | |
625 | $ hg ci --amend -m "conflict with e" -q |
|
633 | $ hg ci --amend -m "conflict with e" -q | |
626 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
634 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
627 | @ 9:906d72f66a59 test |
|
635 | @ 9:906d72f66a59 test | |
628 | | conflict with e |
|
636 | | conflict with e | |
629 | | |
|
637 | | | |
630 | o 8:12cbf031f469 test |
|
638 | o 8:12cbf031f469 test | |
631 | | d |
|
639 | | d | |
632 | | |
|
640 | | | |
633 | o 7:c83b1da5b1ae test |
|
641 | o 7:c83b1da5b1ae test | |
634 | | c |
|
642 | | c | |
635 | | |
|
643 | | | |
636 | o 6:baf10c5166d4 test |
|
644 | o 6:baf10c5166d4 test | |
637 | | g |
|
645 | | g | |
638 | | |
|
646 | | | |
639 | o 5:6343ca3eff20 test |
|
647 | o 5:6343ca3eff20 test | |
640 | | f |
|
648 | | f | |
641 | | |
|
649 | | | |
642 | | o 4:e860deea161a test |
|
650 | | o 4:e860deea161a test | |
643 | | | e |
|
651 | | | e | |
644 | | | |
|
652 | | | | |
645 | | o 3:055a42cdd887 test |
|
653 | | o 3:055a42cdd887 test | |
646 | | | d |
|
654 | | | d | |
647 | | | |
|
655 | | | | |
648 | | o 2:177f92b77385 test |
|
656 | | o 2:177f92b77385 test | |
649 | |/ c |
|
657 | |/ c | |
650 | | |
|
658 | | | |
651 | o 1:d2ae7f538514 test |
|
659 | o 1:d2ae7f538514 test | |
652 | | b |
|
660 | | b | |
653 | | |
|
661 | | | |
654 | o 0:cb9a9f314b8b test |
|
662 | o 0:cb9a9f314b8b test | |
655 | a |
|
663 | a | |
656 |
|
664 | |||
657 | $ hg rebase -s 4 -d . --keep --confirm |
|
665 | $ hg rebase -s 4 -d . --keep --confirm | |
658 | starting in-memory rebase |
|
666 | starting in-memory rebase | |
659 | rebasing 4:e860deea161a "e" |
|
667 | rebasing 4:e860deea161a "e" | |
660 | merging e |
|
668 | merging e | |
661 | hit a merge conflict |
|
669 | hit a merge conflict | |
662 | [1] |
|
670 | [1] | |
663 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
671 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
664 | @ 9:906d72f66a59 test |
|
672 | @ 9:906d72f66a59 test | |
665 | | conflict with e |
|
673 | | conflict with e | |
666 | | |
|
674 | | | |
667 | o 8:12cbf031f469 test |
|
675 | o 8:12cbf031f469 test | |
668 | | d |
|
676 | | d | |
669 | | |
|
677 | | | |
670 | o 7:c83b1da5b1ae test |
|
678 | o 7:c83b1da5b1ae test | |
671 | | c |
|
679 | | c | |
672 | | |
|
680 | | | |
673 | o 6:baf10c5166d4 test |
|
681 | o 6:baf10c5166d4 test | |
674 | | g |
|
682 | | g | |
675 | | |
|
683 | | | |
676 | o 5:6343ca3eff20 test |
|
684 | o 5:6343ca3eff20 test | |
677 | | f |
|
685 | | f | |
678 | | |
|
686 | | | |
679 | | o 4:e860deea161a test |
|
687 | | o 4:e860deea161a test | |
680 | | | e |
|
688 | | | e | |
681 | | | |
|
689 | | | | |
682 | | o 3:055a42cdd887 test |
|
690 | | o 3:055a42cdd887 test | |
683 | | | d |
|
691 | | | d | |
684 | | | |
|
692 | | | | |
685 | | o 2:177f92b77385 test |
|
693 | | o 2:177f92b77385 test | |
686 | |/ c |
|
694 | |/ c | |
687 | | |
|
695 | | | |
688 | o 1:d2ae7f538514 test |
|
696 | o 1:d2ae7f538514 test | |
689 | | b |
|
697 | | b | |
690 | | |
|
698 | | | |
691 | o 0:cb9a9f314b8b test |
|
699 | o 0:cb9a9f314b8b test | |
692 | a |
|
700 | a | |
693 |
|
701 | |||
694 | Test a metadata-only in-memory merge |
|
702 | Test a metadata-only in-memory merge | |
695 | $ cd $TESTTMP |
|
703 | $ cd $TESTTMP | |
696 | $ hg init no_exception |
|
704 | $ hg init no_exception | |
697 | $ cd no_exception |
|
705 | $ cd no_exception | |
698 | # Produce the following graph: |
|
706 | # Produce the following graph: | |
699 | # o 'add +x to foo.txt' |
|
707 | # o 'add +x to foo.txt' | |
700 | # | o r1 (adds bar.txt, just for something to rebase to) |
|
708 | # | o r1 (adds bar.txt, just for something to rebase to) | |
701 | # |/ |
|
709 | # |/ | |
702 | # o r0 (adds foo.txt, no +x) |
|
710 | # o r0 (adds foo.txt, no +x) | |
703 | $ echo hi > foo.txt |
|
711 | $ echo hi > foo.txt | |
704 | $ hg ci -qAm r0 |
|
712 | $ hg ci -qAm r0 | |
705 | $ echo hi > bar.txt |
|
713 | $ echo hi > bar.txt | |
706 | $ hg ci -qAm r1 |
|
714 | $ hg ci -qAm r1 | |
707 | $ hg co -qr ".^" |
|
715 | $ hg co -qr ".^" | |
708 | $ chmod +x foo.txt |
|
716 | $ chmod +x foo.txt | |
709 | $ hg ci -qAm 'add +x to foo.txt' |
|
717 | $ hg ci -qAm 'add +x to foo.txt' | |
710 | issue5960: this was raising an AttributeError exception |
|
718 | issue5960: this was raising an AttributeError exception | |
711 | $ hg rebase -r . -d 1 |
|
719 | $ hg rebase -r . -d 1 | |
712 | rebasing 2:539b93e77479 "add +x to foo.txt" (tip) |
|
720 | rebasing 2:539b93e77479 "add +x to foo.txt" (tip) | |
713 | saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) |
|
721 | saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) | |
714 | $ hg diff -c tip |
|
722 | $ hg diff -c tip | |
715 | diff --git a/foo.txt b/foo.txt |
|
723 | diff --git a/foo.txt b/foo.txt | |
716 | old mode 100644 |
|
724 | old mode 100644 | |
717 | new mode 100755 |
|
725 | new mode 100755 | |
718 |
|
726 | |||
719 | Test rebasing a commit with copy information, but no content changes |
|
727 | Test rebasing a commit with copy information, but no content changes | |
720 |
|
728 | |||
721 | $ cd .. |
|
729 | $ cd .. | |
722 | $ hg clone -q repo1 merge-and-rename |
|
730 | $ hg clone -q repo1 merge-and-rename | |
723 | $ cd merge-and-rename |
|
731 | $ cd merge-and-rename | |
724 | $ cat << EOF >> .hg/hgrc |
|
732 | $ cat << EOF >> .hg/hgrc | |
725 | > [experimental] |
|
733 | > [experimental] | |
726 | > evolution.createmarkers=True |
|
734 | > evolution.createmarkers=True | |
727 | > evolution.allowunstable=True |
|
735 | > evolution.allowunstable=True | |
728 | > EOF |
|
736 | > EOF | |
729 | $ hg co -q 1 |
|
737 | $ hg co -q 1 | |
730 | $ hg mv d e |
|
738 | $ hg mv d e | |
731 | $ hg ci -qm 'rename d to e' |
|
739 | $ hg ci -qm 'rename d to e' | |
732 | $ hg co -q 3 |
|
740 | $ hg co -q 3 | |
733 | $ hg merge -q 4 |
|
741 | $ hg merge -q 4 | |
734 | $ hg ci -m 'merge' |
|
742 | $ hg ci -m 'merge' | |
735 | $ hg co -q 2 |
|
743 | $ hg co -q 2 | |
736 | $ mv d e |
|
744 | $ mv d e | |
737 | $ hg addremove -qs 0 |
|
745 | $ hg addremove -qs 0 | |
738 | $ hg ci -qm 'untracked rename of d to e' |
|
746 | $ hg ci -qm 'untracked rename of d to e' | |
739 | $ hg debugobsolete -q `hg log -T '{node}' -r 4` `hg log -T '{node}' -r .` |
|
747 | $ hg debugobsolete -q `hg log -T '{node}' -r 4` `hg log -T '{node}' -r .` | |
740 | 1 new orphan changesets |
|
748 | 1 new orphan changesets | |
741 | $ hg tglog |
|
749 | $ hg tglog | |
742 | @ 6: 676538af172d 'untracked rename of d to e' |
|
750 | @ 6: 676538af172d 'untracked rename of d to e' | |
743 | | |
|
751 | | | |
744 | | * 5: 574d92ad16fc 'merge' |
|
752 | | * 5: 574d92ad16fc 'merge' | |
745 | | |\ |
|
753 | | |\ | |
746 | | | x 4: 2c8b5dad7956 'rename d to e' |
|
754 | | | x 4: 2c8b5dad7956 'rename d to e' | |
747 | | | | |
|
755 | | | | | |
748 | | o | 3: ca58782ad1e4 'b' |
|
756 | | o | 3: ca58782ad1e4 'b' | |
749 | |/ / |
|
757 | |/ / | |
750 | o / 2: 814f6bd05178 'c' |
|
758 | o / 2: 814f6bd05178 'c' | |
751 | |/ |
|
759 | |/ | |
752 | o 1: 02952614a83d 'd' |
|
760 | o 1: 02952614a83d 'd' | |
753 | | |
|
761 | | | |
754 | o 0: b173517d0057 'a' |
|
762 | o 0: b173517d0057 'a' | |
755 |
|
763 | |||
756 | $ hg rebase -b 5 -d tip |
|
764 | $ hg rebase -b 5 -d tip | |
757 | rebasing 3:ca58782ad1e4 "b" |
|
765 | rebasing 3:ca58782ad1e4 "b" | |
758 | rebasing 5:574d92ad16fc "merge" |
|
766 | rebasing 5:574d92ad16fc "merge" | |
759 | note: not rebasing 5:574d92ad16fc "merge", its destination already has all its changes |
|
767 | note: not rebasing 5:574d92ad16fc "merge", its destination already has all its changes | |
760 |
|
768 | |||
761 | $ cd .. |
|
769 | $ cd .. | |
762 |
|
770 | |||
763 | Test rebasing a commit with copy information |
|
771 | Test rebasing a commit with copy information | |
764 |
|
772 | |||
765 | $ hg init rebase-rename |
|
773 | $ hg init rebase-rename | |
766 | $ cd rebase-rename |
|
774 | $ cd rebase-rename | |
767 | $ echo a > a |
|
775 | $ echo a > a | |
768 | $ hg ci -Aqm 'add a' |
|
776 | $ hg ci -Aqm 'add a' | |
769 | $ echo a2 > a |
|
777 | $ echo a2 > a | |
770 | $ hg ci -m 'modify a' |
|
778 | $ hg ci -m 'modify a' | |
771 | $ hg co -q 0 |
|
779 | $ hg co -q 0 | |
772 | $ hg mv a b |
|
780 | $ hg mv a b | |
773 | $ hg ci -qm 'rename a to b' |
|
781 | $ hg ci -qm 'rename a to b' | |
774 | $ hg rebase -d 1 |
|
782 | $ hg rebase -d 1 | |
775 | rebasing 2:b977edf6f839 "rename a to b" (tip) |
|
783 | rebasing 2:b977edf6f839 "rename a to b" (tip) | |
776 | merging a and b to b |
|
784 | merging a and b to b | |
777 | saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg |
|
785 | saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg | |
778 | $ hg st --copies --change . |
|
786 | $ hg st --copies --change . | |
779 | A b |
|
787 | A b | |
780 | a |
|
788 | a | |
781 | R a |
|
789 | R a | |
782 | $ cd .. |
|
790 | $ cd .. | |
783 |
|
791 | |||
784 | Test rebasing a commit with copy information, where the target is empty |
|
792 | Test rebasing a commit with copy information, where the target is empty | |
785 |
|
793 | |||
786 | $ hg init rebase-rename-empty |
|
794 | $ hg init rebase-rename-empty | |
787 | $ cd rebase-rename-empty |
|
795 | $ cd rebase-rename-empty | |
788 | $ echo a > a |
|
796 | $ echo a > a | |
789 | $ hg ci -Aqm 'add a' |
|
797 | $ hg ci -Aqm 'add a' | |
790 | $ cat > a |
|
798 | $ cat > a | |
791 | $ hg ci -m 'make a empty' |
|
799 | $ hg ci -m 'make a empty' | |
792 | $ hg co -q 0 |
|
800 | $ hg co -q 0 | |
793 | $ hg mv a b |
|
801 | $ hg mv a b | |
794 | $ hg ci -qm 'rename a to b' |
|
802 | $ hg ci -qm 'rename a to b' | |
795 | $ hg rebase -d 1 |
|
803 | $ hg rebase -d 1 | |
796 | rebasing 2:b977edf6f839 "rename a to b" (tip) |
|
804 | rebasing 2:b977edf6f839 "rename a to b" (tip) | |
797 | merging a and b to b |
|
805 | merging a and b to b | |
798 | saved backup bundle to $TESTTMP/rebase-rename-empty/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg |
|
806 | saved backup bundle to $TESTTMP/rebase-rename-empty/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg | |
799 | $ hg st --copies --change . |
|
807 | $ hg st --copies --change . | |
800 | A b |
|
808 | A b | |
801 | a |
|
809 | a | |
802 | R a |
|
810 | R a | |
803 | $ cd .. |
|
811 | $ cd .. | |
804 | Rebase across a copy with --collapse |
|
812 | Rebase across a copy with --collapse | |
805 |
|
813 | |||
806 | $ hg init rebase-rename-collapse |
|
814 | $ hg init rebase-rename-collapse | |
807 | $ cd rebase-rename-collapse |
|
815 | $ cd rebase-rename-collapse | |
808 | $ echo a > a |
|
816 | $ echo a > a | |
809 | $ hg ci -Aqm 'add a' |
|
817 | $ hg ci -Aqm 'add a' | |
810 | $ hg mv a b |
|
818 | $ hg mv a b | |
811 | $ hg ci -m 'rename a to b' |
|
819 | $ hg ci -m 'rename a to b' | |
812 | $ hg co -q 0 |
|
820 | $ hg co -q 0 | |
813 | $ echo a2 > a |
|
821 | $ echo a2 > a | |
814 | $ hg ci -qm 'modify a' |
|
822 | $ hg ci -qm 'modify a' | |
815 | $ hg rebase -r . -d 1 --collapse |
|
823 | $ hg rebase -r . -d 1 --collapse | |
816 | rebasing 2:41c4ea50d4cf "modify a" (tip) |
|
824 | rebasing 2:41c4ea50d4cf "modify a" (tip) | |
817 | merging b and a to b |
|
825 | merging b and a to b | |
818 | saved backup bundle to $TESTTMP/rebase-rename-collapse/.hg/strip-backup/41c4ea50d4cf-b90b7994-rebase.hg |
|
826 | saved backup bundle to $TESTTMP/rebase-rename-collapse/.hg/strip-backup/41c4ea50d4cf-b90b7994-rebase.hg | |
819 | $ cd .. |
|
827 | $ cd .. | |
820 |
|
828 | |||
821 | Test rebasing when the file we are merging in destination is empty |
|
829 | Test rebasing when the file we are merging in destination is empty | |
822 |
|
830 | |||
823 | $ hg init test |
|
831 | $ hg init test | |
824 | $ cd test |
|
832 | $ cd test | |
825 | $ echo a > foo |
|
833 | $ echo a > foo | |
826 | $ hg ci -Aqm 'added a to foo' |
|
834 | $ hg ci -Aqm 'added a to foo' | |
827 |
|
835 | |||
828 | $ rm foo |
|
836 | $ rm foo | |
829 | $ touch foo |
|
837 | $ touch foo | |
830 | $ hg di |
|
838 | $ hg di | |
831 | diff --git a/foo b/foo |
|
839 | diff --git a/foo b/foo | |
832 | --- a/foo |
|
840 | --- a/foo | |
833 | +++ b/foo |
|
841 | +++ b/foo | |
834 | @@ -1,1 +0,0 @@ |
|
842 | @@ -1,1 +0,0 @@ | |
835 | -a |
|
843 | -a | |
836 |
|
844 | |||
837 | $ hg ci -m "make foo an empty file" |
|
845 | $ hg ci -m "make foo an empty file" | |
838 |
|
846 | |||
839 | $ hg up '.^' |
|
847 | $ hg up '.^' | |
840 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
848 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
841 | $ echo b > foo |
|
849 | $ echo b > foo | |
842 | $ hg di |
|
850 | $ hg di | |
843 | diff --git a/foo b/foo |
|
851 | diff --git a/foo b/foo | |
844 | --- a/foo |
|
852 | --- a/foo | |
845 | +++ b/foo |
|
853 | +++ b/foo | |
846 | @@ -1,1 +1,1 @@ |
|
854 | @@ -1,1 +1,1 @@ | |
847 | -a |
|
855 | -a | |
848 | +b |
|
856 | +b | |
849 | $ hg ci -m "add b to foo" |
|
857 | $ hg ci -m "add b to foo" | |
850 | created new head |
|
858 | created new head | |
851 |
|
859 | |||
852 | $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 |
|
860 | $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 | |
853 | rebasing 2:fb62b706688e "add b to foo" (tip) |
|
861 | rebasing 2:fb62b706688e "add b to foo" (tip) | |
854 | merging foo |
|
862 | merging foo | |
855 | hit merge conflicts; rebasing that commit again in the working copy |
|
863 | hit merge conflicts; rebasing that commit again in the working copy | |
856 | merging foo |
|
864 | merging foo | |
857 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
865 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
858 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
866 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
859 | [1] |
|
867 | [1] | |
860 |
|
868 | |||
861 | $ cd $TESTTMP |
|
869 | $ cd $TESTTMP | |
862 |
|
870 | |||
863 | 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 | |
864 | $ hg init test_issue6214 |
|
872 | $ hg init test_issue6214 | |
865 | $ cd test_issue6214 |
|
873 | $ cd test_issue6214 | |
866 | $ echo r0 > r0 |
|
874 | $ echo r0 > r0 | |
867 | $ hg ci -qAm 'r0' |
|
875 | $ hg ci -qAm 'r0' | |
868 | $ echo hi > foo |
|
876 | $ echo hi > foo | |
869 | $ hg ci -qAm 'hi from foo' |
|
877 | $ hg ci -qAm 'hi from foo' | |
870 | $ hg co -q '.^' |
|
878 | $ hg co -q '.^' | |
871 | $ echo bye > foo |
|
879 | $ echo bye > foo | |
872 | $ hg ci -qAm 'bye from foo' |
|
880 | $ hg ci -qAm 'bye from foo' | |
873 | $ hg co -q '.^' |
|
881 | $ hg co -q '.^' | |
874 | $ echo unrelated > some_other_file |
|
882 | $ echo unrelated > some_other_file | |
875 | $ hg ci -qAm 'some unrelated changes' |
|
883 | $ hg ci -qAm 'some unrelated changes' | |
876 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' |
|
884 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' | |
877 | @ 3: some unrelated changes |
|
885 | @ 3: some unrelated changes | |
878 | | some_other_file |
|
886 | | some_other_file | |
879 | | o 2: bye from foo |
|
887 | | o 2: bye from foo | |
880 | |/ foo |
|
888 | |/ foo | |
881 | | o 1: hi from foo |
|
889 | | o 1: hi from foo | |
882 | |/ foo |
|
890 | |/ foo | |
883 | o 0: r0 |
|
891 | o 0: r0 | |
884 | r0 |
|
892 | r0 | |
885 | $ hg rebase -r 2 -d 1 -t:merge3 |
|
893 | $ hg rebase -r 2 -d 1 -t:merge3 | |
886 | rebasing 2:b4d249fbf8dd "bye from foo" |
|
894 | rebasing 2:b4d249fbf8dd "bye from foo" | |
887 | merging foo |
|
895 | merging foo | |
888 | hit merge conflicts; rebasing that commit again in the working copy |
|
896 | hit merge conflicts; rebasing that commit again in the working copy | |
889 | merging foo |
|
897 | merging foo | |
890 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
898 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
891 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
899 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
892 | [1] |
|
900 | [1] | |
893 | $ hg rebase -r 3 -d 1 -t:merge3 |
|
901 | $ hg rebase -r 3 -d 1 -t:merge3 | |
894 | abort: rebase in progress |
|
902 | abort: rebase in progress | |
895 | (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop') |
|
903 | (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop') | |
896 | [255] |
|
904 | [255] | |
897 | $ hg resolve --list |
|
905 | $ hg resolve --list | |
898 | U foo |
|
906 | U foo | |
899 | $ hg resolve --all --re-merge -t:other |
|
907 | $ hg resolve --all --re-merge -t:other | |
900 | (no more unresolved files) |
|
908 | (no more unresolved files) | |
901 | continue: hg rebase --continue |
|
909 | continue: hg rebase --continue | |
902 | $ hg rebase --continue |
|
910 | $ hg rebase --continue | |
903 | rebasing 2:b4d249fbf8dd "bye from foo" |
|
911 | rebasing 2:b4d249fbf8dd "bye from foo" | |
904 | saved backup bundle to $TESTTMP/test_issue6214/.hg/strip-backup/b4d249fbf8dd-299ec25c-rebase.hg |
|
912 | saved backup bundle to $TESTTMP/test_issue6214/.hg/strip-backup/b4d249fbf8dd-299ec25c-rebase.hg | |
905 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' |
|
913 | $ hg log -G -T'{rev}: {desc}\n{files%"{file}\n"}' | |
906 | o 3: bye from foo |
|
914 | o 3: bye from foo | |
907 | | foo |
|
915 | | foo | |
908 | | @ 2: some unrelated changes |
|
916 | | @ 2: some unrelated changes | |
909 | | | some_other_file |
|
917 | | | some_other_file | |
910 | o | 1: hi from foo |
|
918 | o | 1: hi from foo | |
911 | |/ foo |
|
919 | |/ foo | |
912 | o 0: r0 |
|
920 | o 0: r0 | |
913 | r0 |
|
921 | r0 | |
914 |
|
922 | |||
915 | $ cd .. |
|
923 | $ cd .. | |
916 |
|
924 | |||
917 | Changesets that become empty should not be committed. Merges are not empty by |
|
925 | Changesets that become empty should not be committed. Merges are not empty by | |
918 | definition. |
|
926 | definition. | |
919 |
|
927 | |||
920 | $ hg init keep_merge |
|
928 | $ hg init keep_merge | |
921 | $ cd keep_merge |
|
929 | $ cd keep_merge | |
922 | $ echo base > base; hg add base; hg ci -m base |
|
930 | $ echo base > base; hg add base; hg ci -m base | |
923 | $ echo test > test; hg add test; hg ci -m a |
|
931 | $ echo test > test; hg add test; hg ci -m a | |
924 | $ hg up 0 -q |
|
932 | $ hg up 0 -q | |
925 | $ echo test > test; hg add test; hg ci -m b -q |
|
933 | $ echo test > test; hg add test; hg ci -m b -q | |
926 | $ hg up 0 -q |
|
934 | $ hg up 0 -q | |
927 | $ echo test > test; hg add test; hg ci -m c -q |
|
935 | $ echo test > test; hg add test; hg ci -m c -q | |
928 | $ hg up 1 -q |
|
936 | $ hg up 1 -q | |
929 | $ hg merge 2 -q |
|
937 | $ hg merge 2 -q | |
930 | $ hg ci -m merge |
|
938 | $ hg ci -m merge | |
931 | $ hg up null -q |
|
939 | $ hg up null -q | |
932 | $ hg tglog |
|
940 | $ hg tglog | |
933 | o 4: 59c8292117b1 'merge' |
|
941 | o 4: 59c8292117b1 'merge' | |
934 | |\ |
|
942 | |\ | |
935 | | | o 3: 531f80391e4a 'c' |
|
943 | | | o 3: 531f80391e4a 'c' | |
936 | | | | |
|
944 | | | | | |
937 | | o | 2: 0194f1db184a 'b' |
|
945 | | o | 2: 0194f1db184a 'b' | |
938 | | |/ |
|
946 | | |/ | |
939 | o / 1: 6f252845ea45 'a' |
|
947 | o / 1: 6f252845ea45 'a' | |
940 | |/ |
|
948 | |/ | |
941 | o 0: d20a80d4def3 'base' |
|
949 | o 0: d20a80d4def3 'base' | |
942 |
|
950 | |||
943 | $ hg rebase -s 2 -d 3 |
|
951 | $ hg rebase -s 2 -d 3 | |
944 | rebasing 2:0194f1db184a "b" |
|
952 | rebasing 2:0194f1db184a "b" | |
945 | note: not rebasing 2:0194f1db184a "b", its destination already has all its changes |
|
953 | note: not rebasing 2:0194f1db184a "b", its destination already has all its changes | |
946 | rebasing 4:59c8292117b1 "merge" (tip) |
|
954 | rebasing 4:59c8292117b1 "merge" (tip) | |
947 | saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg |
|
955 | saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg | |
948 | $ hg tglog |
|
956 | $ hg tglog | |
949 | o 3: 506e2454484b 'merge' |
|
957 | o 3: 506e2454484b 'merge' | |
950 | |\ |
|
958 | |\ | |
951 | | o 2: 531f80391e4a 'c' |
|
959 | | o 2: 531f80391e4a 'c' | |
952 | | | |
|
960 | | | | |
953 | o | 1: 6f252845ea45 'a' |
|
961 | o | 1: 6f252845ea45 'a' | |
954 | |/ |
|
962 | |/ | |
955 | o 0: d20a80d4def3 'base' |
|
963 | o 0: d20a80d4def3 'base' | |
956 |
|
964 | |||
957 |
|
965 | |||
958 | $ cd .. |
|
966 | $ cd .. | |
959 |
|
967 | |||
960 | Test (virtual) working directory without changes, created by merge conflict |
|
968 | Test (virtual) working directory without changes, created by merge conflict | |
961 | resolution. There was a regression where the file was incorrectly detected as |
|
969 | resolution. There was a regression where the file was incorrectly detected as | |
962 | changed although the file contents were the same as in the parent. |
|
970 | changed although the file contents were the same as in the parent. | |
963 |
|
971 | |||
964 | $ hg init nofilechanges |
|
972 | $ hg init nofilechanges | |
965 | $ cd nofilechanges |
|
973 | $ cd nofilechanges | |
966 | $ echo a > a; hg add a; hg ci -m a |
|
974 | $ echo a > a; hg add a; hg ci -m a | |
967 | $ echo foo > test; hg add test; hg ci -m b |
|
975 | $ echo foo > test; hg add test; hg ci -m b | |
968 | $ hg up 0 -q |
|
976 | $ hg up 0 -q | |
969 | $ echo bar > test; hg add test; hg ci -m c |
|
977 | $ echo bar > test; hg add test; hg ci -m c | |
970 | created new head |
|
978 | created new head | |
971 | $ hg rebase -d 2 -d 1 --tool :local |
|
979 | $ hg rebase -d 2 -d 1 --tool :local | |
972 | rebasing 2:ca2749322ee5 "c" (tip) |
|
980 | rebasing 2:ca2749322ee5 "c" (tip) | |
973 | note: not rebasing 2:ca2749322ee5 "c" (tip), its destination already has all its changes |
|
981 | note: not rebasing 2:ca2749322ee5 "c" (tip), its destination already has all its changes | |
974 | saved backup bundle to $TESTTMP/nofilechanges/.hg/strip-backup/ca2749322ee5-6dc7e94b-rebase.hg |
|
982 | saved backup bundle to $TESTTMP/nofilechanges/.hg/strip-backup/ca2749322ee5-6dc7e94b-rebase.hg |
General Comments 0
You need to be logged in to leave comments.
Login now