~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_conflicts.py

(vila) Revise legal option names to be less drastic. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import os
19
19
 
20
20
from bzrlib import (
21
 
    bzrdir,
22
21
    conflicts,
23
22
    errors,
24
23
    option,
62
61
])
63
62
 
64
63
 
 
64
def vary_by_conflicts():
 
65
    for conflict in example_conflicts:
 
66
        yield (conflict.__class__.__name__, {"conflict": conflict})
 
67
 
 
68
 
65
69
class TestConflicts(tests.TestCaseWithTransport):
66
70
 
67
 
    def test_conflicts(self):
68
 
        """Conflicts are detected properly"""
69
 
        # Use BzrDirFormat6 so we can fake conflicts
70
 
        tree = self.make_branch_and_tree('.', format=bzrdir.BzrDirFormat6())
71
 
        self.build_tree_contents([('hello', 'hello world4'),
72
 
                                  ('hello.THIS', 'hello world2'),
73
 
                                  ('hello.BASE', 'hello world1'),
74
 
                                  ('hello.OTHER', 'hello world3'),
75
 
                                  ('hello.sploo.BASE', 'yellowworld'),
76
 
                                  ('hello.sploo.OTHER', 'yellowworld2'),
77
 
                                  ])
78
 
        tree.lock_read()
79
 
        self.assertLength(6, list(tree.list_files()))
80
 
        tree.unlock()
81
 
        tree_conflicts = tree.conflicts()
82
 
        self.assertLength(2, tree_conflicts)
83
 
        self.assertTrue('hello' in tree_conflicts[0].path)
84
 
        self.assertTrue('hello.sploo' in tree_conflicts[1].path)
85
 
        conflicts.restore('hello')
86
 
        conflicts.restore('hello.sploo')
87
 
        self.assertLength(0, tree.conflicts())
88
 
        self.assertFileEqual('hello world2', 'hello')
89
 
        self.assertFalse(os.path.lexists('hello.sploo'))
90
 
        self.assertRaises(errors.NotConflicted, conflicts.restore, 'hello')
91
 
        self.assertRaises(errors.NotConflicted,
92
 
                          conflicts.restore, 'hello.sploo')
93
 
 
94
71
    def test_resolve_conflict_dir(self):
95
72
        tree = self.make_branch_and_tree('.')
