# HG changeset patch # User simon@laptop-tosh # Date 2013-06-08 20:37:08 # Node ID 3b96d6e44a4dfa4f7310e46d2f9323cae5afe603 # Parent aedb4d0012ffc4dbd9a30af857ee7cbd6dd2719a hg: move return statement after finally block return is always run after finally block. Now we have same functionality, but clearer readability. diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -437,14 +437,13 @@ def clone(ui, peeropts, source, dest=Non _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, "