~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: 2011-03-03 06:02:49 UTC
  • mfrom: (5672.1.7 branch-revs-to-fetch)
  • Revision ID: pqm@pqm.ubuntu.com-20110303060249-l2zou9i59742nrqf
(spiv) Add Branch.heads_to_fetch API and HPSS request. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
            self.branch.unlock()
143
143
 
144
144
 
 
145
class SmartServerBranchHeadsToFetch(SmartServerBranchRequest):
 
146
 
 
147
    def do_with_branch(self, branch):
 
148
        """Return the heads-to-fetch for a Branch as two bencoded lists.
 
149
        
 
150
        See Branch.heads_to_fetch.
 
151
 
 
152
        New in 2.4.
 
153
        """
 
154
        must_fetch, if_present_fetch = branch.heads_to_fetch()
 
155
        return SuccessfulSmartServerResponse(
 
156
            (list(must_fetch), list(if_present_fetch)))
 
157
 
 
158
 
145
159
class SmartServerBranchRequestGetStackedOnURL(SmartServerBranchRequest):
146
160
 
147
161
    def do_with_branch(self, branch):