121: svn diffs with renames are not properly handled

email.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
April 28, 2008
Uploading a diff with a rename causes a file not found in the repository error.

In the attached patch PhysicalMatching.proj was renamed to
PhysicalMatching2.proj and a space was removed.

I think the problem is the diff itself, the diff is built as if the file
already had that name in the repository and shows just the space removal.

The question is, can review board work around this?
david
#1 david
Hmm, I'm not sure we can do anything about it.  Just having the diff you attached
doesn't give us enough information.  One thing we might be able to do is make the SVN
implementation of post-review smart enough to generate diffs that work for us.
  • +Component-DiffViewer
chipx86
#2 chipx86
This looks like Subversion, am I right?

In Subversion, you'll hit this problem only if you rename and then modify the file.
If you just rename, it'll look like a delete. Unfortunately, we have no way of
knowing that the file was renamed.. Not sure what to do about this. Yeah, we *might*
be able to do something in post-review, but I'm unsure yet.
chipx86
#3 chipx86
  • -Priority-Medium
    +Priority-Low
    +Component-Scripts
#4 davida******@gmai***** (Google Code) (Is this you? Claim this profile.)
I've run into this too.  Is there a work around?
chipx86
#5 chipx86
Not really. If you're going to rename a file, it's best to do it in a separate commit
from any modifications. We don't have any plans for a fix. If someone can come up
with something creative, we'd love to take a patch for this.
#6 daniel.d********@gmai***** (Google Code) (Is this you? Claim this profile.)
This should be doable from post-review. svn info has information "Copied From URL:"
which could be used to send the needed info up to the server.

On a related note, also to do with fancy file location errors, has anyone had a
chance yet to look at issue #451 and my patch to fix it?
david
#7 david
Fixed in SVN.  You have to use post-review, since the diffs produced with "svn diff"
don't have enough information to cope with this situation.
  • +Fixed