changeset 1337:d4b25df77a9e

Fix up some bugs for log and grep with empty repo
author mpm@selenic.com
date Fri, 23 Sep 2005 17:50:03 -0700
parents 8c094fb47b59
children 2b77ea66fe70
files mercurial/commands.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Sep 23 17:19:35 2005 -0700
+++ b/mercurial/commands.py	Fri Sep 23 17:50:03 2005 -0700
@@ -74,6 +74,10 @@
 
     "iter", rev, None: in-order traversal of the revs earlier iterated
     over with "add" - use to display data'''
+
+    if repo.changelog.count() == 0:
+        return [], False
+
     cwd = repo.getcwd()
     if not pats and cwd:
         opts['include'] = [os.path.join(cwd, i) for i in opts['include']]
@@ -1055,6 +1059,7 @@
     skip = {}
     changeiter, getchange = walkchangerevs(ui, repo, repo.getcwd(), pats, opts)
     count = 0
+    incrementing = False
     for st, rev, fns in changeiter:
         if st == 'window':
             incrementing = rev