Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

#4694 closed defect (worksforme)

Unified diff sections are not displayed when there are only the ---/+++ headers.

Reported by: bulb@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.10.3
Severity: normal Keywords: mimeview diff
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If you upload a multi-file unified diff that has no other headers than the —-/+++ lines, than only odd files are displayed in the formatted view. Such diff is however correct and patch will happily apply changes to all files. The attached diffs are the same, but the diff -u this that comments were removed from the headerless.diff. You can check by viewing the attachments, that the attachment:headerless.diff only shows differences to one file, while the attachment:headerfull.diff shows differences to both.

Note: I checked this with our installation at work which is 0.10.3 from Debian; and with the live demo site.

Attachments (2)

headerful.diff (766 bytes ) - added by bulb@… 18 years ago.
Normally shown diff.
headerless.diff (710 bytes ) - added by bulb@… 18 years ago.
Diff where one section is not displayed.

Download all attachments as: .zip

Change History (7)

by bulb@…, 18 years ago

Attachment: headerful.diff added

Normally shown diff.

by bulb@…, 18 years ago

Attachment: headerless.diff added

Diff where one section is not displayed.

comment:1 by Christian Boos, 18 years ago

Resolution: worksforme
Status: newclosed

I just verified that attachment:headerless.diff displays correctly in 0.11.

We don't plan to backport those fixes on 0.10-stable however, as the code base has already significantly diverged there.

comment:2 by Christian Boos, 18 years ago

Keywords: mimeview diff added

comment:3 by bulb@…, 18 years ago

Fix should be:

  • trac/mimeview/patch.py

    old new  
    178178                            fromline += 1
    179179                        else:
    180180                            return None
    181                 line = lines.next()
    182181        except StopIteration:
    183182            pass
    184183

and looking at current trunk, it seems to really be fixed.

If you don't plan to release 0.10.4, you should somehow remove it ;-).

in reply to:  3 comment:4 by Christian Boos, 18 years ago

Milestone: 0.10.4
Resolution: worksforme
Status: closedreopened

Replying to bulb@ucw.cz:

Fix should be: …

OK, a patch helps ;)

The problem is that we have to be reasonably sure that there are no regressions.

If you don't plan to release 0.10.4, you should somehow remove it ;-).

We will, but mostly with important bugfixes.

I nevertheess reopen the issue, so the patch might get in…

comment:5 by Christian Boos, 17 years ago

Milestone: 0.10.5
Resolution: worksforme
Status: reopenedclosed

Closing as worksforme again. 0.10.x is mostly frozen now.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.