96
73
        self.build_tree_contents([('hello', 'hello world4'),
147
124
        self.assertEqual(conflicts.ConflictList([]), tree.conflicts())
148
125
 
149
126
 
150
 
class TestConflictStanzas(tests.TestCase):
 
127
class TestPerConflict(tests.TestCase):
 
128
 
 
129
    scenarios = scenarios.multiply_scenarios(vary_by_conflicts())
 
130
 
 
131
    def test_stringification(self):
 
132
        text = unicode(self.conflict)
 
133
        self.assertContainsString(text, self.conflict.path)
 
134
        self.assertContainsString(text.lower(), "conflict")
 
135
        self.assertContainsString(repr(self.conflict),
 
136
            self.conflict.__class__.__name__)
151
137
 
152
138
    def test_stanza_roundtrip(self):
153
 
        # write and read our example stanza.
154
 
        stanza_iter = example_conflicts.to_stanzas()
155
 
        processed = conflicts.ConflictList.from_stanzas(stanza_iter)
156
 
        for o, p in zip(processed, example_conflicts):
157
 
            self.assertEqual(o, p)
158
 
 
159
 
            self.assertIsInstance(o.path, unicode)
160
 
 
161
 
            if o.file_id is not None:
162
 
                self.assertIsInstance(o.file_id, str)
163
 
 
164
 
            conflict_path = getattr(o, 'conflict_path', None)
165
 
            if conflict_path is not None:
166
 
                self.assertIsInstance(conflict_path, unicode)
167
 
 
168
 
            conflict_file_id = getattr(o, 'conflict_file_id', None)
169
 
            if conflict_file_id is not None:
170
 
                self.assertIsInstance(conflict_file_id, str)
 
139
        p = self.conflict
 
140
        o = conflicts.Conflict.factory(**p.as_stanza().as_dict())
 
141
        self.assertEqual(o, p)
 
142
 
 
143
        self.assertIsInstance(o.path, unicode)
 
144
 
 
145
        if o.file_id is not None:
 
146
            self.assertIsInstance(o.file_id, str)
 
147
 
 
148
        conflict_path = getattr(o, 'conflict_path', None)
 
149
        if conflict_path is not None:
 
150
            self.assertIsInstance(conflict_path, unicode)
 
151
 
 
152
        conflict_file_id = getattr(o, 'conflict_file_id', None)
 
153
        if conflict_file_id is not None:
 
154
            self.assertIsInstance(conflict_file_id, str)
171
155
 
172
156
    def test_stanzification(self):
173
 
        for stanza in example_conflicts.to_stanzas():
174
 
            if 'file_id' in stanza:
175
 
                # In Stanza form, the file_id has to be unicode.
176
 
                self.assertStartsWith(stanza['file_id'], u'\xeed')
177
 
            self.assertStartsWith(stanza['path'], u'p\xe5th')
178
 
            if 'conflict_path' in stanza:
179
 
                self.assertStartsWith(stanza['conflict_path'], u'p\xe5th')
180
 
            if 'conflict_file_id' in stanza:
181
 
                self.assertStartsWith(stanza['conflict_file_id'], u'\xeed')
 
157
        stanza = self.conflict.as_stanza()
 
158
        if 'file_id' in stanza:
 
159
            # In Stanza form, the file_id has to be unicode.
 
160
            self.assertStartsWith(stanza['file_id'], u'\xeed')
 
161
        self.assertStartsWith(stanza['path'], u'p\xe5th')
 
162
        if 'conflict_path' in stanza:
 
163
            self.assertStartsWith(stanza['conflict_path'], u'p\xe5th')
 
164
        if 'conflict_file_id' in stanza:
 
165
            self.assertStartsWith(stanza['conflict_file_id'], u'\xeed')
 
166
 
 
167
 
 
168
class TestConflictList(tests.TestCase):
 
169
 
 
170
    def test_stanzas_roundtrip(self):
 
171
        stanzas_iter = example_conflicts.to_stanzas()
 
172
        processed = conflicts.ConflictList.from_stanzas(stanzas_iter)
 
173
        self.assertEqual(example_conflicts, processed)
 
174
 
 
175
    def test_stringification(self):
 
176
        for text, o in zip(example_conflicts.to_strings(), example_conflicts):
 
177
            self.assertEqual(text, unicode(o))
182
178
 
183
179
 
184
180
# FIXME: The shell-like tests should be converted to real whitebox tests... or
449
445
              dict(actions='modify_file', check='file_has_more_content')),
450
446
             ('file_deleted',
451
447
              dict(actions='delete_file', check='file_doesnt_exist')),),
 
448
            # File renamed-modified/deleted
 
449
            (dict(_base_actions='create_file',
 
450
                  _path='new-file', _file_id='file-id'),
 
451
             ('file_renamed_and_modified',
 
452
              dict(actions='modify_and_rename_file',
 
453
                   check='file_renamed_and_more_content')),
 
454
             ('file_deleted',
 
455
              dict(actions='delete_file', check='file_doesnt_exist')),),
452
456
            # File modified/deleted in dir
