~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Lalo Martins
  • Date: 2005-09-13 09:52:12 UTC
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050913095212-210555d61a893f1e
fixing up users of RevisionSpec, and moving it over to commands.py
(single point)

There are still a few users who could move, but that's a thought for
later... when someone sits down to separate UI from backend code.

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
160
159
    import sys
161
 
    from bzrlib.revisionspec import RevisionSpec
162
160
 
163
161
    if revision is None:
164
162
        old_tree = b.basis_tree()
165
163
    else:
166
 
        old_tree = b.revision_tree(RevisionSpec(revision).in_history(b).rev_id)
 
164
        old_tree = b.revision_tree(revision.in_history(b).rev_id)
167
165
 
168
166
    if revision2 is None:
169
167
        new_tree = b.working_tree()
170
168
    else:
171
 
        new_tree = b.revision_tree(RevisionSpec(revision2).in_branch(b).rev_id)
 
169
        new_tree = b.revision_tree(revision2.in_branch(b).rev_id)
172
170
 
173
171
    show_diff_trees(old_tree, new_tree, sys.stdout, specific_files,
174
172
                    external_diff_options)