bzrlib.patches should provide a means of accessing file modified patch headers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Kit Randel | ||
Launchpad itself |
Fix Released
|
Undecided
|
Kit Randel |
Bug Description
bzrlib.
"=== modified file 'foo/bar.py'"
"--- foo/bar.py 19:00:00.000000000 -0500"
"+++ foo/bar.py 15:53:57.000000000 -0400"
"@@ -0,0 +1,2 @@"
etc...
It would be valuable if these headers could be parsed, and made accessible from a Patch.get_
== Motivation ==
Launchpad currently provides emails to users when inline diff comments are made in the context of a branch merge proposal. These emails tend to be very verbose (https:/
Related branches
- Richard Wilbur: Approve
- Vincent Ladeuil: Approve
-
Diff: 226 lines (+58/-20)3 files modifiedbzrlib/patches.py (+32/-9)
bzrlib/tests/test_patches.py (+22/-11)
doc/en/release-notes/bzr-2.7.txt (+4/-0)
tags: | added: feature |
tags: | added: bzrlib.patches |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in launchpad: | |
assignee: | nobody → Bayard 'kit' Randel (blr) |
Changed in bzr: | |
assignee: | nobody → Bayard 'kit' Randel (blr) |
status: | New → Fix Committed |
importance: | Undecided → High |
milestone: | none → 2.7b1 |
Changed in launchpad: | |
status: | New → Fix Released |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
Since this bug was logged, my thinking around how this should be handled has changed a bit. Dirty 'file state' headers, even those directly adjacent to a patch, are not valid entities in a unified diff and should not really be directly associated with a patch object. With our launchpad usecase however, we really need to not only allow parsing of these headers (allowed by allow_dirty), but also to preserve them.