453
457
            (dict(_base_actions='create_file_in_dir',
454
458
                  _path='dir/file', _file_id='file-id'),
466
470
    def do_modify_file(self):
467
471
        return [('modify', ('file-id', 'trunk content\nmore content\n'))]
468
472
 
 
473
    def do_modify_and_rename_file(self):
 
474
        return [('modify', ('file-id', 'trunk content\nmore content\n')),
 
475
                ('rename', ('file', 'new-file'))]
 
476
 
469
477
    def check_file_has_more_content(self):
470
478
        self.assertFileEqual('trunk content\nmore content\n', 'branch/file')
471
479
 
 
480
    def check_file_renamed_and_more_content(self):
 
481
        self.assertFileEqual('trunk content\nmore content\n', 'branch/new-file')
 
482
 
472
483
    def do_delete_file(self):
473
484
        return [('unversion', 'file-id')]
474
485
 
475
486
    def check_file_doesnt_exist(self):
476
 
        self.failIfExists('branch/file')
 
487
        self.assertPathDoesNotExist('branch/file')
477
488
 
478
489
    def do_create_file_in_dir(self):
479
490
        return [('add', ('dir', 'dir-id', 'directory', '')),
486
497
        self.assertFileEqual('trunk content\nmore content\n', 'branch/dir/file')
487
498
 
488
499
    def check_file_in_dir_doesnt_exist(self):
489
 
        self.failIfExists('branch/dir/file')
 
500
        self.assertPathDoesNotExist('branch/dir/file')
490
501
 
491
502
    def _get_resolve_path_arg(self, wt, action):
492
503
        return self._path
567
578
        return [('rename', ('file', 'new-file'))]
568
579
 
569
580
    def check_file_renamed(self):
570
 
        self.failIfExists('branch/file')
571
 
        self.failUnlessExists('branch/new-file')
 
581
        self.assertPathDoesNotExist('branch/file')
 
582
        self.assertPathExists('branch/new-file')
572
583
 
573
584
    def do_rename_file2(self):
574
585
        return [('rename', ('file', 'new-file2'))]
575
586
 
576
587
    def check_file_renamed2(self):
577
 
        self.failIfExists('branch/file')
578
 
        self.failUnlessExists('branch/new-file2')
 
588
        self.assertPathDoesNotExist('branch/file')
 
589
        self.assertPathExists('branch/new-file2')
579
590
 
580
591
    def do_rename_dir(self):
581
592
        return [('rename', ('dir', 'new-dir'))]
582
593
 
583
594
    def check_dir_renamed(self):
584
 
        self.failIfExists('branch/dir')
585
 
        self.failUnlessExists('branch/new-dir')
 
595
        self.assertPathDoesNotExist('branch/dir')
 
596
        self.assertPathExists('branch/new-dir')
586
597
 
587
598
    def do_rename_dir2(self):
588
599
        return [('rename', ('dir', 'new-dir2'))]
589
600
 
590
601
    def check_dir_renamed2(self):
591
 
        self.failIfExists('branch/dir')
592
 
        self.failUnlessExists('branch/new-dir2')
 
602
        self.assertPathDoesNotExist('branch/dir')
 
603
        self.assertPathExists('branch/new-dir2')
593
604
 
594
605
    def do_delete_file(self):
595
606
        return [('unversion', 'file-id')]
596
607
 
597
608
    def check_file_doesnt_exist(self):
598
 
        self.failIfExists('branch/file')
 
609
        self.assertPathDoesNotExist('branch/file')
599
610
 
600
611
    def do_delete_dir(self):
601
612
        return [('unversion', 'dir-id')]
602
613
 
603
614
    def check_dir_doesnt_exist(self):
604
 
        self.failIfExists('branch/dir')
 
615
        self.assertPathDoesNotExist('branch/dir')
605
616
 
606
617
    def do_create_file_in_dir(self):
607
618
        return [('add', ('dir', 'dir-id', 'directory', '')),
611
622
        return [('rename', ('dir/file', 'dir/new-file'))]
612
623
 
613
624
    def check_file_in_dir_renamed(self):
614
 
        self.failIfExists('branch/dir/file')
615
 
        self.failUnlessExists('branch/dir/new-file')
 
625
        self.assertPathDoesNotExist('branch/dir/file')
 
626
        self.assertPathExists('branch/dir/new-file')
616
627
 
617
628
    def check_file_in_dir_doesnt_exist(self):
618
 
        self.failIfExists('branch/dir/file')
 
629
        self.assertPathDoesNotExist('branch/dir/file')
619
630
 
620
631
    def _get_resolve_path_arg(self, wt, action):
621
632
        tpath = self._this['path']
665
676
             ('fileb_created',
666
677
              dict(actions='create_file_b', check='file_content_b',
667
678
                   path='file', file_id='file-b-id')),),
 
679
            # File created with different file-ids but deleted on one side
 
680
            (dict(_base_actions='create_file_a'),
 
681
             ('filea_replaced',
 
682
              dict(actions='replace_file_a_by_b', check='file_content_b',
 
683
                   path='file', file_id='file-b-id')),
 
684
             ('filea_modified',
 
685
              dict(actions='modify_file_a', check='file_new_content',
 
686
                   path='file', file_id='file-a-id')),),
668
687
            ])
669
688
 
670
689
    def do_nothing(self):
682
701
    def check_file_content_b(self):
683
702
        self.assertFileEqual('file b content\n', 'branch/file')
684
703
 
 
704
    def do_replace_file_a_by_b(self):
 
705
        return [('unversion', 'file-a-id'),
 
706
                ('add', ('file', 'file-b-id', 'file', 'file b content\n'))]
 
