/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 bzrlib/tests/test_workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2011-01-18 22:30:23 UTC
  • mto: This revision was merged to the branch mainline in revision 5620.
  • Revision ID: jelmer@samba.org-20110118223023-sje5l7ap3nebwnyh
Print error if both --email and a new identity were specified.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
# Authors:  Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from cStringIO import StringIO
19
18
import os
20
19
 
21
20
from bzrlib import (
22
21
    bzrdir,
23
22
    conflicts,
24
23
    errors,
 
24
    transport,
25
25
    workingtree,
26
26
    )
27
 
from bzrlib.branch import Branch
28
 
from bzrlib.bzrdir import BzrDir
29
27
from bzrlib.lockdir import LockDir
30
28
from bzrlib.mutabletree import needs_tree_write_lock
31
29
from bzrlib.tests import TestCase, TestCaseWithTransport, TestSkipped
32
 
from bzrlib.transport import get_transport
33
30
from bzrlib.workingtree import (
34
31
    TreeEntry,
35
32
    TreeDirectory,
138
135
            dir.create_repository()
139
136
            dir.create_branch()
140
137
            format.initialize(dir)
141
 
            t = get_transport(url)
 
138
            t = transport.get_transport(url)
142
139
            found_format = workingtree.WorkingTreeFormat.find_format(dir)
143
140
            self.failUnless(isinstance(found_format, format.__class__))
144
141
        check_format(workingtree.WorkingTreeFormat3(), "bar")
349
346
        self.build_tree_contents([('this/hello', 'Hello World')])
350
347
        this.commit('Add World')
351
348
        this.merge_from_branch(other.branch)
352
 
        self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
 
349
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
353
350
                         this.conflicts())
354
351
        this.auto_resolve()
355
 
        self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
 
352
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
356
353
                         this.conflicts())
357
354
        self.build_tree_contents([('this/hello', '<<<<<<<')])
358
355
        this.auto_resolve()
359
 
        self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
 
356
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
360
357
                         this.conflicts())
361
358
        self.build_tree_contents([('this/hello', '=======')])
362
359
        this.auto_resolve()
363
 
        self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
 
360
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
364
361
                         this.conflicts())
365
362
        self.build_tree_contents([('this/hello', '\n>>>>>>>')])
366
363
        remaining, resolved = this.auto_resolve()
367
 
        self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
 
364
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
368
365
                         this.conflicts())
369
366
        self.assertEqual([], resolved)
370
367
        self.build_tree_contents([('this/hello', 'hELLO wORLD')])
371
368
        remaining, resolved = this.auto_resolve()
372
369
        self.assertEqual([], this.conflicts())
373
 
        self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
 
370
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
374
371
                         resolved)
375
372
        self.failIfExists('this/hello.BASE')
376
373
 
378
375
        tree = self.make_branch_and_tree('tree')
379
376
        self.build_tree(['tree/hello/'])
380
377
        tree.add('hello', 'hello-id')
381
 
        file_conflict = conflicts.TextConflict('file', None, 'hello-id')
 
378
        file_conflict = conflicts.TextConflict('file', 'hello-id')
382
379
        tree.set_conflicts(conflicts.ConflictList([file_conflict]))
383
380
        tree.auto_resolve()
384
381