loggerhead - doesn't detect new line

Bug #273688 reported by Savvas Radevic
8
Affects Status Importance Assigned to Milestone
loggerhead
Fix Released
Undecided
Michael Hudson-Doyle

Bug Description

I'm looking at http://bazaar.launchpad.net/~timekpr-maintainers/timekpr/trunk/changes

When I use "bzr commit -m", I separate the subject message as such:
bzr commit -m "* Change 1
* Change 2
* Change 3"

"bzr log -r33" command shows the log message correctly:
message:
  * Changed variables to all caps, easier to see
  * Added timekpr.conf
  * ...

Now look at rev #33 at that link: * Changed variables to all caps, easier to see * Added timekpr.conf * Separated directories: 1) for work /var/lib/timekpr (dir) 2) for per-user configuration /etc/timekpr (dir) 3) for timekpr main variables /etc/timekpr.conf (file) * Added admin privileges check

Loggerhead doesn't detect the new lines and treat them as such, instead it truncates everything into one line

Revision history for this message
Martin Albisetti (beuno) wrote :

That is by design, as line breaks will break the formatting.
You can see your full commit message if you actually go to the revision: http://bazaar.launchpad.net/~timekpr-maintainers/timekpr/trunk/revision/33

Changed in loggerhead:
status: New → Won't Fix
Revision history for this message
Jake Wheat (jakewheat) wrote :

Not preserving newlines seems to make any commit message with newlines in it somewhat unreadable.

Has the changes page changed since last September, or am I missing something - I'm struggling to see how preserving the line breaks would break the formatting.

Sorry to comment on a bug marked won't fix, and if I've missed something obvious.

Revision history for this message
Peter Bui (pnutzh4x0r) wrote :

I had this same problem and hacked together a fix. A patch against revision 277 is attached. It can also be found at: https://code.launchpad.net/~pnutzh4x0r/loggerhead/loggerhead-convert-comment-newlines

It's rather unfortunate that this is marked won't fix, since it is really annoying to have long comments unreadable. I also don't see how it breaks formatting.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Didn't realise Martin had marked this won't fix -- I disagree too! Reopening.

Changed in loggerhead:
status: Won't Fix → Confirmed
Revision history for this message
Peter Bui (pnutzh4x0r) wrote :

My original fix added unnecessary <br/>'s to the annotated view, so please disregard the previously attached patch. Fortunately, I fixed this error with latest commit in my local branch above. Now, fix_width will behave normally (in the same way as in mainline) unless you pass convert_newlines=True:

util.fix_width(some_string, convert_newlines=True)

This should allow backwards compatibility for the fix_width function and allow for the new line converstion functionality.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Well, I actually made the annotate view not use fixed_width in a recent branch, so I removed that again from your branch and merged it :)

Thanks for all your recent patches!

Changed in loggerhead:
assignee: nobody → mwhudson
status: Confirmed → Fix Committed
Revision history for this message
Savvas Radevic (medigeek) wrote :

Wonderful! thank you :)

Martin Albisetti (beuno)
Changed in loggerhead:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.