707
 
 
708
    def do_modify_file_a(self):
 
709
        return [('modify', ('file-a-id', 'new content\n'))]
 
710
 
 
711
    def check_file_new_content(self):
 
712
        self.assertFileEqual('new content\n', 'branch/file')
 
713
 
685
714
    def _get_resolve_path_arg(self, wt, action):
686
715
        return self._this['path']
687
716
 
727
756
 
728
757
    def test_take_this(self):
729
758
        self.run_script("""
730
 
$ bzr rm -q dir  --force
 
759
$ bzr rm -q dir --no-backup
731
760
$ bzr resolve dir
732
 
2>2 conflict(s) resolved, 0 remaining
 
761
2>2 conflicts resolved, 0 remaining
733
762
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
734
763
""")
735
764
 
736
765
    def test_take_other(self):
737
766
        self.run_script("""
738
767
$ bzr resolve dir
739
 
2>2 conflict(s) resolved, 0 remaining
 
768
2>2 conflicts resolved, 0 remaining
740
769
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
741
770
""")
742
771
 
756
785
$ bzr commit -q -m 'Add dir/file2 in branch'
757
786
$ bzr branch -q . -r 1 ../branch
758
787
$ cd ../branch
759
 
$ bzr rm -q dir/file --force
 
788
$ bzr rm -q dir/file --no-backup
760
789
$ bzr rm -q dir
761
790
$ bzr commit -q -m 'Remove dir/file'
762
791
$ bzr merge ../trunk
770
799
    def test_keep_them_all(self):
771
800
        self.run_script("""
772
801
$ bzr resolve dir
773
 
2>2 conflict(s) resolved, 0 remaining
 
802
2>2 conflicts resolved, 0 remaining
774
803
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
775
804
""")
776
805
 
777
806
    def test_adopt_child(self):
778
807
        self.run_script("""
779
808
$ bzr mv -q dir/file2 file2
780
 
$ bzr rm -q dir --force
 
809
$ bzr rm -q dir --no-backup
781
810
$ bzr resolve dir
782
 
2>2 conflict(s) resolved, 0 remaining
 
811
2>2 conflicts resolved, 0 remaining
783
812
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
784
813
""")
785
814
 
786
815
    def test_kill_them_all(self):
787
816
        self.run_script("""
788
 
$ bzr rm -q dir --force
 
817
$ bzr rm -q dir --no-backup
789
818
$ bzr resolve dir
790
 
2>2 conflict(s) resolved, 0 remaining
 
819
2>2 conflicts resolved, 0 remaining
791
820
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
792
821
""")
793
822
 
816
845
$ echo 'trunk content' >dir/file
817
846
$ bzr add -q
818
847
$ bzr commit -m 'Create trunk' -q
819
 
$ bzr rm -q dir/file --force
820
 
$ bzr rm -q dir --force
 
848
$ bzr rm -q dir/file --no-backup
 
849
$ bzr rm -q dir --no-backup
821
850
$ bzr commit -q -m 'Remove dir/file'
822
851
$ bzr branch -q . -r 1 ../branch
823
852
$ cd ../branch
834
863
    def test_keep_them_all(self):
835
864
        self.run_script("""
836
865
$ bzr resolve dir
837
 
2>2 conflict(s) resolved, 0 remaining
 
866
2>2 conflicts resolved, 0 remaining
838
867
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
839
868
""")
840
869
 
841
870
    def test_adopt_child(self):
842
871
        self.run_script("""
843
872
$ bzr mv -q dir/file2 file2
844
 
$ bzr rm -q dir --force
 
873
$ bzr rm -q dir --no-backup
845
874
$ bzr resolve dir
846
 
2>2 conflict(s) resolved, 0 remaining
 
875
2>2 conflicts resolved, 0 remaining
847
876
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
848
877
""")
849
878
 
850
879
    def test_kill_them_all(self):
851
880
        self.run_script("""
852
 
$ bzr rm -q dir --force
 
881
$ bzr rm -q dir --no-backup
853
882
$ bzr resolve dir
854
 
2>2 conflict(s) resolved, 0 remaining
 
883
2>2 conflicts resolved, 0 remaining
855
884
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
856
885
""")
857
886
 
858
887
    def test_resolve_taking_this(self):
