/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 brzlib/tests/blackbox/test_pack.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
#
17
17
 
18
 
"""Tests of the 'brz pack' command."""
 
18
"""Tests of the 'bzr pack' command."""
19
19
import os
20
20
 
21
 
from breezy import tests
22
 
from breezy.tests.matchers import ContainsNoVfsCalls
 
21
from brzlib import tests
 
22
from brzlib.tests.matchers import ContainsNoVfsCalls
23
23
 
24
24
 
25
25
class TestPack(tests.TestCaseWithTransport):
28
28
        self._make_file(path, line_prefix, total_lines, versioned=True)
29
29
 
30
30
    def _make_file(self, path, line_prefix, total_lines, versioned):
31
 
        text = ''
 
31
        text=''
32
32
        for i in range(total_lines):
33
 
            text += line_prefix + str(i + 1) + "\n"
 
33
            text += line_prefix + str(i+1) + "\n"
34
34
 
35
35
        with open(path, 'w') as f:
36
36
            f.write(text)
71
71
        """Ensure --clean-obsolete-packs removes obsolete pack files
72
72
        """
73
73
        wt = self.make_branch_and_tree('.')
74
 
        t = wt.branch.repository.controldir.transport
 
74
        t = wt.branch.repository.bzrdir.transport
75
75
 
76
76
        # do multiple commits to ensure that obsolete packs are created
77
 
        # by 'brz pack'
 
77
        # by 'bzr pack'
78
78
        self._make_versioned_file('file0.txt')
79
79
        for i in range(5):
80
80
            self._update_file('file0.txt', 'HELLO %d\n' % i)
90
90
    def test_simple_pack(self):
91
91
        self.setup_smart_server_with_call_log()
92
92
        t = self.make_branch_and_tree('branch')
93
 
        self.build_tree_contents([('branch/foo', b'thecontents')])
 
93
        self.build_tree_contents([('branch/foo', 'thecontents')])
94
94
        t.add("foo")
95
95
        t.commit("message")
96
96
        self.reset_smart_call_log()