Show More
@@ -890,6 +890,9 b' def iterhunks(ui, fp, sourcefile=None):' | |||
|
890 | 890 | context = None |
|
891 | 891 | lr = linereader(fp) |
|
892 | 892 | dopatch = True |
|
893 | # gitworkdone is True if a git operation (copy, rename, ...) was | |
|
894 | # performed already for the current file. Useful when the file | |
|
895 | # section may have no hunk. | |
|
893 | 896 | gitworkdone = False |
|
894 | 897 | |
|
895 | 898 | while True: |
@@ -938,8 +941,8 b' def iterhunks(ui, fp, sourcefile=None):' | |||
|
938 | 941 | changed[gp.path] = (gp.op, gp) |
|
939 | 942 | # else error? |
|
940 | 943 | # copy/rename + modify should modify target, not source |
|
941 |
|
|
|
942 | 'RENAME'): | |
|
944 | gitop = changed.get(bfile[2:], (None, None))[0] | |
|
945 | if gitop in ('COPY', 'DELETE', 'RENAME'): | |
|
943 | 946 | afile = bfile |
|
944 | 947 | gitworkdone = True |
|
945 | 948 | newfile = True |
@@ -207,3 +207,21 b' do' | |||
|
207 | 207 | done |
|
208 | 208 | cd .. |
|
209 | 209 | |
|
210 | # Test importing a patch ending with a binary file removal | |
|
211 | echo % test trailing binary removal | |
|
212 | hg init binaryremoval | |
|
213 | cd binaryremoval | |
|
214 | echo a > a | |
|
215 | python -c "file('b', 'wb').write('a\x00b')" | |
|
216 | hg ci -Am addall | |
|
217 | hg rm a | |
|
218 | hg rm b | |
|
219 | hg st | |
|
220 | hg ci -m remove | |
|
221 | hg export --git . > remove.diff | |
|
222 | cat remove.diff | grep git | |
|
223 | hg up -C 0 | |
|
224 | hg import remove.diff | |
|
225 | hg manifest | |
|
226 | cd .. | |
|
227 |
General Comments 0
You need to be logged in to leave comments.
Login now