Mercurial > hg-stable
changeset 1042:23f9d71ab9ae
Fix a couple fencepost errors in hg log
author | mpm@selenic.com |
---|---|
date | Wed, 24 Aug 2005 19:16:45 -0700 |
parents | 3ce272b96494 |
children | 9344f5dd4488 |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Aug 24 18:45:49 2005 -0700 +++ b/mercurial/commands.py Wed Aug 24 19:16:45 2005 -0700 @@ -866,9 +866,10 @@ if not slowpath: # Only files, no patterns. Check the history of each file. def filerevgen(filelog): - for i in xrange(filelog.count() - 1, 0, -window): + for i in xrange(filelog.count() - 1, -1, -window): + print "filelog" revs = [] - for j in xrange(max(0, i - window), i): + for j in xrange(max(0, i - window), i + 1): revs.append(filelog.linkrev(filelog.node(j))) revs.reverse() for rev in revs: @@ -888,8 +889,8 @@ if slowpath: # The slow path checks files modified in every changeset. def mfrevgen(): - for i in xrange(repo.changelog.count() - 1, 0, -window): - for j in xrange(max(0, i - window), i): + for i in xrange(repo.changelog.count() - 1, -1, -window): + for j in xrange(max(0, i - window), i + 1): yield j, repo.changelog.read(repo.lookup(str(j)))[3] for rev, mf in mfrevgen():