##// END OF EJS Templates
Fix a couple fencepost errors in hg log
mpm@selenic.com -
r1042:23f9d71a default
parent child Browse files
Show More
@@ -866,9 +866,10 b' def log(ui, repo, *pats, **opts):'
866 if not slowpath:
866 if not slowpath:
867 # Only files, no patterns. Check the history of each file.
867 # Only files, no patterns. Check the history of each file.
868 def filerevgen(filelog):
868 def filerevgen(filelog):
869 for i in xrange(filelog.count() - 1, 0, -window):
869 for i in xrange(filelog.count() - 1, -1, -window):
870 print "filelog"
870 revs = []
871 revs = []
871 for j in xrange(max(0, i - window), i):
872 for j in xrange(max(0, i - window), i + 1):
872 revs.append(filelog.linkrev(filelog.node(j)))
873 revs.append(filelog.linkrev(filelog.node(j)))
873 revs.reverse()
874 revs.reverse()
874 for rev in revs:
875 for rev in revs:
@@ -888,8 +889,8 b' def log(ui, repo, *pats, **opts):'
888 if slowpath:
889 if slowpath:
889 # The slow path checks files modified in every changeset.
890 # The slow path checks files modified in every changeset.
890 def mfrevgen():
891 def mfrevgen():
891 for i in xrange(repo.changelog.count() - 1, 0, -window):
892 for i in xrange(repo.changelog.count() - 1, -1, -window):
892 for j in xrange(max(0, i - window), i):
893 for j in xrange(max(0, i - window), i + 1):
893 yield j, repo.changelog.read(repo.lookup(str(j)))[3]
894 yield j, repo.changelog.read(repo.lookup(str(j)))[3]
894
895
895 for rev, mf in mfrevgen():
896 for rev, mf in mfrevgen():
General Comments 0
You need to be logged in to leave comments. Login now