tests/test-git-import.out
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Sat, 03 Jul 2010 18:11:15 +0900
changeset 11608 183e63112698
parent 10928 377d879e9d1b
child 12574 77600d697d0e
permissions -rw-r--r--
log: remove increasing windows usage in fastpath The purpose of increasing windows is to allow backwards iteration on the filelog at a reasonable cost. But is it needed? - if follow is False, we have no reason to iterate backwards. We basically just want to walk the complete filelog and yield all revisions within the revision range. We can do this forward or backwards, as it only reads the index. - when follow is True, we need to examine the contents of the filelog, and to do this efficiently we need to read the filelog forward. And on the other hand, to track ancestors and copies, we need to process revisions backwards. But is it necessary to use increasing windows for this? We can iterate over the complete filelog forward, stack the revisions, and read the reversed(pile), it does the same thing with a more readable code.

% 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