##// END OF EJS Templates
log: fix --follow FILE ancestry calculation...
Patrick Mezard -
r16165:60101427 stable
parent child Browse files
Show More
@@ -1024,8 +1024,15 b' def walkchangerevs(repo, match, opts, pr'
1024 1024
1025 1025 return reversed(revs)
1026 1026 def iterfiles():
1027 pctx = repo['.']
1027 1028 for filename in match.files():
1028 yield filename, None
1029 if follow:
1030 if filename not in pctx:
1031 raise util.Abort(_('cannot follow file not in parent '
1032 'revision: "%s"') % filename)
1033 yield filename, pctx[filename].filenode()
1034 else:
1035 yield filename, None
1029 1036 for filename_node in copies:
1030 1037 yield filename_node
1031 1038 for file_, node in iterfiles():
@@ -115,6 +115,7 b' Convert from merge parent'
115 115 o 0 "1: add c" files: a b c
116 116
117 117 $ cd conv1
118 $ hg up -q
118 119
119 120 Check copy preservation
120 121
@@ -40,7 +40,7 b' changeset graph'
40 40 -f, directory
41 41
42 42 $ hg log -f dir
43 abort: cannot follow nonexistent file: "dir"
43 abort: cannot follow file not in parent revision: "dir"
44 44 [255]
45 45
46 46 -f, but no args
@@ -75,6 +75,7 b' changeset graph'
75 75
76 76 one rename
77 77
78 $ hg up -q 2
78 79 $ hg log -vf a
79 80 changeset: 0:9161b9aeaf16
80 81 user: test
@@ -87,6 +88,7 b' one rename'
87 88
88 89 many renames
89 90
91 $ hg up -q tip
90 92 $ hg log -vf e
91 93 changeset: 4:7e4639b4691b
92 94 tag: tip
@@ -125,6 +127,7 b' many renames'
125 127
126 128 log -pf dir/b
127 129
130 $ hg up -q 3
128 131 $ hg log -pf dir/b
129 132 changeset: 2:f8954cd4dc1f
130 133 user: test
@@ -189,6 +192,20 b' log -vf dir/b'
189 192
190 193
191 194
195 -f and multiple filelog heads
196
197 $ hg up -q 2
198 $ hg log -f g --template '{rev}\n'
199 2
200 1
201 0
202 $ hg up -q tip
203 $ hg log -f g --template '{rev}\n'
204 3
205 2
206 0
207
208
192 209 log copies with --copies
193 210
194 211 $ hg log -vC --template '{rev} {file_copies}\n'
General Comments 0
You need to be logged in to leave comments. Login now