D6687: unshelve: create a matcher only if required on creating unshelve ctx

navaneeth.suresh (Navaneeth Suresh) phabricator at mercurial-scm.org
Wed Jul 24 08:51:14 EDT 2019


navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6687

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -830,8 +830,8 @@
                         extra=shelvectx.extra(),
                         user=shelvectx.user(),
                         date=opts.get('date'))
-    m = scmutil.matchfiles(repo, repo[snode].files())
     if snode:
+        m = scmutil.matchfiles(repo, repo[snode].files())
         _shelvecreatedcommit(repo, snode, basename, m)
 
     return newnode, bool(snode)



To: navaneeth.suresh, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list