~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Robert Collins
  • Date: 2005-10-10 01:32:08 UTC
  • Revision ID: robertc@robertcollins.net-20051010013208-163c23746972763a
branch: namespace

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
        oldtmpf.close()                 # and delete
141
141
        newtmpf.close()
142
142
 
143
 
def show_diff(b, revision, specific_files, external_diff_options=None,
 
143
def show_diff(b, from_spec, specific_files, external_diff_options=None,
144
144
              revision2=None, output=None):
145
145
    """Shortcut for showing the diff to the working tree.
146
146
 
148
148
        Branch.
149
149
 
150
150
    revision
151
 
        None for each, or otherwise the old revision to compare against.
 
151
        None for 'basis tree', or otherwise the old revision to compare against.
152
152
    
153
153
    The more general form is show_diff_trees(), where the caller
154
154
    supplies any two trees.
157
157
        import sys
158
158
        output = sys.stdout
159
159
 
160
 
    if revision is None:
 
160
    if from_spec is None:
161
161
        old_tree = b.basis_tree()
162
162
    else:
163
 
        old_tree = b.revision_tree(revision.in_history(b).rev_id)
 
163
        old_tree = b.revision_tree(from_spec.in_history(b).rev_id)
164
164
 
165
165
    if revision2 is None:
166
166
        new_tree = b.working_tree()