Patchwork [1,of,2] revert: define 'wctx' a little earlier and use it more

login
register
mail settings
Submitter Martin von Zweigbergk
Date March 24, 2015, 11:29 p.m.
Message ID <f1bf7c265f81e552f7e1.1427239756@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8247/
State Accepted
Commit bab983bb6fd1117291e61de865a042a17c809a42
Headers show

Comments

Martin von Zweigbergk - March 24, 2015, 11:29 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1427230611 25200
#      Tue Mar 24 13:56:51 2015 -0700
# Node ID f1bf7c265f81e552f7e10501f47b663ebd18d85e
# Parent  5b85a5bc5bbb9d8365953609d98e4dce7110e9b0
revert: define 'wctx' a little earlier and use it more

Patch

diff -r 5b85a5bc5bbb -r f1bf7c265f81 mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Mon Mar 23 23:04:51 2015 -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)