/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/revisiontree.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:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
20
20
 
21
21
from bzrlib import (
22
22
    errors,
 
23
    osutils,
23
24
    revision,
 
25
    symbol_versioning,
24
26
    tree,
25
27
    )
26
28
 
101
103
 
102
104
    def get_file_mtime(self, file_id, path=None):
103
105
        ie = self._inventory[file_id]
104
 
        try:
105
 
            revision = self._repository.get_revision(ie.revision)
106
 
        except errors.NoSuchRevision:
107
 
            raise errors.FileTimestampUnavailable(self.id2path(file_id))
 
106
        revision = self._repository.get_revision(ie.revision)
108
107
        return revision.timestamp
109
108
 
110
109
    def is_executable(self, file_id, path=None):