# HG changeset patch # User FUJIWARA Katsunori # Date 1383335382 -32400 # Node ID 065e6f1c92593af8ca85708cee083f2999c5eb1a # Parent ad9db007656f8acb369090f4a7b2a8785bcdef4f 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. diff -r ad9db007656f -r 065e6f1c9259 hgext/shelve.py --- 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: