changeset 12971:15390d1a3cfc stable

cmdutil: move range check outside of filerevgen Simple refactor, no logic change.
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Thu, 11 Nov 2010 02:05:02 +0900
parents 6bd9778ae749
children 7916a84c0758
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Nov 12 01:21:45 2010 -0600
+++ b/mercurial/cmdutil.py	Thu Nov 11 02:05:02 2010 +0900
@@ -1138,7 +1138,7 @@
                     continue
                 # only yield rev for which we have the changelog, it can
                 # happen while doing "hg log" during a pull or commit
-                if linkrev > maxrev or linkrev >= cl_count:
+                if linkrev >= cl_count:
                     break
 
                 parentlinkrevs = []
@@ -1180,7 +1180,7 @@
 
             # iterate from latest to oldest revision
             for rev, flparentlinkrevs, copied in filerevgen(filelog, last):
-                if rev not in ancestors:
+                if rev > maxrev or rev not in ancestors:
                     continue
                 # XXX insert 1327 fix here
                 if flparentlinkrevs: