Show More
@@ -1158,14 +1158,12 b' def iterhunks(fp):' | |||
|
1158 | 1158 | if not git: |
|
1159 | 1159 | git = True |
|
1160 | 1160 | gitpatches = scangitpatch(lr, x) |
|
1161 | yield 'git', gitpatches | |
|
1162 | 1161 | for gp in gitpatches: |
|
1163 | 1162 | changed[gp.path] = gp |
|
1164 | # else error? | |
|
1163 | yield 'git', gitpatches | |
|
1165 | 1164 | # copy/rename + modify should modify target, not source |
|
1166 |
gp = changed |
|
|
1167 |
if |
|
|
1168 | or gp.mode): | |
|
1165 | gp = changed[bfile] | |
|
1166 | if gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD') or gp.mode: | |
|
1169 | 1167 | afile = bfile |
|
1170 | 1168 | newfile = True |
|
1171 | 1169 | elif x.startswith('---'): |
@@ -383,3 +383,22 b' Consecutive import with renames (issue24' | |||
|
383 | 383 | a 0 -1 unset b |
|
384 | 384 | $ hg ci -m done |
|
385 | 385 | $ cd .. |
|
386 | ||
|
387 | Renames and strip | |
|
388 | ||
|
389 | $ hg init renameandstrip | |
|
390 | $ cd renameandstrip | |
|
391 | $ echo a > a | |
|
392 | $ hg ci -Am adda | |
|
393 | adding a | |
|
394 | $ hg import --no-commit -p2 - <<EOF | |
|
395 | > diff --git a/foo/a b/foo/b | |
|
396 | > rename from foo/a | |
|
397 | > rename to foo/b | |
|
398 | > EOF | |
|
399 | applying patch from stdin | |
|
400 | $ hg st --copies | |
|
401 | A b | |
|
402 | a | |
|
403 | R a | |
|
404 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now