859
888
        self.run_script("""
860
889
$ bzr resolve --take-this dir
861
 
2>2 conflict(s) resolved, 0 remaining
 
890
2>2 conflicts resolved, 0 remaining
862
891
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
863
892
""")
864
893
 
867
896
$ bzr resolve --take-other dir
868
897
2>deleted dir/file2
869
898
2>deleted dir
870
 
2>2 conflict(s) resolved, 0 remaining
 
899
2>2 conflicts resolved, 0 remaining
871
900
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
872
901
""")
873
902
 
912
941
        return [('rename', ('dir1', 'dir2/dir1'))]
913
942
 
914
943
    def check_dir1_moved(self):
915
 
        self.failIfExists('branch/dir1')
916
 
        self.failUnlessExists('branch/dir2/dir1')
 
944
        self.assertPathDoesNotExist('branch/dir1')
 
945
        self.assertPathExists('branch/dir2/dir1')
917
946
 
918
947
    def do_move_dir2_into_dir1(self):
919
948
        return [('rename', ('dir2', 'dir1/dir2'))]
920
949
 
921
950
    def check_dir2_moved(self):
922
 
        self.failIfExists('branch/dir2')
923
 
        self.failUnlessExists('branch/dir1/dir2')
 
951
        self.assertPathDoesNotExist('branch/dir2')
 
952
        self.assertPathExists('branch/dir1/dir2')
924
953
 
925
954
    def do_create_dir1_4(self):
926
955
        return [('add', ('dir1', 'dir1-id', 'directory', '')),
932
961
        return [('rename', ('dir1', 'dir3/dir4/dir1'))]
933
962
 
934
963
    def check_dir1_2_moved(self):
935
 
        self.failIfExists('branch/dir1')
936
 
        self.failUnlessExists('branch/dir3/dir4/dir1')
937
 
        self.failUnlessExists('branch/dir3/dir4/dir1/dir2')
 
964
        self.assertPathDoesNotExist('branch/dir1')
 
965
        self.assertPathExists('branch/dir3/dir4/dir1')
 
966
        self.assertPathExists('branch/dir3/dir4/dir1/dir2')
938
967
 
939
968
    def do_move_dir3_into_dir2(self):
940
969
        return [('rename', ('dir3', 'dir1/dir2/dir3'))]
941
970
 
942
971
    def check_dir3_4_moved(self):
943
 
        self.failIfExists('branch/dir3')
944
 
        self.failUnlessExists('branch/dir1/dir2/dir3')
945
 
        self.failUnlessExists('branch/dir1/dir2/dir3/dir4')
 
972
        self.assertPathDoesNotExist('branch/dir3')
 
973
        self.assertPathExists('branch/dir1/dir2/dir3')
 
974
        self.assertPathExists('branch/dir1/dir2/dir3/dir4')
946
975
 
947
976
    def _get_resolve_path_arg(self, wt, action):
948
977
        # ParentLoop says: moving <conflict_path> into <path>. Cancelled move.
959
988
        if self._other['xfail']:
960
989
            # It's a bit hackish to raise from here relying on being called for
961
990
            # both tests but this avoid overriding test_resolve_taking_other
962
 
            raise tests.KnownFailure(
 
991
            self.knownFailure(
963
992
                "ParentLoop doesn't carry enough info to resolve --take-other")
964
993
    _assert_conflict = assertParentLoop
965
994
 
992
1021
 
993
1022
    def test_take_this(self):
994
1023
        self.run_script("""
995
 
$ bzr rm -q foo.new --force
 
1024
$ bzr rm -q foo.new --no-backup
996
1025
# FIXME: Isn't it weird that foo is now unkown even if foo.new has been put
997
1026
# aside ? -- vila 090916
998
1027
$ bzr add -q foo
999
1028
$ bzr resolve foo.new
1000
 
2>1 conflict(s) resolved, 0 remaining
 
1029
2>1 conflict resolved, 0 remaining
1001
1030
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
1002
1031
""")
1003
1032
 
1004
1033
    def test_take_other(self):
1005
1034
        self.run_script("""
1006
 
$ bzr rm -q foo --force
 
1035
$ bzr rm -q foo --no-backup
1007
1036
$ bzr mv -q foo.new foo
1008
1037
$ bzr resolve foo
1009
 
2>1 conflict(s) resolved, 0 remaining
 
