cvsview2.cgi doesn't wrap correctly

VERIFIED FIXED

Status

VERIFIED FIXED
15 years ago
2 years ago

People

(Reporter: mvl, Assigned: mvl)

Tracking

Details

(URL)

Attachments

(2 obsolete attachments)

When viewing a checkin, the layout is broken when very long changes are changed
(>160 chars). See the url for an example.
A long line is wrapped after 80 chars, but not after 160 or more chars.
(Assignee)

Comment 1

15 years ago
Created attachment 137364 [details] [diff] [review]
patch v1

the regex to break the lines matches the entire line, so to /g doesn't work.
This patch makes it only match the first (or second, or ...) 80 chars.

I don't have a bonsai installation, so I couldn't test this patch, but it
should just work :)
(Assignee)

Comment 2

15 years ago
Created attachment 137365 [details] [diff] [review]
patch v2

Updated patch Don't use chomp, because that eats the original newline.
Neil noted that $newline can't have newlines in it, so using . to match will
work.
(Assignee)

Updated

15 years ago
Attachment #137364 - Attachment is obsolete: true

Comment 3

14 years ago
Comment on attachment 137365 [details] [diff] [review]
patch v2

>Index: webtools/bonsai/cvsview2.cgi
>@@ -732,13 +732,14 @@ sub print_cell {
>+        # Wrap to 80 chars. Preserve the newline at the end

s/Preserve/Leave/ ... you're *changing* the newline :)

>+        $newline =~ s/(.{80})\r?\n?/$1\n/g;
Attachment #137365 - Flags: review+

Updated

13 years ago
Assignee: tara → mvl

Comment 4

13 years ago
Comment on attachment 137365 [details] [diff] [review]
patch v2

mozilla/webtools/bonsai/cvsview2.cgi 	1.43
Attachment #137365 - Attachment is obsolete: true

Updated

13 years ago
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED

Comment 5

13 years ago
http://rheet.mozilla.org/webtools/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=video-spreadfirefox/testimonials&command=DIFF_FRAMESET&file=index.html&rev1=1.10&rev2=1.11&root=/cvsroot

verified fixed on cvs-www. thanks again. hopefully the main bonsai will update shortly and the original testcase url will work.
Status: RESOLVED → VERIFIED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.