~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: wang
  • Date: 2006-10-29 13:41:32 UTC
  • mto: (2104.4.1 wang_65714)
  • mto: This revision was merged to the branch mainline in revision 2109.
  • Revision ID: wang@ubuntu-20061029134132-3d7f4216f20c4aef
Replace python's difflib by patiencediff because the worst case 
performance is cubic for difflib and people commiting large data 
files are often hurt by this. The worst case performance of patience is 
quadratic. Fix bug 65714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
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)
1200
1203
        transport.mkdir('tree')
1201
1204
        transport.mkdir('tree/checkout')
1202
1205
        co_branch = bzrlib.bzrdir.BzrDir.create_branch_convenience('tree/checkout',
1203
 
                                    format=bzrlib.bzrdir.BzrDirMetaFormat1())
 
1206
            format=bzrlib.bzrdir.BzrDirMetaFormat1())
1204
1207
        co_branch.bind(repo_branch)
1205
1208
        # Do a light checkout of the heavy one
1206
1209
        transport.mkdir('tree/lightcheckout')