mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
graphlog: fix regression with filelogs introduced by c19a6e3c8257
This commit is contained in:
parent
66e081318f
commit
f5e17bf442
@ -40,7 +40,7 @@ def filerevs(repo, path, start, stop):
|
|||||||
filerev = len(repo.file(path)) - 1
|
filerev = len(repo.file(path)) - 1
|
||||||
while filerev >= 0:
|
while filerev >= 0:
|
||||||
fctx = repo.filectx(path, fileid=filerev)
|
fctx = repo.filectx(path, fileid=filerev)
|
||||||
parents = [f.filerev() for f in fctx.parents() if f.path() == path]
|
parents = [f.linkrev() for f in fctx.parents() if f.path() == path]
|
||||||
parents.sort()
|
parents.sort()
|
||||||
if fctx.rev() <= start:
|
if fctx.rev() <= start:
|
||||||
yield (fctx, parents)
|
yield (fctx, parents)
|
||||||
|
@ -151,3 +151,16 @@ hg glog -l1 repo
|
|||||||
hg glog -l1 repo/0
|
hg glog -l1 repo/0
|
||||||
hg glog -l1 repo/missing
|
hg glog -l1 repo/missing
|
||||||
|
|
||||||
|
echo % file log with revs != cset revs
|
||||||
|
hg init flog
|
||||||
|
cd flog
|
||||||
|
echo one >one
|
||||||
|
hg add one
|
||||||
|
hg commit -mone
|
||||||
|
echo two >two
|
||||||
|
hg add two
|
||||||
|
hg commit -mtwo
|
||||||
|
echo more >two
|
||||||
|
hg commit -mmore
|
||||||
|
hg glog two
|
||||||
|
|
||||||
|
@ -369,3 +369,15 @@ o changeset: 0:7aa22e58e8c1
|
|||||||
date: Thu Jan 01 00:00:00 1970 +0000
|
date: Thu Jan 01 00:00:00 1970 +0000
|
||||||
summary: (0) root
|
summary: (0) root
|
||||||
|
|
||||||
|
% file log with revs != cset revs
|
||||||
|
@ changeset: 2:12c28321755b
|
||||||
|
| tag: tip
|
||||||
|
| user: test
|
||||||
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
||||||
|
| summary: more
|
||||||
|
|
|
||||||
|
o changeset: 1:5ac72c0599bf
|
||||||
|
user: test
|
||||||
|
date: Thu Jan 01 00:00:00 1970 +0000
|
||||||
|
summary: two
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user