~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patches.py

  • Committer: Benoît Pierre
  • Date: 2008-12-02 23:50:01 UTC
  • mto: (4056.1.1 trunk2)
  • mto: This revision was merged to the branch mainline in revision 4058.
  • Revision ID: benoit.pierre@gmail.com-20081202235001-3pjztdd1gjbh40cb
Fix regressions in other parts of the testsuite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
 
237
237
 
238
238
def iter_hunks(iter_lines):
239
 
    iter_lines = iter_lines_handle_nl(iter_lines)
240
239
    hunk = None
241
240
    for line in iter_lines:
242
241
        if line == "\n":
313
312
 
314
313
 
315
314
def parse_patch(iter_lines):
 
315
    iter_lines = iter_lines_handle_nl(iter_lines)
316
316
    (orig_name, mod_name) = get_patch_names(iter_lines)
317
317
    patch = Patch(orig_name, mod_name)
318
318
    for hunk in iter_hunks(iter_lines):
391
391
    """Iterate through a series of lines with a patch applied.
392
392
    This handles a single file, and does exact, not fuzzy patching.
393
393
    """
 
394
    patch_lines = iter_lines_handle_nl(iter(patch_lines))
394
395
    get_patch_names(patch_lines)
395
396
    return iter_patched_from_hunks(orig_lines, iter_hunks(patch_lines))
396
397