~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Lalo Martins
  • Date: 2005-09-08 11:08:13 UTC
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050908110811-49e867a4d2c07bf2
getting rid of branch.lookup_revision()

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
    The more general form is show_diff_trees(), where the caller
157
157
    supplies any two trees.
158
158
    """
 
159
    # XXX: the RevisionSpec stuff should be done by the caller (UI) code
159
160
    import sys
 
161
    from bzrlib.revisionspec import RevisionSpec
160
162
 
161
163
    if revision == None:
162
164
        old_tree = b.basis_tree()
163
165
    else:
164
 
        old_tree = b.revision_tree(b.lookup_revision(revision))
 
166
        old_tree = b.revision_tree(RevisionSpec(b, revision).rev_id)
165
167
 
166
168
    if revision2 == None:
167
169
        new_tree = b.working_tree()
168
170
    else:
169
 
        new_tree = b.revision_tree(b.lookup_revision(revision2))
 
171
        new_tree = b.revision_tree(RevisionSpec(b, revision2).rev_id)
170
172
 
171
173
    show_diff_trees(old_tree, new_tree, sys.stdout, specific_files,
172
174
                    external_diff_options)