summaryrefslogtreecommitdiff
path: root/git-svnimport.perl
AgeCommit message (Collapse)Author
2006-05-31git-svnimport: Improved detection of merges.Florian Forster
The regexes detecting merges (while still relying on the commit messages, though) have been improved to catch saner (and hopefully more) messages. The old regex was so generic that it often matched something else and missed the actual merge-message. Also, the regex given with the `-M' commandline-option is checked first: Explicitely given regexes should be considered better than the builtin ones, and should therefore be given a chance to match a message first. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-21Reintroduce svn pools to solve the memory leak.Santi_Béjar
Introduced in 4802426. Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-18git-svnimport symlink supportHerbert Valerio Riedel
added svn:special symlink support for access methods other than direct-http Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> Acked-by: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-07git-svnimport: Don't assume that copied files haven't changedKarl Hasselström
Don't assume that a file that SVN claims was copied from somewhere else is bit-for-bit identical with its parent, since SVN allows changes to copied files before they are committed. Without this fix, such copy-modify-commit operations causes the imported file to lack the "modify" part -- that is, we get subtle data corruption. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-26git-svnimport: if a limit is specified, respect itAnand Kumria
git-svnimport will import the same revision over and over again if a limit (-l <rev>) has been specified. Instead if that revision has already been processed, exit with an up-to-date message. Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27Save username -> Full Name <email@addr.es> map fileKarl Hasselström
When the user specifies a username -> Full Name <email@addr.es> map file with the -A option, save a copy of that file as $git_dir/svn-authors. When running git-svnimport with an existing GIT directory, use $git_dir/svn-authors (if it exists) unless a file was explicitly specified with -A. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27Let git-svnimport's author file use same syntax as git-cvsimport'sKarl Hasselström
git-cvsimport uses a username => Full Name <email@addr.es> mapping file with this syntax: kha=Karl Hasselström <kha@treskal.com> Since there is no reason to use another format for git-svnimport, use the same format. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27svnimport: Read author names and emails from a fileKarl Hasselström
Read a file with lines on the form username User's Full Name <email@addres.org> and use "User's Full Name <email@addres.org>" as the GIT author and committer for Subversion commits made by "username". If encountering a commit made by a user not in the list, abort. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27svnimport: Convert the svn:ignore propertyKarl Hasselström
Put the value of the svn:ignore property in a regular file when converting a Subversion repository to GIT. The Subversion and GIT ignore syntaxes are similar enough that it often just works to set the filename to .gitignore and do nothing else. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27svnimport: Convert executable flagKarl Hasselström
Convert the svn:executable property to file mode 755 when converting an SVN repository to GIT. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20svnimport: avoid open "-|" list form for Perl 5.6Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-14git-svnimport: -r adds svn revision number to commit messagesKarl Hasselström
New -r flag for prepending the corresponding Subversion revision number to each commit message. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-12Use a relative path for SVN importingChristian Biesinger
The absolute path (with the leading slash) breaks SVN importing, because it then looks for /trunk/... instead of /svn/trunk/... (in my case, the repository URL was https://servername/svn/) Signed-off-by: Christian Biesinger <cbiesinger@web.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-01git-svnimport.perl: fix for 'arg list too long...'Sasha Khapyorsky
This fixes 'arg list too long..' problem with git-ls-files. Note that second arg list separation loop (with 'git-update-index') is needed since git-ls-files arguments can be directories. Signed-off-by: Sasha Khapyorsky <sashak@voltaire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-06svnimport: support repositories requiring SSL authenticationEric Wong
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>
2005-12-15svnimport: exit cleanly when we are up to dateMartin Langhoff
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>
2005-11-29SVN import: Use one log callMatthias Urlichs
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>
2005-11-16symref support for import scriptsPavel Roskin
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>
2005-11-14Remove trailing slashesMatthias Urlichs
SVN dies a messy death when passed a path with trailing slashes.
2005-11-08Fix a couple of obvious and insignificant typo.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08Lift the default limit of number of revs.Yaacov Akiba Slama
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>
2005-11-08Handle a revision that only creates a new tag correctly.Yaacov Akiba Slama
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>
2005-11-08Bundle file copies from multiple branches into a merge.Yaacov Akiba Slama
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>
2005-11-08copy_dir becomes copy_path and handles both files and directoriesYaacov Akiba Slama
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>
2005-11-08Don't output error on changes in the nodes /, /tags or /branchesYaacov Akiba Slama
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08Add node_kind function to differentiate between file and directoryYaacov Akiba Slama
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08Use svn pools to solve the memory leak problem.Yaacov Akiba Slama
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-31Work around an RPM build problem.Junio C Hamano
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>
2005-10-16Merge branch 'svn' of http://netz.smurf.noris.de/git/gitJunio C Hamano
[jc: I have my pre-commit hook enabled to catch trailing whitespaces, and fixed them up while merging.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-16svn commit: re-word the exit-due-to-memory-leak messageMatthias Urlichs
Reworded the exit message, as per Kalle Valo's suggestion (but shorter). Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-11svn import: copy directoriesMatthias Urlichs
Import SVN-copied and -referenced directories correctly. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-11svn import: Add direct HTTP accessMatthias Urlichs
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>
2005-10-11svn import: remove some CVS cruftMatthias Urlichs
Some remains of CVS still lingered. Removed. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-11svn import: make -s option actually optionalMatthias Urlichs
The -s option was accidentally not optional. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-11svn import: typo fixMatthias Urlichs
Fixed a minor typo Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: get all revisionsMatthias Urlichs
Not skipping the last revision is generally seen as Good Thing. ;-) Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: unlink downlaoded filesMatthias Urlichs
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>
2005-10-10svn import: Add a loop limit optionMatthias Urlichs
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>
2005-10-10svn import: incremental importsMatthias Urlichs
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>
2005-10-10svn import: skip initial revisionsMatthias Urlichs
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>
2005-10-10svn import: Do not create empty tagsMatthias Urlichs
If a tag is "clean", do not create a commit for it. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: Fix tagging.Matthias Urlichs
Tagging was 100% broken. :-/ Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: remove debuggingMatthias Urlichs
Removed debugging output used to identify the too-many-connections problem. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: wrong file open modeMatthias Urlichs
There are multiple | characters in Unicode. Don't use the wrong one ... Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: avoid reconnectingMatthias Urlichs
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>
2005-10-10svn improt needs SVN::Core 1.2.1 or betterMatthias Urlichs
Die with a warning if Perl's svn module is too old. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: fixed two pipe open calls.Matthias Urlichs
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>
2005-10-10svn import: copy path informationMatthias Urlichs
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>
2005-10-10SVN import: No modesMatthias Urlichs
svn doesn't seem to save file modes: removed the code that analyzes them. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10svn import: add eval()Matthias Urlichs
Trying to downlaod a file that's really a subdirectory doesn't work too well. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>