~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_upgrade.py

[merge] from robert and newformat

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005 by Canonical Ltd
2
 
 
 
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
5
# the Free Software Foundation; either version 2 of the License, or
6
6
# (at your option) any later version.
7
 
 
 
7
#
8
8
# This program is distributed in the hope that it will be useful,
9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
# GNU General Public License for more details.
12
 
 
 
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
39
39
        self.failUnlessExists('.bzr/README')
40
40
 
41
41
    def test_upgrade_simple(self):
42
 
        """Upgrade simple v0.0.4 format to v5"""
 
42
        """Upgrade simple v0.0.4 format to v6"""
43
43
        eq = self.assertEquals
44
44
        build_tree_contents(_upgrade1_template)
45
45
        upgrade('.')
46
46
        b = Branch.open('.')
47
 
        eq(b._branch_format, 5)
 
47
        eq(b._branch_format, 6)
48
48
        rh = b.revision_history()
49
49
        eq(rh,
50
50
           ['mbp@sourcefrog.net-20051004035611-176b16534b086b3c',
77
77
    def test_upgrade_makes_dir_weaves(self):
78
78
        build_tree_contents(_upgrade_dir_template)
79
79
        upgrade('.')
 
80
        # this is the path to the literal file. As format changes 
 
81
        # occur it needs to be updated. FIXME: ask the store for the
 
82
        # path.
80
83
        self.failUnlessExists(
81
 
            '.bzr/weaves/dir-20051005095101-da1441ea3fa6917a.weave')
 
84
            '.bzr/weaves/de/dir-20051005095101-da1441ea3fa6917a.weave')
82
85
 
83
86
 
84
87
_upgrade1_template = \