Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#3832 closed defect (worksforme)

Changeset unified diff doesn't work with new files

Reported by: paolo Owned by: Matthew Good
Priority: normal Milestone:
Component: version control Version: 0.9.4
Severity: normal Keywords: needinfo
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

hi, this issue came up while try to track madwifi (madwifi.org) devel: I'd grab CS then apply in order, but sometime - seems when files are moved around - resulting CS is broken, i.e. don't match what "svn -r …" would report. Which sounds pretty wierd - isn't just *that* same command used by TRAC do generate the CS? For ref. pls see http://article.gmane.org/gmane.linux.drivers.madwifi.devel/3246/match=ath+hal+directory

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 18 years ago

Keywords: needinfo added

It's not the same command. Trac uses Python's difflib to compare the two contents.

Plus, I was not really able to relate changeset the http://madwifi.org/changeset/1742 to the example in the mail… can you be more precise about the issue?

Also, as 0.10 is out, it might be a good idea to make a quick experimental install, and check if the problem is still there.

comment:2 by Matthew Good, 18 years ago

Keywords: needinfo removed
Milestone: 0.10.1
Owner: changed from Christopher Lenz to Matthew Good
Summary: changeset generation seems broken: CS sometimes won't match "svn diff -r ..."Changeset unified diff doesn't work with new files

Yeah, I was very confused by the description for this as well, but after checking the unified diff I can see that the diff headers generated for newly added files are incorrect. This is what Trac generates:

--- (revision )
+++ ah_target.inc (revision 1742)
@@ -1,0 +1,36 @@

It should be:

--- ah_target.inc (revision 0)
+++ ah_target.inc (revision 1742)
@@ -0,0 +1,36 @@

Patch will take the filename from the "—-" line, so it needs a filename there. Also patch gets confused by the "-1" indicated that the patch starts at line 1 of the old file and there was no line 1. So, that needs to be line 0.

comment:3 by Christian Boos, 18 years ago

I don't remember the details, but I had to make a fix for the Add case in the TracDiff branch quite a while ago. Probably this is needed in the Copy and Rename case too.

comment:4 by Matthew Good, 18 years ago

Keywords: needinfo added

AFAICT this should be working. Can you upgrade Trac on madwifi.org to 0.10.3.1 and check that this is working?

comment:5 by Matthew Good, 17 years ago

Resolution: worksforme
Status: newclosed

I'll take the lack of response as an indication this is not still a problem. Please reopen with more information if it still exists.

comment:6 by Matthew Good, 17 years ago

Milestone: 0.10.5

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good 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.