Show More
@@ -1488,7 +1488,7 b' def walkchangerevs(repo, match, opts, pr' | |||||
1488 |
|
1488 | |||
1489 | return iterate() |
|
1489 | return iterate() | |
1490 |
|
1490 | |||
1491 |
def _makelogfilematcher(repo, |
|
1491 | def _makelogfilematcher(repo, files, followfirst): | |
1492 | # When displaying a revision with --patch --follow FILE, we have |
|
1492 | # When displaying a revision with --patch --follow FILE, we have | |
1493 | # to know which file of the revision must be diffed. With |
|
1493 | # to know which file of the revision must be diffed. With | |
1494 | # --follow, we want the names of the ancestors of FILE in the |
|
1494 | # --follow, we want the names of the ancestors of FILE in the | |
@@ -1502,7 +1502,7 b' def _makelogfilematcher(repo, pats, foll' | |||||
1502 | wctx = repo[None] |
|
1502 | wctx = repo[None] | |
1503 |
|
1503 | |||
1504 | def populate(): |
|
1504 | def populate(): | |
1505 |
for fn in |
|
1505 | for fn in files: | |
1506 | for i in ((pctx[fn],), pctx[fn].ancestors(followfirst=followfirst)): |
|
1506 | for i in ((pctx[fn],), pctx[fn].ancestors(followfirst=followfirst)): | |
1507 | for c in i: |
|
1507 | for c in i: | |
1508 | fcache.setdefault(c.linkrev(), set()).add(c.path()) |
|
1508 | fcache.setdefault(c.linkrev(), set()).add(c.path()) | |
@@ -1627,7 +1627,9 b' def _makelogrevset(repo, pats, opts, rev' | |||||
1627 | filematcher = None |
|
1627 | filematcher = None | |
1628 | if opts.get('patch') or opts.get('stat'): |
|
1628 | if opts.get('patch') or opts.get('stat'): | |
1629 | if follow: |
|
1629 | if follow: | |
1630 | filematcher = _makelogfilematcher(repo, pats, followfirst) |
|
1630 | # _makelogfilematcher expects its files argument to be relative to | |
|
1631 | # the repo root, so use match.files(), not pats. | |||
|
1632 | filematcher = _makelogfilematcher(repo, match.files(), followfirst) | |||
1631 | else: |
|
1633 | else: | |
1632 | filematcher = lambda rev: match |
|
1634 | filematcher = lambda rev: match | |
1633 |
|
1635 |
@@ -223,6 +223,43 b' log -pf dir/b' | |||||
223 | +a |
|
223 | +a | |
224 |
|
224 | |||
225 |
|
225 | |||
|
226 | log -pf b inside dir | |||
|
227 | ||||
|
228 | $ hg --cwd=dir log -pf b | |||
|
229 | changeset: 2:f8954cd4dc1f | |||
|
230 | user: test | |||
|
231 | date: Thu Jan 01 00:00:03 1970 +0000 | |||
|
232 | summary: c | |||
|
233 | ||||
|
234 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |||
|
235 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
236 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |||
|
237 | @@ -0,0 +1,1 @@ | |||
|
238 | +a | |||
|
239 | ||||
|
240 | changeset: 1:d89b0a12d229 | |||
|
241 | user: test | |||
|
242 | date: Thu Jan 01 00:00:02 1970 +0000 | |||
|
243 | summary: b | |||
|
244 | ||||
|
245 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |||
|
246 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
247 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |||
|
248 | @@ -0,0 +1,1 @@ | |||
|
249 | +a | |||
|
250 | ||||
|
251 | changeset: 0:9161b9aeaf16 | |||
|
252 | user: test | |||
|
253 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
254 | summary: a | |||
|
255 | ||||
|
256 | diff -r 000000000000 -r 9161b9aeaf16 a | |||
|
257 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
258 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |||
|
259 | @@ -0,0 +1,1 @@ | |||
|
260 | +a | |||
|
261 | ||||
|
262 | ||||
226 | log -vf dir/b |
|
263 | log -vf dir/b | |
227 |
|
264 | |||
228 | $ hg log -vf dir/b |
|
265 | $ hg log -vf dir/b |
General Comments 0
You need to be logged in to leave comments.
Login now