hgext/graphlog.py
changeset 10111 27457d31ae3f
parent 10097 ffa6f2eb934e
child 10264 d6512b3e9ac0
--- a/hgext/graphlog.py	Mon Dec 21 12:18:43 2009 +0200
+++ b/hgext/graphlog.py	Mon Dec 14 00:32:29 2009 +0900
@@ -250,7 +250,8 @@
     if path: # could be reset in canonpath
         revdag = graphmod.filerevs(repo, path, start, stop, limit)
     else:
-        stop = max(stop, start - limit + 1)
+        if limit is not None:
+            stop = max(stop, start - limit + 1)
         revdag = graphmod.revisions(repo, start, stop)
 
     displayer = show_changeset(ui, repo, opts, buffered=True)
@@ -260,7 +261,7 @@
 def graphrevs(repo, nodes, opts):
     limit = cmdutil.loglimit(opts)
     nodes.reverse()
-    if limit < sys.maxint:
+    if limit is not None:
         nodes = nodes[:limit]
     return graphmod.nodes(repo, nodes)