changeset 19313:3b96d6e44a4d

hg: move return statement after finally block return is always run after finally block. Now we have same functionality, but clearer readability.
author simon@laptop-tosh
date Sat, 08 Jun 2013 22:37:08 +0200
parents aedb4d0012ff
children bc82abe500a9
files mercurial/hg.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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, "