Rev 1997: Make sure to abort editor when exception is raised. in file:///data/jelmer/bzr-svn/0.5/

Jelmer Vernooij jelmer at samba.org
Mon Nov 17 01:22:09 GMT 2008


At file:///data/jelmer/bzr-svn/0.5/

------------------------------------------------------------
revno: 1997
revision-id: jelmer at samba.org-20081117012203-1981ff0gv46j0beq
parent: jelmer at samba.org-20081117011802-rf3d5qzih0q18m8a
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-11-17 02:22:03 +0100
message:
  Make sure to abort editor when exception is raised.
modified:
  tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
=== modified file 'tree.py'
--- a/tree.py	2008-11-12 10:57:24 +0000
+++ b/tree.py	2008-11-17 01:22:03 +0000
@@ -81,8 +81,12 @@
             reporter = conn.do_switch(
                 self._revmeta.revnum, "", True, 
                 urlutils.join(root_repos, self._revmeta.branch_path), editor)
-            reporter.set_path("", 0, True, None)
-            reporter.finish()
+            try:
+                reporter.set_path("", 0, True, None)
+                reporter.finish()
+            except:
+                reporter.abort()
+                raise
         finally:
             repository.transport.add_connection(conn)
 




More information about the bazaar-commits mailing list