changeset 24449:bab983bb6fd1

revert: define 'wctx' a little earlier and use it more
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 24 Mar 2015 13:56:51 -0700
parents 55c449345b10
children 961790c35b4f
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Oct 29 08:43:39 2014 -0700
+++ b/mercurial/cmdutil.py	Tue Mar 24 13:56:51 2015 -0700
@@ -2809,7 +2809,8 @@
         ## filling of the `names` mapping
         # walk dirstate to fill `names`
 
-        m = scmutil.match(repo[None], pats, opts)
+        wctx = repo[None]
+        m = scmutil.match(wctx, pats, opts)
         if not m.always() or node != parent:
             m.bad = lambda x, y: False
             for abs in repo.walk(m):
@@ -3012,7 +3013,6 @@
             (unknown,       actions['unknown'],  discard),
             )
 
-        wctx = repo[None]
         for abs, (rel, exact) in sorted(names.items()):
             # target file to be touch on disk (relative to cwd)
             target = repo.wjoin(abs)