~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.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:
1560
1560
        """Is the collection already packed?"""
1561
1561
        return not (self.repo._format.pack_compresses or (len(self._names) > 1))
1562
1562
 
1563
 
    def pack(self, hint=None, clean_obsolete_packs=False):
 
1563
    def pack(self, hint=None):
1564
1564
        """Pack the pack collection totally."""
1565
1565
        self.ensure_loaded()
1566
1566
        total_packs = len(self._names)
1582
1582
                pack_operations[-1][1].append(pack)
1583
1583
        self._execute_pack_operations(pack_operations, OptimisingPacker)
1584
1584
 
1585
 
        if clean_obsolete_packs:
1586
 
            self._clear_obsolete_packs()
1587
 
 
1588
1585
    def plan_autopack_combinations(self, existing_packs, pack_distribution):
1589
1586
        """Plan a pack operation.
1590
1587
 
2378
2375
        raise NotImplementedError(self.dont_leave_lock_in_place)
2379
2376
 
2380
2377
    @needs_write_lock
2381
 
    def pack(self, hint=None, clean_obsolete_packs=False):
 
2378
    def pack(self, hint=None):
2382
2379
        """Compress the data within the repository.
2383
2380
 
2384
2381
        This will pack all the data to a single pack. In future it may
2385
2382
        recompress deltas or do other such expensive operations.
2386
2383
        """
2387
 
        self._pack_collection.pack(hint=hint, clean_obsolete_packs=clean_obsolete_packs)
 
2384
        self._pack_collection.pack(hint=hint)
2388
2385
 
2389
2386
    @needs_write_lock
2390
2387
    def reconcile(self, other=None, thorough=False):
2546
2543
        utf8_files = [('format', self.get_format_string())]
2547
2544
 
2548
2545
        self._upload_blank_content(a_bzrdir, dirs, files, utf8_files, shared)
2549
 
        repository = self.open(a_bzrdir=a_bzrdir, _found=True)
2550
 
        self._run_post_repo_init_hooks(repository, a_bzrdir, shared)
2551
 
        return repository
 
2546
        return self.open(a_bzrdir=a_bzrdir, _found=True)
2552
2547
 
2553
2548
    def open(self, a_bzrdir, _found=False, _override_transport=None):
2554
2549
        """See RepositoryFormat.open().