#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 , 19 years ago
| Keywords: | needinfo added |
|---|
comment:2 by , 19 years ago
| Keywords: | needinfo removed |
|---|---|
| Milestone: | → 0.10.1 |
| Owner: | changed from to |
| 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 , 19 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 , 19 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 , 18 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
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 , 18 years ago
| Milestone: | 0.10.5 |
|---|



It's not the same command. Trac uses Python's
difflibto 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.