~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-15 11:36:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5975.
  • Revision ID: v.ladeuil+lp@free.fr-20110615113605-p7zyyfry9wy1hquc
Make ContentConflict resolution more robust

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    symbol_versioning,
28
28
    workingtree,
29
29
    )
30
 
from bzrlib.i18n import gettext
31
30
""")
32
31
 
33
32
from bzrlib import (
209
208
    def in_history(self, branch):
210
209
        if branch:
211
210
            if self.wants_revision_history:
212
 
                # TODO: avoid looking at all of history
213
 
                branch.lock_read()
214
 
                try:
215
 
                    graph = branch.repository.get_graph()
216
 
                    revs = list(graph.iter_lefthand_ancestry(
217
 
                        branch.last_revision(), [revision.NULL_REVISION]))
218
 
                finally:
219
 
                    branch.unlock()
220
 
                revs.reverse()
 
211
                revs = branch.revision_history()
221
212
            else:
222
213
                revs = None
223
214
        else:
919
910
            location_type = 'parent branch'
920
911
        if submit_location is None:
921
912
            raise errors.NoSubmitBranch(branch)
922
 
        trace.note(gettext('Using {0} {1}').format(location_type,
923
 
                                                        submit_location))
 
913
        trace.note('Using %s %s', location_type, submit_location)
924
914
        return submit_location
925
915
 
926
916
    def _match_on(self, branch, revs):