changeset 26783:50213e4d25bf

resolve: only create wctx once This allows for status and other results on the wctx to be cached between iterations.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 15 Oct 2015 01:11:50 -0700
parents cbd04ce641b9
children c0aab5961876
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Oct 19 12:07:17 2015 -0700
+++ b/mercurial/commands.py	Thu Oct 15 01:11:50 2015 -0700
@@ -5604,7 +5604,9 @@
             raise error.Abort(
                 _('resolve command not applicable when not merging'))
 
-        m = scmutil.match(repo[None], pats, opts)
+        wctx = repo[None]
+
+        m = scmutil.match(wctx, pats, opts)
         ret = 0
         didwork = False
 
@@ -5620,8 +5622,6 @@
             elif unmark:
                 ms.mark(f, "u")
             else:
-                wctx = repo[None]
-
                 # backup pre-resolve (merge uses .orig for its own purposes)
                 a = repo.wjoin(f)
                 util.copyfile(a, a + ".resolve")