~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Aaron Bentley
  • Date: 2006-04-05 04:54:00 UTC
  • mto: (2027.1.2 revert-subpath-56549)
  • mto: This revision was merged to the branch mainline in revision 1647.
  • Revision ID: aaron.bentley@utoronto.ca-20060405045400-7b57a53ee7fdaab6
Moved and renamed conflict functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
 
19
19
from bzrlib.bzrdir import BzrDir
 
20
from bzrlib.conflicts import (conflicts_to_strings, DuplicateEntry,
 
21
                              DuplicateID, MissingParent, UnversionedParent,
 
22
                              ParentLoop)
20
23
from bzrlib.errors import (DuplicateKey, MalformedTransform, NoSuchFile,
21
24
                           ReusingTransform, CantMoveRoot, NotVersionedError,
22
25
                           ExistingLimbo, ImmortalLimbo, LockError)
25
28
from bzrlib.tests import TestCaseInTempDir, TestSkipped
26
29
from bzrlib.transform import (TreeTransform, ROOT_PARENT, FinalPaths, 
27
30
                              resolve_conflicts, cook_conflicts, 
28
 
                              conflicts_strings, find_interesting, build_tree)
 
31
                              find_interesting, build_tree)
29
32
 
30
33
class TestTreeTransform(TestCaseInTempDir):
31
34
    def setUp(self):
389
392
        conflicts.apply()
390
393
 
391
394
    def test_cook_conflicts(self):
392
 
        from bzrlib.conflicts import (DuplicateEntry, DuplicateID, 
393
 
                                      MissingParent, UnversionedParent,
394
 
                                      ParentLoop)
395
395
        tt, emerald, oz, old_dorothy, new_dorothy = self.get_conflicted()
396
396
        raw_conflicts = resolve_conflicts(tt)
397
397
        cooked_conflicts = cook_conflicts(raw_conflicts, tt)
418
418
        raw_conflicts = resolve_conflicts(tt)
419
419
        cooked_conflicts = cook_conflicts(raw_conflicts, tt)
420
420
        tt.finalize()
421
 
        conflicts_s = list(conflicts_strings(cooked_conflicts))
 
421
        conflicts_s = list(conflicts_to_strings(cooked_conflicts))
422
422
        self.assertEqual(len(cooked_conflicts), len(conflicts_s))
423
423
        self.assertEqual(conflicts_s[0], 'Conflict adding file dorothy.  '
424
424
                                         'Moved existing file to '