~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
ghosts.
21
21
"""
22
22
 
 
23
from __future__ import absolute_import
 
24
 
23
25
import gzip
24
26
import os
25
27
from cStringIO import StringIO
26
 
import urllib
27
28
 
28
29
from bzrlib.lazy_import import lazy_import
29
30
lazy_import(globals(), """
52
53
from bzrlib.decorators import needs_read_lock, needs_write_lock
53
54
from bzrlib.repository import (
54
55
    InterRepository,
55
 
    RepositoryFormat,
 
56
    RepositoryFormatMetaDir,
56
57
    )
57
58
from bzrlib.store.text import TextStore
58
59
from bzrlib.versionedfile import (
272
273
    supports_ghosts = False
273
274
    supports_external_lookups = False
274
275
    supports_chks = False
 
276
    supports_nesting_repositories = True
275
277
    _fetch_order = 'topological'
276
278
    _fetch_reconcile = True
277
279
    fast_deltas = False
321
323
            raise NotImplementedError
322
324
 
323
325
        repo_transport = a_bzrdir.get_repository_transport(None)
324
 
        control_files = a_bzrdir._control_files
325
326
        result = AllInOneRepository(_format=self, a_bzrdir=a_bzrdir)
326
327
        result.revisions = self._get_revisions(repo_transport, result)
327
328
        result.signatures = self._get_signatures(repo_transport, result)
504
505
    def _serializer(self):
505
506
        return xml5.serializer_v5
506
507
 
507
 
    def get_format_string(self):
 
508
    @classmethod
 
509
    def get_format_string(cls):
508
510
        """See RepositoryFormat.get_format_string()."""
509
511
        return "Bazaar-NG Repository format 7"
510
512
 
561
563
                                    than normal. I.e. during 'upgrade'.
562
564
        """
563
565
        if not _found:
564
 
            format = RepositoryFormat.find_format(a_bzrdir)
 
566
            format = RepositoryFormatMetaDir.find_format(a_bzrdir)
565
567
        if _override_transport is not None:
566
568
            repo_transport = _override_transport
567
569
        else:
707
709
            raise errors.ObjectNotLocked(self)
708
710
        relpaths = set()
709
711
        for quoted_relpath in self._transport.iter_files_recursive():
710
 
            relpath = urllib.unquote(quoted_relpath)
 
712
            relpath = urlutils.unquote(quoted_relpath)
711
713
            path, ext = os.path.splitext(relpath)
712
714
            if ext == '.gz':
713
715
                relpath = path
747
749
            raise errors.ObjectNotLocked(self)
748
750
        relpaths = set()
749
751
        for quoted_relpath in self._transport.iter_files_recursive():
750
 
            relpath = urllib.unquote(quoted_relpath)
 
752
            relpath = urlutils.unquote(quoted_relpath)
751
753
            path, ext = os.path.splitext(relpath)
752
754
            if ext == '.gz':
753
755
                relpath = path