~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patches.py

  • Committer: Patch Queue Manager
  • Date: 2015-09-30 16:43:21 UTC
  • mfrom: (6603.2.2 fix-keep-dirty)
  • Revision ID: pqm@pqm.ubuntu.com-20150930164321-ct2v2qnmvimqt8qf
(vila) Avoid associating dirty patch headers with the previous file in the
 patch. (Colin Watson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
 
359
359
    for line in iter_lines:
360
360
        if line.startswith('=== '):
 
361
            if len(saved_lines) > 0:
 
362
                if keep_dirty and len(dirty_head) > 0:
 
363
                    yield {'saved_lines': saved_lines,
 
364
                           'dirty_head': dirty_head}
 
365
                    dirty_head = []
 
366
                else:
 
367
                    yield saved_lines
 
368
                saved_lines = []
361
369
            dirty_head.append(line)
362
370
            continue
363
371
        if line.startswith('*** '):