~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Aaron Bentley
  • Date: 2009-08-14 15:35:31 UTC
  • mto: (4603.1.22 shelve-editor)
  • mto: This revision was merged to the branch mainline in revision 4795.
  • Revision ID: aaron@aaronbentley.com-20090814153531-t3t34s2obh05uga7
Simplify unchanged case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
316
316
                else:
317
317
                    offset -= (hunk.mod_range - hunk.orig_range)
318
318
        sys.stdout.flush()
319
 
        if not self.reporter.invert_diff and (
320
 
            len(parsed.hunks) == len(final_hunks)):
321
 
            return work_tree_lines, 0
322
 
        if self.reporter.invert_diff and len(final_hunks) == 0:
323
 
            return work_tree_lines, 0
324
 
        patched = patches.iter_patched_from_hunks(target_lines, final_hunks)
325
 
        lines = list(patched)
326
319
        if self.reporter.invert_diff:
327
320
            change_count = len(final_hunks)
328
321
        else:
329
322
            change_count = len(parsed.hunks) - len(final_hunks)
 
323
        patched = patches.iter_patched_from_hunks(target_lines,
 
324
                                                  final_hunks)
 
325
        lines = list(patched)
330
326
        return lines, change_count
331
327
 
332
328
    def _edit_file(self, creator, file_id):