~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Martin Pool
  • Date: 2005-08-04 22:30:50 UTC
  • Revision ID: mbp@sourcefrog.net-20050804223050-01256e5e26a90b1d
- merge patch to take ranges to diff -r option

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
    
144
144
 
145
145
 
146
 
def show_diff(b, revision, specific_files, external_diff_options=None):
 
146
def show_diff(b, revision, specific_files, external_diff_options=None,
 
147
              revision2=None):
147
148
    """Shortcut for showing the diff to the working tree.
148
149
 
149
150
    b
161
162
        old_tree = b.basis_tree()
162
163
    else:
163
164
        old_tree = b.revision_tree(b.lookup_revision(revision))
164
 
        
165
 
    new_tree = b.working_tree()
 
165
 
 
166
    if revision2 == None:
 
167
        new_tree = b.working_tree()
 
168
    else:
 
169
        new_tree = b.revision_tree(b.lookup_revision(revision2))
166
170
 
167
171
    show_diff_trees(old_tree, new_tree, sys.stdout, specific_files,
168
172
                    external_diff_options)