~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-15 08:20:33 UTC
  • mfrom: (4288.1.12 push.roundtrips)
  • Revision ID: pqm@pqm.ubuntu.com-20090415082033-tds4zs962x6kwc2c
(robertc) Add a Branch.set_parent_location verb and reduce lock
        churning to reduce network round trips. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
        return SuccessfulSmartServerResponse(('ok',))
238
238
 
239
239
 
 
240
class SmartServerBranchRequestSetParentLocation(SmartServerLockedBranchRequest):
 
241
    """Set the parent location for a branch.
 
242
    
 
243
    Takes a location to set, which must be utf8 encoded.
 
244
    """
 
245
 
 
246
    def do_with_locked_branch(self, branch, location):
 
247
        branch._set_parent_location(location)
 
248
        return SuccessfulSmartServerResponse(())
 
249
 
 
250
 
240
251
class SmartServerBranchRequestLockWrite(SmartServerBranchRequest):
241
252
 
242
253
    def do_with_branch(self, branch, branch_token='', repo_token=''):