1038
2>1 conflict resolved, 0 remaining
1010
1039
$ bzr commit -q --strict -m 'No more conflicts nor unknown files'
1011
1040
""")
1012
1041
 
1031
1060
        # This is nearly like TestResolveNonDirectoryParent but with branch and
1032
1061
        # trunk switched. As such it should certainly produce the same
1033
1062
        # conflict.
1034
 
        self.run_script("""
 
1063
        self.assertRaises(errors.MalformedTransform,
 
1064
                          self.run_script,"""
1035
1065
$ bzr init trunk
1036
1066
...
1037
1067
$ cd trunk
1051
1081
""")
1052
1082
 
1053
1083
 
 
1084
class TestNoFinalPath(script.TestCaseWithTransportAndScript):
 
1085
 
 
1086
    def test_bug_805809(self):
 
1087
        self.run_script("""
 
1088
$ bzr init trunk
 
1089
Created a standalone tree (format: 2a)
 
1090
$ cd trunk
 
1091
$ echo trunk >file
 
1092
$ bzr add
 
1093
adding file
 
1094
$ bzr commit -m 'create file on trunk'
 
1095
2>Committing to: .../trunk/
 
1096
2>added file
 
1097
2>Committed revision 1.
 
1098
# Create a debian branch based on trunk
 
1099
$ cd ..
 
1100
$ bzr branch trunk -r 1 debian
 
1101
2>Branched 1 revision.
 
1102
$ cd debian
 
1103
$ mkdir dir
 
1104
$ bzr add
 
1105
adding dir
 
1106
$ bzr mv file dir
 
1107
file => dir/file
 
1108
$ bzr commit -m 'rename file to dir/file for debian'
 
1109
2>Committing to: .../debian/
 
1110
2>added dir
 
1111
2>renamed file => dir/file
 
1112
2>Committed revision 2.
 
1113
# Create an experimental branch with a new root-id
 
1114
$ cd ..
 
1115
$ bzr init experimental
 
1116
Created a standalone tree (format: 2a)
 
1117
$ cd experimental
 
1118
# Work around merging into empty branch not being supported
 
1119
# (http://pad.lv/308562)
 
1120
$ echo something >not-empty
 
1121
$ bzr add
 
1122
adding not-empty
 
1123
$ bzr commit -m 'Add some content in experimental'
 
1124
2>Committing to: .../experimental/
 
1125
2>added not-empty
 
1126
2>Committed revision 1.
 
1127
# merge debian even without a common ancestor
 
1128
$ bzr merge ../debian -r0..2
 
1129
2>+N  dir/
 
1130
2>+N  dir/file
 
1131
2>All changes applied successfully.
 
1132
$ bzr commit -m 'merging debian into experimental'
 
1133
2>Committing to: .../experimental/
 
1134
2>added dir
 
1135
2>added dir/file
 
1136
2>Committed revision 2.
 
1137
# Create an ubuntu branch with yet another root-id
 
1138
$ cd ..
 
1139
$ bzr init ubuntu
 
1140
Created a standalone tree (format: 2a)
 
1141
$ cd ubuntu
 
1142
# Work around merging into empty branch not being supported
 
1143
# (http://pad.lv/308562)
 
1144
$ echo something >not-empty-ubuntu
 
1145
$ bzr add
 
1146
adding not-empty-ubuntu
 
1147
$ bzr commit -m 'Add some content in experimental'
 
1148
2>Committing to: .../ubuntu/
 
1149
2>added not-empty-ubuntu
 
1150
2>Committed revision 1.
 
1151
# Also merge debian
 
1152
$ bzr merge ../debian -r0..2
 
1153
2>+N  dir/
 
1154
2>+N  dir/file
 
1155
2>All changes applied successfully.
 
1156
$ bzr commit -m 'merging debian'
 
1157
2>Committing to: .../ubuntu/
 
1158
2>added dir
 
1159
2>added dir/file
 
1160
2>Committed revision 2.
 
1161
# Now try to merge experimental
 
1162
$ bzr merge ../experimental
 
1163
2>+N  not-empty
 
1164
2>Path conflict: dir / dir
 
1165
2>1 conflicts encountered.
 
1166
""")
 
1167
 
 
1168
 
1054
1169
class TestResolveActionOption(tests.TestCase):
1055
1170
 
1056
1171
    def setUp(self):