Closed by commit rHGcb23d9e3e21f: shelve: fix a missing variable in the 
exception handler for delete (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7457?vs=18246&id=18260

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

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -603,8 +603,8 @@
     if not pats:
         raise error.Abort(_(b'no shelved changes specified!'))
     with repo.wlock():
-        try:
-            for name in pats:
+        for name in pats:
+            try:
                 for suffix in shelvefileextensions:
                     shfile = shelvedfile(repo, name, suffix)
                     # patch file is necessary, as it should
@@ -614,11 +614,11 @@
                     # bundle
                     if shfile.exists() or suffix == patchextension:
                         shfile.movetobackup()
+            except OSError as err:
+                if err.errno != errno.ENOENT:
+                    raise
+                raise error.Abort(_(b"shelved change '%s' not found") % name)
             cleanupoldbackups(repo)
-        except OSError as err:
-            if err.errno != errno.ENOENT:
-                raise
-            raise error.Abort(_(b"shelved change '%s' not found") % name)
 
 
 def listshelves(repo):



To: mharbison72, #hg-reviewers, dlax, pulkit
Cc: dlax, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to