/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-06-17 09:11:03 UTC
  • mfrom: (5297.2.3 loomsupport)
  • Revision ID: pqm@pqm.ubuntu.com-20100617091103-254bm3h1n8kpm4wq
(lifeless) Make InterBranch._get_branch_formats_to_test return a list of
 format pairs to aid testing in bzr-loom. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1023
1023
            self._extend_partial_history(distance_from_last)
1024
1024
        return self._partial_revision_history_cache[distance_from_last]
1025
1025
 
1026
 
    @needs_write_lock
1027
1026
    def pull(self, source, overwrite=False, stop_revision=None,
1028
1027
             possible_transports=None, *args, **kwargs):
1029
1028
        """Mirror source into this branch.
3185
3184
    _optimisers = []
3186
3185
    """The available optimised InterBranch types."""
3187
3186
 
3188
 
    @staticmethod
3189
 
    def _get_branch_formats_to_test():
3190
 
        """Return a tuple with the Branch formats to use when testing."""
3191
 
        raise NotImplementedError(InterBranch._get_branch_formats_to_test)
 
3187
    @classmethod
 
3188
    def _get_branch_formats_to_test(klass):
 
3189
        """Return an iterable of format tuples for testing.
 
3190
        
 
3191
        :return: An iterable of (from_format, to_format) to use when testing
 
3192
            this InterBranch class. Each InterBranch class should define this
 
3193
            method itself.
 
3194
        """
 
3195
        raise NotImplementedError(klass._get_branch_formats_to_test)
3192
3196
 
 
3197
    @needs_write_lock
3193
3198
    def pull(self, overwrite=False, stop_revision=None,
3194
3199
             possible_transports=None, local=False):
3195
3200
        """Mirror source into target branch.
3200
3205
        """
3201
3206
        raise NotImplementedError(self.pull)
3202
3207
 
 
3208
    @needs_write_lock
3203
3209
    def update_revisions(self, stop_revision=None, overwrite=False,
3204
3210
                         graph=None):
3205
3211
        """Pull in new perfect-fit revisions.
3213
3219
        """
3214
3220
        raise NotImplementedError(self.update_revisions)
3215
3221
 
 
3222
    @needs_write_lock
3216
3223
    def push(self, overwrite=False, stop_revision=None,
3217
3224
             _override_hook_source_branch=None):
3218
3225
        """Mirror the source branch into the target branch.
3230
3237
        # GenericBranch uses the public API, so always compatible
3231
3238
        return True
3232
3239
 
3233
 
    @staticmethod
3234
 
    def _get_branch_formats_to_test():
3235
 
        return BranchFormat._default_format, BranchFormat._default_format
 
3240
    @classmethod
 
3241
    def _get_branch_formats_to_test(klass):
 
3242
        return [(BranchFormat._default_format, BranchFormat._default_format)]
3236
3243
 
3237
3244
    @classmethod
3238
3245
    def unwrap_format(klass, format):
3300
3307
                             (this_last_revision, this_revno)])
3301
3308
        self.target.set_last_revision_info(stop_revno, stop_revision)
3302
3309
 
 
3310
    @needs_write_lock
3303
3311
    def pull(self, overwrite=False, stop_revision=None,
3304
3312
             possible_transports=None, run_hooks=True,
3305
3313
             _override_hook_target=None, local=False):