Merge lp:~jelmer/brz/patch-handling into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/patch-handling
Merge into: lp:brz/3.1
Diff against target: 17 lines (+6/-1)
1 file modified
breezy/patches.py (+6/-1)
To merge this branch: bzr merge lp:~jelmer/brz/patch-handling
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+390380@code.launchpad.net

Commit message

Fix handling of dirty heads when parsing patches.

Description of the change

Fix handling of dirty heads when parsing patches.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/patches.py'
2--- breezy/patches.py 2020-07-04 12:29:00 +0000
3+++ breezy/patches.py 2020-09-08 02:57:53 +0000
4@@ -419,7 +419,12 @@
5
6 for line in iter_lines:
7 if line.startswith(b'=== '):
8- if len(saved_lines) > 0:
9+ if allow_dirty and beginning:
10+ # Patches can have "junk" at the beginning
11+ # Stripping junk from the end of patches is handled when we
12+ # parse the patch
13+ pass
14+ elif len(saved_lines) > 0:
15 if keep_dirty and len(dirty_head) > 0:
16 yield {'saved_lines': saved_lines,
17 'dirty_head': dirty_head}

Subscribers

People subscribed via source and target branches