/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/tests/test_repository.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
"""
24
24
 
25
25
from stat import S_ISDIR
 
26
from StringIO import StringIO
26
27
import sys
27
28
 
28
29
import bzrlib
29
 
from bzrlib.errors import (NoSuchFile,
 
30
from bzrlib.errors import (NotBranchError,
 
31
                           NoSuchFile,
30
32
                           UnknownFormatError,
31
33
                           UnsupportedFormatError,
32
34
                           )
34
36
    graph,
35
37
    tests,
36
38
    )
 
39
from bzrlib.branchbuilder import BranchBuilder
37
40
from bzrlib.btree_index import BTreeBuilder, BTreeGraphIndex
38
 
from bzrlib.index import GraphIndex
 
41
from bzrlib.index import GraphIndex, InMemoryGraphIndex
39
42
from bzrlib.repository import RepositoryFormat
 
43
from bzrlib.smart import server
40
44
from bzrlib.tests import (
41
45
    TestCase,
42
46
    TestCaseWithTransport,
 
47
    TestSkipped,
 
48
    test_knit,
43
49
    )
44
50
from bzrlib.transport import (
 
51
    fakenfs,
45
52
    get_transport,
46
53
    )
 
54
from bzrlib.transport.memory import MemoryServer
47
55
from bzrlib import (
 
56
    bencode,
48
57
    bzrdir,
49
58
    errors,
50
59
    inventory,
51
60
    osutils,
 
61
    progress,
52
62
    repository,
53
63
    revision as _mod_revision,
 
64
    symbol_versioning,
54
65
    upgrade,
55
66
    versionedfile,
56
67
    workingtree,
454
465
        repo = self.make_repository('.',
455
466
                format=bzrdir.format_registry.get('knit')())
456
467
        inv_xml = '<inventory format="5">\n</inventory>\n'
457
 
        inv = repo._deserialise_inventory('test-rev-id', inv_xml)
 
468
        inv = repo.deserialise_inventory('test-rev-id', inv_xml)
458
469
        self.assertEqual('test-rev-id', inv.root.revision)
459
470
 
460
471
    def test_deserialise_uses_global_revision_id(self):
466
477
        # Arguably, the deserialise_inventory should detect a mismatch, and
467
478
        # raise an error, rather than silently using one revision_id over the
468
479
        # other.
469
 
        self.assertRaises(AssertionError, repo._deserialise_inventory,
 
480
        self.assertRaises(AssertionError, repo.deserialise_inventory,
470
481
            'test-rev-id', inv_xml)
471
 
        inv = repo._deserialise_inventory('other-rev-id', inv_xml)
 
482
        inv = repo.deserialise_inventory('other-rev-id', inv_xml)
472
483
        self.assertEqual('other-rev-id', inv.root.revision)
473
484
 
474
485
    def test_supports_external_lookups(self):