~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: John Arbash Meinel
  • Date: 2006-11-02 22:48:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2132.
  • Revision ID: john@arbash-meinel.com-20061102224849-9683d741ce3fbe38
Update file and revision id generators.
Move id generation to its own file, deprecate the old functions, 
make gen_revision_id() not require an email address in the
username, and use rand_chars() instead of hexlify(rand_bytes())

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from bzrlib import (
22
22
    errors,
 
23
    generate_ids,
23
24
    tests,
24
25
    urlutils,
25
26
    )
36
37
from bzrlib.transform import (TreeTransform, ROOT_PARENT, FinalPaths, 
37
38
                              resolve_conflicts, cook_conflicts, 
38
39
                              find_interesting, build_tree, get_backup_name)
39
 
from bzrlib.workingtree import gen_root_id
40
40
 
41
41
 
42
42
class TestTreeTransform(TestCaseInTempDir):
605
605
 
606
606
class TestTransformMerge(TestCaseInTempDir):
607
607
    def test_text_merge(self):
608
 
        root_id = gen_root_id()
 
608
        root_id = generate_ids.gen_root_id()
609
609
        base = TransformGroup("base", root_id)
610
610
        base.tt.new_file('a', base.root, 'a\nb\nc\nd\be\n', 'a')
611
611
        base.tt.new_file('b', base.root, 'b1', 'b')
684
684
    def test_file_merge(self):
685
685
        if not has_symlinks():
686
686
            raise TestSkipped('Symlinks are not supported on this platform')
687
 
        root_id = gen_root_id()
 
687
        root_id = generate_ids.gen_root_id()
688
688
        base = TransformGroup("BASE", root_id)
689
689
        this = TransformGroup("THIS", root_id)
690
690
        other = TransformGroup("OTHER", root_id)
725
725
        self.assertIs(os.path.lexists(this.wt.abspath('h.OTHER')), True)
726
726
 
727
727
    def test_filename_merge(self):
728
 
        root_id = gen_root_id()
 
728
        root_id = generate_ids.gen_root_id()
729
729
        base = TransformGroup("BASE", root_id)
730
730
        this = TransformGroup("THIS", root_id)
731
731
        other = TransformGroup("OTHER", root_id)
758
758
        self.assertEqual(this.wt.id2path('f'), pathjoin('b/f1'))
759
759
 
760
760
    def test_filename_merge_conflicts(self):
761
 
        root_id = gen_root_id()
 
761
        root_id = generate_ids.gen_root_id()
762
762
        base = TransformGroup("BASE", root_id)
763
763
        this = TransformGroup("THIS", root_id)
764
764
        other = TransformGroup("OTHER", root_id)