Rev 5205: Add __str__ to the new helper classes. in http://bazaar.launchpad.net/~lifeless/bzr/lock_return

Robert Collins robertc at robertcollins.net
Fri May 7 00:54:07 BST 2010


At http://bazaar.launchpad.net/~lifeless/bzr/lock_return

------------------------------------------------------------
revno: 5205
revision-id: robertc at robertcollins.net-20100506235405-wii4elupfhzl3jvy
parent: robertc at robertcollins.net-20100506234939-prhk3x301ag1y1ai
committer: Robert Collins <robertc at robertcollins.net>
branch nick: lock_return
timestamp: Fri 2010-05-07 11:54:05 +1200
message:
  Add __str__ to the new helper classes.
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2010-05-06 23:41:35 +0000
+++ b/bzrlib/branch.py	2010-05-06 23:54:05 +0000
@@ -2288,6 +2288,10 @@
         self.branch_token = branch_token
         self.unlock = unlock
 
+    def __str__(self):
+        return "BranchWriteLockResult(%s, %s)" % (self.branch_token,
+            self.unlock)
+
 
 class BzrBranch(Branch, _RelockDebugMixin):
     """A branch stored in the actual filesystem.

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2010-05-06 23:41:35 +0000
+++ b/bzrlib/repository.py	2010-05-06 23:54:05 +0000
@@ -872,6 +872,10 @@
         self.repository_token = repository_token
         self.unlock = unlock
 
+    def __str__(self):
+        return "RepositoryWriteLockResult(%s, %s)" % (self.repository_token,
+            self.unlock)
+
 
 ######################################################################
 # Repositories




More information about the bazaar-commits mailing list