/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/blackbox/test_conflicts.py

Replace --interactive by --action.

* bzrlib/tests/test_conflicts.py:
Switch from --interactive to --action.

* bzrlib/tests/blackbox/test_conflicts.py:
(TestResolve): Delete the --interactive tests.

* bzrlib/conflicts.py:
(cmd_resolve.run): Add an 'action' parameter. Refactor to clarify
what action is executed when. Get rid of the --interactive attempt.
(resolve): Add an 'action' parameter. Refactor to make the
conflict deletion depends on the resolution success.
(_resolve_interactive): Deleted.
(ConflictList.remove_files): Use conflict.cleanup()
(Conflict._do): Helper to execute an arbitratry resolution action.
(Conflict.cleanup, Conflict.done, Conflict.keep_mine,
Conflict.take_their): Declare the abstract methods.
(PathConflict.cleanup, PathConflict.done): Do-nothing
implementations.
(ContentsConflict.cleanup): Specific cleanup (strange).
(TextConflict.cleanup): Specific cleanup.
(HandledConflict.done, HandledConflict.cleanup): Do nothing
implementations.
(UnversionedParent.keep_mine, UnversionedParent.take_their): Hmm,
forced do-nothing implementations, something weird is going on
here.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
        self.build_tree_contents([('file', 'a\n')])
121
121
        note = self.run_bzr('resolve')[1]
122
122
        self.assertContainsRe(note, 'All conflicts resolved.')
123
 
 
124
 
    def test_resolve_interactive(self):
125
 
        out, err = self.run_bzr('resolve --interactive mydir2', retcode=0,
126
 
                                stdin='quit')
127
 
 
128
 
    def test_resolve_interactive_all(self):
129
 
        self.run_bzr_error(['--all and --interactive are mutually exclusive'],
130
 
                          ['resolve', '--interactive', '--all'])
131
 
 
132
 
    def test_resolve_interactive_with_no_files(self):
133
 
        self.run_bzr_error(['--interactive requires a single FILE parameter'],
134
 
                          ['resolve', '--interactive'])
135
 
 
136
 
    def test_resolve_interactive_with_too_much_files(self):
137
 
        self.run_bzr_error(['--interactive requires a single FILE parameter'],
138
 
                          ['resolve', '--interactive', 'foo', 'bar'])