# HG changeset patch # User Navaneeth Suresh # Date 2019-07-24 12:50:01 # Node ID d5cdce3d91649929e01d8b63b012302b3125ff9f # Parent aaad4fe55ad128cf519ca00cbc4dd36b2aa6824c unshelve: create a matcher only if required on creating unshelve ctx Differential Revision: https://phab.mercurial-scm.org/D6687 diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -836,8 +836,8 @@ def _createunshelvectx(ui, repo, shelvec 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)