~bzr/ubuntu/maverick/bzr/sru-2.2.4

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-08-07 00:54:52 UTC
  • mfrom: (1.4.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100807005452-g4zb99ezl3xn44r4
Tags: 2.2.0-1
* New upstream release.
 + Adds support for setting timestamps to originating revisions.
   Closes: #473450
 + Removes remaining string exception. Closes: #585193, LP: #586926
 + Add C extension to work around Python issue 1628205. LP: #583941,
   Closes: #577110
 + Avoids showing progress bars when --quiet is used. Closes: #542105,
   LP: #320035
 + No longer creates ~/.bazaar as root when run under sudo. LP: #376388
 + 'bzr commit' now supports -p as alternative for --show-diff. LP: #571467
 + 'bzr add' no longer adds .THIS/.BASE/.THEIRS files unless
   explicitly requested. LP: #322767
 + When parsing patch files, Bazaar now supports diff lines before each
   patch. LP: #502076
 + WorkingTrees now no longer requires using signal.signal, so can
   be used in a threaded environment. LP: #521989
 + An assertion error is no longer triggered when pushing to a pre-1.6
   Bazaar server. LP: #528041
* Bump standards version to 3.9.1.

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