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

login
register
mail settings
Submitter phabricator
Date July 29, 2019, 10:31 a.m.
Message ID <9b8e434b2b4a1b939718b27a343fa2e4@localhost.localdomain>
Download mbox | patch
Permalink /patch/41097/
State Not Applicable
Headers show

Comments

phabricator - July 29, 2019, 10:31 a.m.
Closed by commit rHGd5cdce3d9164: unshelve: create a matcher only if required on creating unshelve ctx (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6687?vs=16041&id=16092#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6687?vs=16041&id=16092

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6687/new/

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -836,8 +836,8 @@ 
     snode = repo.commit(text=shelvectx.description(),
                         extra=shelvectx.extra(),
                         user=shelvectx.user())
-    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)