# HG changeset patch # User Peter Arrenbrecht # Date 1226865330 -3600 # Node ID b501c7f3c2ad660a06b4bb90b40cf5d2221f28c3 # Parent f5f6b7dcd217ee22cb13bf496b0e190689b07751 graphlog: fix regression with filelogs introduced by 7bc62ebe7693 diff -r f5f6b7dcd217 -r b501c7f3c2ad hgext/graphlog.py --- a/hgext/graphlog.py Sat Nov 15 15:57:12 2008 +0100 +++ b/hgext/graphlog.py Sun Nov 16 20:55:30 2008 +0100 @@ -40,7 +40,7 @@ filerev = len(repo.file(path)) - 1 while filerev >= 0: 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() if fctx.rev() <= start: yield (fctx, parents) diff -r f5f6b7dcd217 -r b501c7f3c2ad tests/test-glog --- a/tests/test-glog Sat Nov 15 15:57:12 2008 +0100 +++ b/tests/test-glog Sun Nov 16 20:55:30 2008 +0100 @@ -151,3 +151,16 @@ hg glog -l1 repo/0 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 + diff -r f5f6b7dcd217 -r b501c7f3c2ad tests/test-glog.out --- a/tests/test-glog.out Sat Nov 15 15:57:12 2008 +0100 +++ b/tests/test-glog.out Sun Nov 16 20:55:30 2008 +0100 @@ -369,3 +369,15 @@ date: Thu Jan 01 00:00:00 1970 +0000 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 +