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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from itertools import chain, izip
26
26
from StringIO import StringIO
27
27
 
28
 
from brzlib import (
 
28
from breezy import (
29
29
    errors,
30
30
    graph as _mod_graph,
31
31
    groupcompress,
35
35
    transport,
36
36
    ui,
37
37
    )
38
 
from brzlib.errors import (
 
38
from breezy.errors import (
39
39
                           RevisionNotPresent,
40
40
                           RevisionAlreadyPresent,
41
41
                           )
42
 
from brzlib.knit import (
 
42
from breezy.knit import (
43
43
    cleanup_pack_knit,
44
44
    make_file_factory,
45
45
    make_pack_factory,
46
46
    )
47
 
from brzlib.tests import (
 
47
from breezy.tests import (
48
48
    TestCase,
49
49
    TestCaseWithMemoryTransport,
50
50
    TestNotApplicable,
51
51
    TestSkipped,
52
52
    )
53
 
from brzlib.tests.http_utils import TestCaseWithWebserver
54
 
from brzlib.transport.memory import MemoryTransport
55
 
import brzlib.versionedfile as versionedfile
56
 
from brzlib.versionedfile import (
 
53
from breezy.tests.http_utils import TestCaseWithWebserver
 
54
from breezy.transport.memory import MemoryTransport
 
55
import breezy.versionedfile as versionedfile
 
56
from breezy.versionedfile import (
57
57
    ConstantMapper,
58
58
    HashEscapedPrefixMapper,
59
59
    PrefixMapper,
60
60
    VirtualVersionedFiles,
61
61
    make_versioned_files_factory,
62
62
    )
63
 
from brzlib.weave import WeaveFile
64
 
from brzlib.weavefile import write_weave
65
 
from brzlib.tests.scenarios import load_tests_apply_scenarios
 
63
from breezy.weave import WeaveFile
 
64
from breezy.weavefile import write_weave
 
65
from breezy.tests.scenarios import load_tests_apply_scenarios
66
66
 
67
67
 
68
68
load_tests = load_tests_apply_scenarios
405
405
 
406
406
    def test_add_lines_with_matching_blocks_noeol_last_line(self):
407
407
        """Add a text with an unchanged last line with no eol should work."""
408
 
        from brzlib import multiparent
 
408
        from breezy import multiparent
409
409
        # Hand verified sha1 of the text we're adding.
410
410
        sha1 = '6a1d115ec7b60afb664dc14890b5af5ce3c827a4'
411
411
        # Create a mpdiff which adds a new line before the trailing line, and
426
426
        self.assertEqualDiff('newline\nline', vf.get_text('noeol2'))
427
427
 
428
428
    def test_make_mpdiffs(self):
429
 
        from brzlib import multiparent
 
429
        from breezy import multiparent
430
430
        vf = self.get_file('foo')
431
431
        sha1s = self._setup_for_deltas(vf)
432
432
        new_vf = self.get_file('bar')
2630
2630
            lines[('otherchild\n', self.get_simple_key('otherchild'))] > 0)
2631
2631
 
2632
2632
    def test_make_mpdiffs(self):
2633
 
        from brzlib import multiparent
 
2633
        from breezy import multiparent
2634
2634
        files = self.get_versionedfiles('source')
2635
2635
        # add texts that should trip the knit maximum delta chain threshold
2636
2636
        # as well as doing parallel chains of data in knits.