Modify ↓
Ticket #271 (closed defect: fixed)
trailing spaces in date/name/address line for entry break parsing
| Reported by: | tim@… | Owned by: | thomas |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.2.6 |
| Component: | moap | Version: | TRUNK |
| Keywords: | Cc: |
Description
Take the following ChangeLog? entry:
2006-09-29 Philippe Kalaf <philippe.kalaf@…>
- gst-libs/gst/rtp/gstbasertpaudiopayload.c: Removed empty * between paragraphs
moap will parse this as name="Philippe Kalaf <philippe.kalaf@…>" and address=None (there are also trailing space in that line, but I haven't checked whether they're important or not).
Attachments
Change History
Changed 6 years ago by tim@…
-
attachment
moap-strip-header-line-1.diff
added
patch (since trac seems to have screwed up the paste in the previous comment)
comment:2 Changed 5 years ago by thomas
- Summary changed from minor changelog entry parsing issue to trailing spaces in date/name/address line for entry break parsing
comment:3 Changed 5 years ago by thomas
- Status changed from new to closed
- Resolution set to fixed
(In [346]) modified patch by: Tim Philipp-M?\195?\188ller <t.i.m at zen.co.uk>
- moap/test/Makefile.am:
- moap/test/ChangeLog/ChangeLog.gst-plugins-base.271:
- moap/test/test_commands_cl.py: Add a test for trailing whitespace in the date/name/address line.
- moap/command/cl.py: Fix parsing when there's trailing whitespace. Fixes #271.
Note: See
TracTickets for help on using
tickets.

Indeed, the trailing spaces throw off the ChangeEntry? parser due to:
($ = end of line), so if there are spaces after the '>' there's no match.
Quick fix:
Index: moap/command/cl.py =================================================================== --- moap/command/cl.py (revision 321) +++ moap/command/cl.py (working copy) @@ -81,7 +81,7 @@
+ m = _nameRegex.search(lines[0].strip())
Only works for spaces, not tabs, but so far I haven't encountered trailing tabs yet.