~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_info.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-11 00:23:23 UTC
  • mfrom: (2070 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20061011002323-82ba88c293d7caff
[merge] bzr.dev 2070

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2006 by Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
 
 
 
3
#
4
4
# This program is free software; you can redistribute it and/or modify
5
5
# it under the terms of the GNU General Public License as published by
6
6
# the Free Software Foundation; either version 2 of the License, or
7
7
# (at your option) any later version.
8
 
 
 
8
#
9
9
# This program is distributed in the hope that it will be useful,
10
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
12
# GNU General Public License for more details.
13
 
 
 
13
#
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
21
import sys
22
22
 
23
23
import bzrlib
 
24
from bzrlib import repository
24
25
from bzrlib.osutils import format_date
25
26
from bzrlib.tests import TestSkipped
26
27
from bzrlib.tests.blackbox import ExternalBase
133
134
        # Branch and bind to standalone, needs upgrade to metadir
134
135
        # (creates backup as unknown)
135
136
        branch1.bzrdir.sprout('bound')
136
 
        bzrlib.upgrade.upgrade('bound', bzrlib.bzrdir.BzrDirMetaFormat1())
 
137
        knit1_format = bzrlib.bzrdir.BzrDirMetaFormat1()
 
138
        knit1_format.repository_format = repository.RepositoryFormatKnit1()
 
139
        bzrlib.upgrade.upgrade('bound', knit1_format)
137
140
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
138
141
        branch3.bind(branch1)
139
142
        bound_tree = branch3.bzrdir.open_workingtree()
186
189
 
187
190
        # Checkout standalone (same as above, but does not have parent set)
188
191
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
189
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(bzrlib.bzrdir.BzrDirMetaFormat1())
 
192
        bzrlib.bzrdir.BzrDirFormat.set_default_format(knit1_format)
190
193
        branch4 = bzrlib.bzrdir.BzrDir.create_branch_convenience('checkout')
191
194
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
192
195
        branch4.bind(branch1)
551
554
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, shared_repo=repo)
552
555
 
553
556
        # Create normal checkout
554
 
        branch3 = bzrlib.bzrdir.BzrDir.create_branch_convenience('tree/checkout')
555
 
        branch3.bind(branch1)
556
 
        tree3 = branch3.bzrdir.open_workingtree()
557
 
        tree3.update()
 
557
        tree3 = branch1.create_checkout('tree/checkout')
558
558
        self.assertCheckoutStatusOutput('tree/checkout --verbose', tree3,
559
559
            verbose=True,
560
560
            light_checkout=False, repo_branch=branch1)
1203
1203
        transport.mkdir('tree')
1204
1204
        transport.mkdir('tree/checkout')
1205
1205
        co_branch = bzrlib.bzrdir.BzrDir.create_branch_convenience('tree/checkout',
1206
 
                                    format=bzrlib.bzrdir.BzrDirMetaFormat1())
 
1206
            format=bzrlib.bzrdir.BzrDirMetaFormat1())
1207
1207
        co_branch.bind(repo_branch)
1208
1208
        # Do a light checkout of the heavy one
1209
1209
        transport.mkdir('tree/lightcheckout')