~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Andrew Bennetts
  • Date: 2010-11-22 03:35:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5547.
  • Revision ID: andrew.bennetts@canonical.com-20101122033524-ouxj0onm3gtkimx3
Remove RepositoryFormatCHK1 and RepositoryFormatCHK2.

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
 
 
159
145
class SmartServerBranchRequestGetStackedOnURL(SmartServerBranchRequest):
160
146
 
161
147
    def do_with_branch(self, branch):
232
218
 
233
219
    def do_tip_change_with_locked_branch(self, branch, new_last_revision_id):
234
220
        if new_last_revision_id == 'null:':
235
 
            branch._set_revision_history([])
 
221
            branch.set_revision_history([])
236
222
        else:
237
223
            if not branch.repository.has_revision(new_last_revision_id):
238
224
                return FailedSmartServerResponse(
239
225
                    ('NoSuchRevision', new_last_revision_id))
240
 
            branch._set_revision_history(branch._lefthand_history(
 
226
            branch.set_revision_history(branch._lefthand_history(
241
227
                new_last_revision_id, None, None))
242
228
        return SuccessfulSmartServerResponse(('ok',))
243
229