mercurial/cmdutil.py
changeset 4867 0e2d0a78f81a
parent 4842 3cf94964c56b
child 4944 10afa3fab6b4
child 4950 30847b8af7ca
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -542,9 +542,9 @@ def make_filename(repo, pat, node,
     try:
         if node:
             expander.update(node_expander)
-        if node and revwidth is not None:
+        if node:
             expander['r'] = (lambda:
-                    str(repo.changelog.rev(node)).zfill(revwidth))
+                    str(repo.changelog.rev(node)).zfill(revwidth or 0))
         if total is not None:
             expander['N'] = lambda: str(total)
         if seqno is not None: