Show More
@@ -301,12 +301,9 def filterpatch(ui, headers): | |||||
301 | seen = set() |
|
301 | seen = set() | |
302 | applied = {} # 'filename' -> [] of chunks |
|
302 | applied = {} # 'filename' -> [] of chunks | |
303 | skipfile, skipall = None, None |
|
303 | skipfile, skipall = None, None | |
304 | # XXX: operation count is weird: it counts headers and hunks |
|
304 | pos, total = 1, sum(len(h.hunks) for h in headers) | |
305 | # except for the first header. It probably comes from the previous |
|
|||
306 | # mixed header/hunk stream representation. |
|
|||
307 | pos, total = -1, sum((len(h.hunks) + 1) for h in headers) - 1 |
|
|||
308 | for h in headers: |
|
305 | for h in headers: | |
309 |
pos += len(h.hunks) |
|
306 | pos += len(h.hunks) | |
310 | skipfile = None |
|
307 | skipfile = None | |
311 | fixoffset = 0 |
|
308 | fixoffset = 0 | |
312 | hdr = ''.join(h.header) |
|
309 | hdr = ''.join(h.header) | |
@@ -330,7 +327,7 def filterpatch(ui, headers): | |||||
330 | msg = (total == 1 |
|
327 | msg = (total == 1 | |
331 | and (_('record this change to %r?') % chunk.filename()) |
|
328 | and (_('record this change to %r?') % chunk.filename()) | |
332 | or (_('record change %d/%d to %r?') % |
|
329 | or (_('record change %d/%d to %r?') % | |
333 |
(pos - len(h.hunks) + i |
|
330 | (pos - len(h.hunks) + i, total, chunk.filename()))) | |
334 | r, skipfile, skipall = prompt(skipfile, skipall, msg) |
|
331 | r, skipfile, skipall = prompt(skipfile, skipall, msg) | |
335 | if r: |
|
332 | if r: | |
336 | if fixoffset: |
|
333 | if fixoffset: |
@@ -158,13 +158,13 qrecord a.patch | |||||
158 | -2 |
|
158 | -2 | |
159 | +2 2 |
|
159 | +2 2 | |
160 | 3 |
|
160 | 3 | |
161 |
record change 1/ |
|
161 | record change 1/4 to '1.txt'? [Ynsfdaq?] | |
162 | @@ -3,3 +3,3 @@ |
|
162 | @@ -3,3 +3,3 @@ | |
163 | 3 |
|
163 | 3 | |
164 | -4 |
|
164 | -4 | |
165 | +4 4 |
|
165 | +4 4 | |
166 | 5 |
|
166 | 5 | |
167 |
record change 2/ |
|
167 | record change 2/4 to '1.txt'? [Ynsfdaq?] | |
168 | diff --git a/2.txt b/2.txt |
|
168 | diff --git a/2.txt b/2.txt | |
169 | 1 hunks, 1 lines changed |
|
169 | 1 hunks, 1 lines changed | |
170 | examine changes to '2.txt'? [Ynsfdaq?] |
|
170 | examine changes to '2.txt'? [Ynsfdaq?] | |
@@ -175,7 +175,7 qrecord a.patch | |||||
175 | c |
|
175 | c | |
176 | d |
|
176 | d | |
177 | e |
|
177 | e | |
178 |
record change 4 |
|
178 | record change 3/4 to '2.txt'? [Ynsfdaq?] | |
179 | diff --git a/dir/a.txt b/dir/a.txt |
|
179 | diff --git a/dir/a.txt b/dir/a.txt | |
180 | 1 hunks, 1 lines changed |
|
180 | 1 hunks, 1 lines changed | |
181 | examine changes to 'dir/a.txt'? [Ynsfdaq?] |
|
181 | examine changes to 'dir/a.txt'? [Ynsfdaq?] | |
@@ -255,7 +255,7 qrecord b.patch | |||||
255 | -4 |
|
255 | -4 | |
256 | +4 4 |
|
256 | +4 4 | |
257 | 5 |
|
257 | 5 | |
258 |
record change 1/ |
|
258 | record change 1/2 to '1.txt'? [Ynsfdaq?] | |
259 | diff --git a/dir/a.txt b/dir/a.txt |
|
259 | diff --git a/dir/a.txt b/dir/a.txt | |
260 | 1 hunks, 1 lines changed |
|
260 | 1 hunks, 1 lines changed | |
261 | examine changes to 'dir/a.txt'? [Ynsfdaq?] |
|
261 | examine changes to 'dir/a.txt'? [Ynsfdaq?] | |
@@ -265,7 +265,7 qrecord b.patch | |||||
265 |
|
265 | |||
266 | someone |
|
266 | someone | |
267 | up |
|
267 | up | |
268 |
record change |
|
268 | record change 2/2 to 'dir/a.txt'? [Ynsfdaq?] | |
269 |
|
269 | |||
270 | After qrecord b.patch 'tip' |
|
270 | After qrecord b.patch 'tip' | |
271 |
|
271 |
@@ -302,7 +302,7 Modify end of plain file, add EOL | |||||
302 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
302 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
303 | \ No newline at end of file |
|
303 | \ No newline at end of file | |
304 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
304 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
305 |
record change 1/ |
|
305 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
306 | diff --git a/plain2 b/plain2 |
|
306 | diff --git a/plain2 b/plain2 | |
307 | new file mode 100644 |
|
307 | new file mode 100644 | |
308 | examine changes to 'plain2'? [Ynsfdaq?] |
|
308 | examine changes to 'plain2'? [Ynsfdaq?] | |
@@ -332,21 +332,21 changes numbering | |||||
332 | 2 |
|
332 | 2 | |
333 | 3 |
|
333 | 3 | |
334 | 4 |
|
334 | 4 | |
335 |
record change 1/ |
|
335 | record change 1/3 to 'plain'? [Ynsfdaq?] | |
336 | @@ -8,5 +8,3 @@ |
|
336 | @@ -8,5 +8,3 @@ | |
337 | 8 |
|
337 | 8 | |
338 | 9 |
|
338 | 9 | |
339 | 10 |
|
339 | 10 | |
340 | -11 |
|
340 | -11 | |
341 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
341 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
342 |
record change 2/ |
|
342 | record change 2/3 to 'plain'? [Ynsfdaq?] | |
343 | diff --git a/plain2 b/plain2 |
|
343 | diff --git a/plain2 b/plain2 | |
344 | 1 hunks, 1 lines changed |
|
344 | 1 hunks, 1 lines changed | |
345 | examine changes to 'plain2'? [Ynsfdaq?] |
|
345 | examine changes to 'plain2'? [Ynsfdaq?] | |
346 | @@ -1,1 +1,2 @@ |
|
346 | @@ -1,1 +1,2 @@ | |
347 | 1 |
|
347 | 1 | |
348 | +2 |
|
348 | +2 | |
349 |
record change |
|
349 | record change 3/3 to 'plain2'? [Ynsfdaq?] | |
350 |
|
350 | |||
351 | $ hg tip -p |
|
351 | $ hg tip -p | |
352 | changeset: 11:21df83db12b8 |
|
352 | changeset: 11:21df83db12b8 |
General Comments 0
You need to be logged in to leave comments.
Login now