~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Martin Pool
  • Date: 2010-04-21 11:27:04 UTC
  • mto: This revision was merged to the branch mainline in revision 5189.
  • Revision ID: mbp@canonical.com-20100421112704-zijso22b6pdevrxy
Simplify various code to use user_url

Show diffs side-by-side

added added

removed removed

Lines of Context:
1476
1476
 
1477
1477
        # now gather global repository information
1478
1478
        # XXX: This is available for many repos regardless of listability.
1479
 
        if self.user_transport.listable():
 
1479
        if self.bzrdir.root_transport.listable():
1480
1480
            # XXX: do we want to __define len__() ?
1481
1481
            # Maybe the versionedfiles object should provide a different
1482
1482
            # method to get the number of keys.
1514
1514
 
1515
1515
        ret = []
1516
1516
        for branches, repository in bzrdir.BzrDir.find_bzrdirs(
1517
 
                self.user_transport, evaluate=Evaluator()):
 
1517
                self.bzrdir.root_transport, evaluate=Evaluator()):
1518
1518
            if branches is not None:
1519
1519
                ret.extend(branches)
1520
1520
            if not using and repository is not None:
2588
2588
            keys = tsort.topo_sort(parent_map)
2589
2589
        return [None] + list(keys)
2590
2590
 
2591
 
    def pack(self, hint=None, clean_obsolete_packs=False):
 
2591
    def pack(self, hint=None):
2592
2592
        """Compress the data within the repository.
2593
2593
 
2594
2594
        This operation only makes sense for some repository types. For other
2604
2604
            obtained from the result of commit_write_group(). Out of
2605
2605
            date hints are simply ignored, because concurrent operations
2606
2606
            can obsolete them rapidly.
2607
 
 
2608
 
        :param clean_obsolete_packs: Clean obsolete packs immediately after
2609
 
            the pack operation.
2610
2607
        """
2611
2608
 
2612
2609
    def get_transaction(self):
3178
3175
        """
3179
3176
        raise NotImplementedError(self.open)
3180
3177
 
3181
 
    def _run_post_repo_init_hooks(self, repository, a_bzrdir, shared):
3182
 
        from bzrlib.bzrdir import BzrDir, RepoInitHookParams
3183
 
        hooks = BzrDir.hooks['post_repo_init']
3184
 
        if not hooks:
3185
 
            return
3186
 
        params = RepoInitHookParams(repository, self, a_bzrdir, shared)
3187
 
        for hook in hooks:
3188
 
            hook(params)
3189
 
 
3190
3178
 
3191
3179
class MetaDirRepositoryFormat(RepositoryFormat):
3192
3180
    """Common base class for the new repositories using the metadir layout."""