hg: move return statement after finally block
authorsimon@laptop-tosh
Sat, 08 Jun 2013 22:37:08 +0200
changeset 19313 3b96d6e44a4d
parent 19312 aedb4d0012ff
child 19314 bc82abe500a9
hg: move return statement after finally block return is always run after finally block. Now we have same functionality, but clearer readability.
mercurial/hg.py
--- a/mercurial/hg.py	Sun Jun 09 16:49:08 2013 +0200
+++ b/mercurial/hg.py	Sat Jun 08 22:37:08 2013 +0200
@@ -437,14 +437,13 @@
                 _update(destrepo, uprev)
                 if update in destrepo._bookmarks:
                     bookmarks.setcurrent(destrepo, update)
-
-        return srcpeer, destpeer
     finally:
         release(srclock, destlock)
         if cleandir is not None:
             shutil.rmtree(cleandir, True)
         if srcpeer is not None:
             srcpeer.close()
+    return srcpeer, destpeer
 
 def _showstats(repo, stats):
     repo.ui.status(_("%d files updated, %d files merged, "