~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Robert Collins
  • Date: 2009-04-15 02:07:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4292.
  • Revision ID: robertc@robertcollins.net-20090415020735-poizrhi1b98mtdgk
Add new remote server verb Branch.set_parent_location, dropping roundtrips further on push operations.

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=''):