I looked at svn-mirror to see how it did this, seems about right.
"It works for me" when using it against https://svn.musicpd.org
tested command-line: git-svnimport -C mpc -i -m -v \
-T mpc/trunk -b mpc/branches -t mpc/tags https://svn.musicpd.org
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Now we detect that the SVN repo does not have new commits for us and exit
cleanly, removing the lockfile. With this, svnimport supports being run
on a cronjob to maintain a SVN2GIT gateway.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
One "svn log" (or its equivalent) per revision adds delay and server load.
Instead, open two SVN connections -- one for the log, and one for the files.
Positive side effect: Only those log entries which actually contain data
are committed => no more empty commits.
Also, change the "-l" option to set the maximum revision to be pulled,
not the number of revisions.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fix git import script not to assume that .git/HEAD is a symlink.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Now that the leak is gone, there is by default no limit of revisions to
import. No more message about leak when the limit (given by the -l
parameter) is reached.
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fix an error when a svn revision consists only of the creation of a new tag
directory (/tags/this_is_a_tag).
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When copying files and/or directories from several branches in one single
revision, all these branches are used as parents of the commit.
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The A (Add) and R (Replace) actions handling are unified.
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The require statement at the top of git-svnimport seems to confuse
rpmbuild dependency generation. It uses the newer notation "v5.8.0",
and rpm ends up requiring "perl(v5.8.0)", while we would want it to
say something like "perl >= 0:5.008".
Ryan suggests old-style "require 5.008" might fix this problem, so
here it is.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Some SVN repositories that are accessible through HTTP don't like when I
retrieve files using SVN methods ("internal server error").
Therefore, I added an option to get the contents using (persistent) HTTP
directly. This also reduces round-trip time, from two or three requests
down to one.
Also corrected error handling a bit.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Actually removing the files that have been checked out of SVN,
after checking them into git of course, is a good idea...
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
The svn library has a serious memory leak.
Added a new option (-l NUM) which causes git-svnimport to exit cleanly
after fetching that many changes, in order to .
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Incremental imports skipped a revision.
Also improve interrupt safety -- ^C while writing a tag caused the tag
to be skipped.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Add a flag to skip initial revisions: some SVN repositories have
initial setup cruft in their logs which we might want to ignore.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Perl's eval() sets $@ to empts, not undef, when it succeeds.
That caused excessive reconnect attempts.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Perl's magic "different semantics of open() based on the number of
arguments" is really annoying at times...
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Due to a bug in the SVN library, path information is freed as soon as the
callback returns, even if it still refers to the data.
Workaround: Copy it. (Also fix a wrong-method-name bug while we're at it.)
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
As the name suggests, this script imports from SVN.
Only "normal" SVN repositories (with single trunk/, branches/, and tags/
subdrectories) are supported. Incremental imports require preserving
the file .git/svn2git.
Signed-Off-by: Matthias Urlichs <smurf@smurf.noris.de>