~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Andrew Bennetts
  • Date: 2007-03-26 05:11:52 UTC
  • mto: This revision was merged to the branch mainline in revision 2376.
  • Revision ID: andrew.bennetts@canonical.com-20070326051152-1q3ntmsj2b4dv9k5
Remote Branch.get_transaction and friends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1300
1300
 
1301
1301
    base = property(_get_base, doc="The URL for the root of this branch.")
1302
1302
 
1303
 
    def _finish_transaction(self):
1304
 
        """Exit the current transaction."""
1305
 
        return self.control_files._finish_transaction()
1306
 
 
1307
 
    def get_transaction(self):
1308
 
        """Return the current active transaction.
1309
 
 
1310
 
        If no transaction is active, this returns a passthrough object
1311
 
        for which all data is immediately flushed and no caching happens.
1312
 
        """
1313
 
        # this is an explicit function so that we can do tricky stuff
1314
 
        # when the storage in rev_storage is elsewhere.
1315
 
        # we probably need to hook the two 'lock a location' and 
1316
 
        # 'have a transaction' together more delicately, so that
1317
 
        # we can have two locks (branch and storage) and one transaction
1318
 
        # ... and finishing the transaction unlocks both, but unlocking
1319
 
        # does not. - RBC 20051121
1320
 
        return self.control_files.get_transaction()
1321
 
 
1322
 
    def _set_transaction(self, transaction):
1323
 
        """Set a new active transaction."""
1324
 
        return self.control_files._set_transaction(transaction)
1325
 
 
1326
1303
    def abspath(self, name):
1327
1304
        """See Branch.abspath."""
1328
1305
        return self.control_files._transport.abspath(name)