Rev 3067: During bzr uncommit, lock the working tree if it is available. in http://bzr.arbash-meinel.com/branches/bzr/jam-integration
John Arbash Meinel
john at arbash-meinel.com
Mon Dec 3 19:56:03 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/jam-integration
------------------------------------------------------------
revno: 3067
revision-id:john at arbash-meinel.com-20071203195541-zvk2kpnx4e0m9mlg
parent: lalinsky at gmail.com-20071202191200-l0t8rhwq6lt4be67
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Mon 2007-12-03 13:55:41 -0600
message:
During bzr uncommit, lock the working tree if it is available.
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-12-02 19:12:00 +0000
+++ b/bzrlib/builtins.py 2007-12-03 19:55:41 +0000
@@ -3584,11 +3584,17 @@
tree = None
b = control.open_branch()
- b.lock_write()
+ if tree is not None:
+ tree.lock_write()
+ else:
+ b.lock_write()
try:
return self._run(b, tree, dry_run, verbose, revision, force)
finally:
- b.unlock()
+ if tree is not None:
+ tree.unlock()
+ else:
+ b.unlock()
def _run(self, b, tree, dry_run, verbose, revision, force):
from bzrlib.log import log_formatter, show_log
More information about the bazaar-commits
mailing list