Comment 6 for bug 438531

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 438531] Re: Imported SVN repo differs from upstream repo

On Tue, 2009-09-29 at 15:14 +0000, Jelmer Vernooij wrote:
> It sounds like you suggest changing this "remove + copy" operation to a
> simple "modify" operation on the fly if the copy is from an older
> version of the same file. Is that a correct interpretation?

Yes.

> This is unfortunately not possible without severe performance
> consequences. If there is no remove+add this means that the file id does
> not change, and to prove this we would have to analyse the history of a
> particular file to see if it shared history with the file it was copied
> from each time we encounter a file copy.

I mean, you know SVN a million times better than I, but it seems to me
that you'd already have to track that information as both of the file ID
would have to be found, and you could determine that they're the same.
At that point it's only calculating a diff between them and applying the
diff.

So if you're looking at a rev like this:

r3
   delete:
         342340823498 r2 as configure.ac
   copy:
         342340823498 r1 as configure.ac

Then you see that the two IDs are the same. Do a:

   diff 342340823498 -r 2..3

And record that as the change instead of what was given. I'm unsure why
you'd have to trace the file back to all it's revisions as we only need
the difference between the previous one (being deleted) and the final
one created in the revision we're trying to represent.