This should do nicely! Thank you! Now my challenge is that the svn dump doesn't *actually* say "rename a/ to b/"; it says "copy a/ to b/; delete a/", so I have to infer the rename. But your patch makes my import possible, and it wasn't before! Cheers, - David On 7/9/07, Shawn O. Pearce <spearce@xxxxxxxxxxx> wrote:
Some source material (e.g. Subversion dump files) perform directory renames without telling us exactly which files in that subdirectory were moved. This makes it hard for a frontend to convert such data formats to a fast-import stream, as all the frontend has on hand is "Rename a/ to b/" with no details about what files are in a/, unless the frontend also kept track of all files. The new 'R' subcommand within a commit allows the frontend to rename either a file or an entire subdirectory, without needing to know the object's SHA-1 or the specific files contained within it. The rename is performed as efficiently as possible internally, making it cheaper than a 'D'/'M' pair for a file rename. Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> --- David Frech <david@xxxxxxxxxxxxxxxxxx> wrote: > Git can track file renames implicitly. If I delete and then add (under > a different name) the same content, git will figure that out. > > But if a directory was renamed, I have no way to tell fast-import > about it. I can't delete the directory (using a 'D' command) and then > add it back (with a different name) with all its contents, because my > source material (an svn dump file) doesn't tell me, at that point, > about all the files involved because nothing about them has changed. > > fast-import knows about the contents of the directory I want to > rename, but doesn't give me a primitive to do the rename. Is this > something we need to add? My frontend could keep track of this, but I > would duplicating work that fast-import is already doing. Does the following do the trick for you? It is also available from my fastimport.git master branch: git://repo.or.cz/git/fastimport.git master http://repo.or.cz/r/git/fastimport.git master Yes, it passes all tests...
[patch elided] - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html