~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

[merge] bzr.dev 2255, resolve conflicts, update copyrights

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004-2006 by Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006 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
20
20
import tempfile
21
21
 
22
22
from bzrlib import (
23
 
    bzrdir, 
24
 
    errors, 
25
 
    inventory, 
26
 
    repository, 
 
23
    bzrdir,
 
24
    errors,
 
25
    inventory,
 
26
    repository,
27
27
    treebuilder,
28
28
    )
29
 
from bzrlib.builtins import merge
 
29
from bzrlib.builtins import _merge_helper
30
30
from bzrlib.bzrdir import BzrDir
31
31
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
32
32
from bzrlib.bundle.bundle_data import BundleTree
316
316
        format.repository_format = repository.RepositoryFormatKnit2()
317
317
        serializer = BundleSerializerV08('0.8')
318
318
        b = self.make_branch('.', format=format)
319
 
        self.assertRaises(errors.IncompatibleFormat, serializer.write, 
 
319
        self.assertRaises(errors.IncompatibleBundleFormat, serializer.write, 
320
320
                          b.repository, [], {}, StringIO())
321
321
 
322
322
    def test_matched_bundle(self):
323
 
        """Don't raise IncompatibleFormat for knit2 and bundle0.9"""
 
323
        """Don't raise IncompatibleBundleFormat for knit2 and bundle0.9"""
324
324
        format = bzrdir.BzrDirMetaFormat1()
325
325
        format.repository_format = repository.RepositoryFormatKnit2()
326
326
        serializer = BundleSerializerV09('0.9')
640
640
        self.assertEqualDiff(tree1_inv, tree2_inv)
641
641
        other.rename_one('sub/dir/nolastnewline.txt', 'sub/nolastnewline.txt')
642
642
        other.commit('rename file', rev_id='a@cset-0-6b')
643
 
        merge([other.basedir, -1], [None, None], this_dir=self.tree1.basedir)
 
643
        _merge_helper([other.basedir, -1], [None, None],
 
644
                      this_dir=self.tree1.basedir)
644
645
        self.tree1.commit(u'Merge', rev_id='a@cset-0-7',
645
646
                          verbose=False)
646
647
        bundle = self.get_valid_bundle('a@cset-0-6', 'a@cset-0-7')
741
742
        tt.create_file('file2', trans_id)
742
743
        tt.apply()
743
744
        other.commit('modify text in another tree', rev_id='a@lmod-0-2b')
744
 
        merge([other.basedir, -1], [None, None], this_dir=self.tree1.basedir)
 
745
        _merge_helper([other.basedir, -1], [None, None],
 
746
                      this_dir=self.tree1.basedir)
745
747
        self.tree1.commit(u'Merge', rev_id='a@lmod-0-3',
746
748
                          verbose=False)
747
749
        self.tree1.commit(u'Merge', rev_id='a@lmod-0-4')