view tests/test-git-import.out @ 11715:4f9dfb54c8b5 stable

qpush --move: move the right patch even with comment lines 88fc876a4833 caused that we find the index of the moving patch in self.series but look it up in self.full_series. The difference between these is that full_series also contains comment lines, and we thus moved the wrong patch. Use back self.full_series to find the moving patch, but take care of striping the patch guard markers before comparing the patch name. Test cases have been added for comments and empty lines in self.full_series, and for the case of guarded patches. Original patch contributed by Mads Kiilerich <mads@kiilerich.com>
author Gilles Moris <gilles.moris@free.fr>
date Sat, 10 Jul 2010 21:23:00 +0200
parents 377d879e9d1b
children 77600d697d0e
line wrap: on
line source

% new file
applying patch from stdin
0:ae3ee40d2079
% new empty file
applying patch from stdin
1:ab199dc869b5
empty
% chmod +x
applying patch from stdin
2:3a34410f282e
% copy
applying patch from stdin
3:37bacb7ca14d
a
a
% rename
applying patch from stdin
4:47b81a94361d
copyx
empty
new
rename
% delete
applying patch from stdin
5:d9b001d98336
empty
new
rename
% regular diff
applying patch from stdin
6:ebe901e7576b
% copy and modify
applying patch from stdin
7:18f368958ecd
a
a
b
a
a
% rename and modify
applying patch from stdin
8:c32b0d7e6f44
a
a
b
c
a
% one file renamed multiple times
applying patch from stdin
9:034a6bf95330
9 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
rename3
rename3-2
a
a
b
c
a

a
a
b
c
a
% binary files and regular patch hunks
applying patch from stdin
11:c39bce63e786
foo
045c85ba38952325e126c70962cc0f9d9077bc67 644   binary
% many binary files
applying patch from stdin
12:30b530085242
045c85ba38952325e126c70962cc0f9d9077bc67 644   mbinary1
a874b471193996e7cb034bb301cac7bdaf3e3f46 644   mbinary2
% filenames with spaces
applying patch from stdin
13:04750ef42fb3
foo
% copy then modify the original file
applying patch from stdin
14:c4cd9cdeaa74
foo