hgext/keyword.py
changeset 24306 6ddc86eedc3b
parent 24272 26a1c617e047
child 24369 109a2acc19ed
--- a/hgext/keyword.py	Fri Mar 13 14:20:13 2015 -0400
+++ b/hgext/keyword.py	Fri Mar 13 17:00:06 2015 -0400
@@ -506,7 +506,10 @@
     kwt = kwtools['templater']
     wctx = repo[None]
     status = _status(ui, repo, wctx, kwt, *pats, **opts)
-    cwd = pats and repo.getcwd() or ''
+    if pats:
+        cwd = repo.getcwd()
+    else:
+        cwd = ''
     files = []
     if not opts.get('unknown') or opts.get('all'):
         files = sorted(status.modified + status.added + status.clean)