~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 23:18:27 UTC
  • mfrom: (1437)
  • mto: This revision was merged to the branch mainline in revision 1438.
  • Revision ID: robertc@robertcollins.net-20051010231827-f9e2dda2e92bf565
mergeĀ fromĀ upstream

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()