shelve: remove unused variable assignment
Fix test-check-pyflakes.t error after
1d7a36ff2615.
This patch replaces "readshelvedfiles()" invocation by
"shelvedfile().exists()" check and aborting, because it is required
only to ensure that shelved changes corresponded to specified name
exist after invocation.
This patch also remove definition of "readshelvedfiles()" itself,
because it is invoked only from the line removed by this patch.
--- a/hgext/shelve.py Wed Oct 30 19:45:14 2013 +0100
+++ b/hgext/shelve.py Sat Nov 02 04:49:42 2013 +0900
@@ -349,11 +349,6 @@
finally:
fp.close()
-def readshelvedfiles(repo, basename):
- """return the list of files touched in a shelve"""
- fp = shelvedfile(repo, basename, 'files').opener()
- return fp.read().split('\0')
-
def checkparents(repo, state):
"""check parent while resuming an unshelve"""
if state.parents != repo.dirstate.parents():
@@ -523,7 +518,8 @@
else:
basename = shelved[0]
- shelvedfiles = readshelvedfiles(repo, basename)
+ if not shelvedfile(repo, basename, 'files').exists():
+ raise util.Abort(_("shelved change '%s' not found") % basename)
wlock = lock = tr = None
try: