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)