From: "David Frech" <nimblemachines@gmail.com>
To: git@vger.kernel.org
Subject: challenges using fast-import and svn
Date: Mon, 2 Jul 2007 12:26:17 -0700 [thread overview]
Message-ID: <7154c5c60707021226k3a7b82fcl7558cfc66d61dde@mail.gmail.com> (raw)
I have an svn repo containing several small projects that is an odd
"shape" (in terms of directories) because of its history;
git-svnimport doesn't like the directory structure, and I wasn't able
to coax it to work.
I looked around for other options, and discovered fast-import (thanks
Shawn!). I decided that the "easiest" approach would be to parse the
svn dump file and feed the commits into fast-import.
So I wrote, in Lua, a parser for the (terrible) svn dump file format
that feeds commands into fast-import. The parser took a day and a half
to write; the fast-import backend took about an hour. ;-)
However, there are issues. I don't currently track branch copies
correctly, so branches start out with no history, rather than the with
the history of the branch they are copied from; and handling deletes
is tricky.
This last thing is my main "question" to the list, although I'm
curious if anyone else has played with svn dump files, and whether my
approach makes sense.
Here is the problem: if a file or directory is deleted in svn, the
dumpfile shows simply this:
Node-path: trunk/project/file-or-directory
Node-action: delete
In the case of a file, I can simply feed a "D" command to fast-import;
but if I'm deleting a whole directory, my code knows nothing about
what files exist in that directory. Is fast-import smart about this?
Will it barf if given a directory argument rather than a file for "D"
commands?
I could cache the directory contents in my code, but isn't that partly
what fast-import is good for?
Any thoughts are welcome.
Cheers,
- David
--
If I have not seen farther, it is because I have stood in the
footsteps of giants.
next reply other threads:[~2007-07-02 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 19:26 David Frech [this message]
2007-07-02 22:24 ` challenges using fast-import and svn Shawn O. Pearce
2007-07-02 23:28 ` David Frech
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7154c5c60707021226k3a7b82fcl7558cfc66d61dde@mail.gmail.com \
--to=nimblemachines@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).