Handle empty file list for annotate
authormpm@selenic.com
Thu, 21 Jul 2005 12:22:54 -0500
changeset 744 3d88f6dd1ed4
parent 743 b0ba1866d6b5
child 745 9246ae925d57
Handle empty file list for annotate
mercurial/commands.py
--- a/mercurial/commands.py	Thu Jul 21 12:22:29 2005 -0500
+++ b/mercurial/commands.py	Thu Jul 21 12:22:54 2005 -0500
@@ -368,6 +368,9 @@
             bcache[rev] = name
             return name
 
+    if not pats:
+        raise Abort('at least one file name or pattern required')
+
     bcache = {}
     opmap = [['user', getname], ['number', str], ['changeset', getnode]]
     if not opts['user'] and not opts['changeset']:
@@ -379,7 +382,7 @@
         node = repo.dirstate.parents()[0]
     change = repo.changelog.read(node)
     mmap = repo.manifest.read(change[0])
-    for src, abs, rel in walk(repo, pats, opts, emptyok = False):
+    for src, abs, rel in walk(repo, pats, opts):
         lines = repo.file(abs).annotate(mmap[abs])
         pieces = []