Git Product home page Git Product logo

svn2git's Introduction

svn2git

svn2git is a tiny utility for migrating projects from Subversion to Git while keeping the trunk, branches and tags where they should be. It uses git-svn to clone an svn repository and does some clean-up to make sure branches and tags are imported in a meaningful way, and that the code checked into master ends up being what's currently in your svn trunk rather than whichever svn branch your last commit was in.

Examples

Say I have this code in svn:

trunk
  ...
branches
  1.x
  2.x
tags
  1.0.0
  1.0.1
  1.0.2
  1.1.0
  2.0.0

git-svn will go through the commit history to build a new git repo. It will import all branches and tags as remote svn branches, whereas what you really want is git-native local branches and git tag objects. So after importing this project I'll get:

$ git branch
* master
$ git branch -a
* master
  1.x
  2.x
  tags/1.0.0
  tags/1.0.1
  tags/1.0.2
  tags/1.1.0
  tags/2.0.0
  trunk
$ git tag -l
[ empty ]

After svn2git is done with your project, you'll get this instead:

$ git branch
* master
  1.x
  2.x
$ git tag -l
  1.0.0
  1.0.1
  1.0.2
  1.1.0
  2.0.0

Finally, it makes sure the HEAD of master is the same as the current trunk of the svn repo.

Installation

Make sure you have git, git-svn, and ruby installed. svn2git is a ruby wrapper around git's native SVN support through git-svn. It is possible to have git installed without git-svn installed, so please do verify that you can run $ git svn successfully. For a Debian-based system, the installation of the prerequisites would look like:

$ sudo apt-get install git-core git-svn ruby

Once you have the necessary software on your system, you can install svn2git through rubygems, which will add the svn2git command to your PATH.

$ sudo gem install svn2git

Usage

Initial Conversion

There are several ways you can create a git repo from an existing svn repo. The differentiating factor is the svn repo layout. Below is an enumerated listing of the varying supported layouts and the proper way to create a git repo from a svn repo in the specified layout.

  1. The svn repo is in the standard layout of (trunk, branches, tags) at the root level of the repo.

     $ svn2git http://svn.example.com/path/to/repo
    
  2. The svn repo is NOT in standard layout and has only a trunk and tags at the root level of the repo.

     $ svn2git http://svn.example.com/path/to/repo --trunk dev --tags rel --nobranches
    
  3. The svn repo is NOT in standard layout and has only a trunk at the root level of the repo.

     $ svn2git http://svn.example.com/path/to/repo --trunk trunk --nobranches --notags
    
  4. The svn repo is NOT in standard layout and has no trunk, branches, or tags at the root level of the repo. Instead the root level of the repo is equivalent to the trunk and there are no tags or branches.

     $ svn2git http://svn.example.com/path/to/repo --rootistrunk
    
  5. The svn repo is in the standard layout but you want to exclude the massive doc directory and the backup files you once accidently added.

     $ svn2git http://svn.example.com/path/to/repo --exclude doc --exclude '.*~$'
    
  6. The svn repo actually tracks several projects and you only want to migrate one of them.

     $ svn2git http://svn.example.com/path/to/repo/nested_project --no-minimize-url
    
  7. The svn repo is password protected.

     $ svn2git http://svn.example.com/path/to/repo --username <<user_with_perms>>
    

If this doesn't cooperate and you need to specify a password on the command-line:

    $ svn2git http://svn.example.com/path/to/repo --username <<user_with_perms>> --password <<password>>
  1. You need to migrate starting at a specific svn revision number.

     $ svn2git http://svn.example.com/path/to/repo --revision <<starting_revision_number>>
    
  2. You need to migrate starting at a specific svn revision number, ending at a specific revision number.

     $ svn2git http://svn.example.com/path/to/repo --revision <<starting_revision_number>>:<<ending_revision_number>>
    
  3. Include metadata (git-svn-id) in git logs.

    $ svn2git http://svn.example.com/path/to/repo --metadata
    

The above will create a git repository in the current directory with the git version of the svn repository. Hence, you need to make a directory that you want your new git repo to exist in, change into it and then run one of the above commands. Note that in the above cases the trunk, branches, tags options are simply folder names relative to the provided repo path. For example if you specified trunk=foo branches=bar and tags=foobar it would be referencing http://svn.example.com/path/to/repo/foo as your trunk, and so on. However, in case 4 it references the root of the repo as trunk.

Repository Updates

As of svn2git 2.0 there is a new feature to pull in the latest changes from SVN into your git repository created with svn2git. This is a one way sync, but allows you to use svn2git as a mirroring tool for your SVN repositories.

The command to call is:

    $ cd <EXISTING_REPO> && svn2git --rebase

Authors

To convert all your svn authors to git format, create a file somewhere on your system with the list of conversions to make, one per line, for example:

jcoglan = James Coglan <[email protected]>
stnick = Santa Claus <[email protected]>

Then pass an authors option to svn2git pointing to your file:

$ svn2git http://svn.example.com/path/to/repo --authors ~/authors.txt

Alternatively, you can place the authors file into ~/.svn2git/authors and svn2git will load it out of there. This allows you to build up one authors file for all your projects and have it loaded for each repository that you migrate.

If you need a jump start on figuring out what users made changes in your svn repositories the following command sequence might help. It grabs all the logs from the svn repository, pulls out all the names from the commits, sorts them, and then reduces the list to only unique names. So, in the end it outputs a list of usernames of the people that made commits to the svn repository which name on its own line. This would allow you to easily redirect the output of this command sequence to ~/.svn2git/authors and have a very good starting point for your mapping.

$ svn log --quiet | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq

Or, for a remote URL:

$ svn log --quiet http://path/to/root/of/project | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq

Debugging

If you're having problems with converting your repository and you're not sure why, try turning on verbose logging. This will print out more information from the underlying git-svn process.

You can turn on verbose logging with the -v or --verbose flags, like so:

$ svn2git http://svn.yoursite.com/path/to/repo --verbose

Options Reference

$ svn2git --help
Usage: svn2git SVN_URL [options]

Specific options:
        --rebase                     Instead of cloning a new project, rebase an existing one against SVN
        --username NAME              Username for transports that needs it (http(s), svn)
        --password PASS              Password for transports that needs it (http(s), svn)
        --trunk TRUNK_PATH           Subpath to trunk from repository URL (default: trunk)
        --branches BRANCHES_PATH     Subpath to branches from repository URL (default: branches); can be used multiple times
        --tags TAGS_PATH             Subpath to tags from repository URL (default: tags); can be used multiple times
        --rootistrunk                Use this if the root level of the repo is equivalent to the trunk and there are no tags or branches
        --notrunk                    Do not import anything from trunk
        --nobranches                 Do not try to import any branches
        --notags                     Do not try to import any tags
        --no-minimize-url            Accept URLs as-is without attempting to connect to a higher level directory
        --revision START_REV[:END_REV]
                                     Start importing from SVN revision START_REV; optionally end at END_REV
    -m, --metadata                   Include metadata in git logs (git-svn-id)
        --authors AUTHORS_FILE       Path to file containing svn-to-git authors mapping (default: ~/.svn2git/authors)
        --exclude REGEX              Specify a Perl regular expression to filter paths when fetching; can be used multiple times
    -v, --verbose                    Be verbose in logging -- useful for debugging issues

    -h, --help                       Show this message

FAQ

  1. Why don't the tags show up in the master branch?

    The tags won't show up in the master branch because the tags are actually tied to the commits that were created in svn when the user made the tag. Those commits are the first (head) commit of branch in svn that is associated with that tag. If you want to see all the branches and tags and their relationships in gitk you can run the following: gitk --all

    For further details please refer to FAQ #2.

  2. Why don't you reference the parent of the tag commits instead?

    In svn you are forced to create what are known in git as annotated tags. It just so happens that svn annotated tags allow you to commit change sets along with the tagging action. This means that the svn annotated tag is a bit more complex then just an annotated tag it is a commit which is treated as an annotated tag. Hence, for there to be a true 1-to-1 mapping between git and svn we have to transfer over the svn commit which acts as an annotated tag and then tag that commit in git using an annotated tag.

    If we were to reference the parent of this svn tagged commit there could potentially be situations where a developer would checkout a tag in git and the resulting code base would be different than if they checked out that very same tag in the original svn repo. This is only due to the fact that the svn tags allow changesets in them, making them not just annotated tags.

svn2git's People

Contributors

ain avatar bantu avatar bwolfe avatar cybertech avatar drewdeponte avatar dzuelke avatar edpbx avatar edsonlima avatar feejai avatar gardleopard avatar iteman avatar jasonmccreary avatar jcoglan avatar ktdreyer avatar mss avatar nirvdrum avatar pdf avatar powerkiki avatar rud5g avatar ruderphilipp avatar sebastianbergmann avatar stefansundin avatar tiagott avatar trivoallan avatar wsfulton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svn2git's Issues

be more verbose about wrong authors file

When running svn2git with an incomplete authors file, the error message is misleading. I think you should output the error even without the -verbose parameter. Without verbose:

$ svn2git svn://svnserver/project --username diego.plentz --authors authors  
command failed:
2>&1 git svn fetch 

With verbose:

$ svn2git svn://svnserver/project --username diego.plentz --authors authors  -v
Running command: git svn init --prefix=svn/ --username=diego.plentz --no-metadata --trunk=trunk --tags=tags --branches=branches svn://svnserver/project
Running command: git config --local svn.authorsfile authors
Running command: git svn fetch 
Index mismatch: bb9e74f3cfc695ee58c439418156c8d654e9d87e != 722058665d393c3b8aec97e9d602383cc0756355
rereading d96cc2907073dbbf7d3a63b20ae6ad9ed8b2846e
    M   file.java
Author: foo.bar not defined in authors file

command failed:
2>&1 git svn fetch 

Importing local repository

Is it possible to use svn2git on a local repo? When I try svn2git /path/to/local/repo on a standard layout repository, the output is

Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches /path/to/local/rep
/path/to/local/repo/
E: 'trunk' is not a complete URL  and a separate URL is not specified
command failed:
2>&1 git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches /path/to/local/rep
/path/to/local/repo/

Is Branch Checkout Necessary for Update?

"svn2git --rebase" spends most of it's time checking out each of the branches (presumably to rebase each branch). Is this absolutely necessary even if there are no new commits on those branches?

Skipping this (if possible) would cut my updates down from 10+ minutes each to maybe 10-15 seconds and barely hitting the disk I/O.

Problem on protected repository

svn2git http://our_server --username chris

command failed:
2>&1 git svn init --prefix=svn/ --username=chris --no-metadata --trunk=trunk --tags=tags --branches=branches http://our_server

error: pathspec 'master' did not match any file(s) known to git.

Instead of hijacking ticket #23, I'll try as a new one as it might be a different issue. See the log below:

  • svn2git-2.1.2 (a --version option would be nice)
  • the author file is okay, but same error happens without --authors
  • it does not matter wheter I use --username or not
  • it does not matter wheter I use --nobranches or not (but I don't want to preserve the branches anyway)
  • same error happens if I convert the whole repo (giving trunk instead of trunk/bml) or another subproject (in the same repo)

I am getting a bit desperate and wonder what else I could try to shed light on this issue. Should't "git branch -l" show something already. Maybe you could add some sanity checks after each step and error out earlier. I have the feeling that the error in the description just means "sonmething failed along the way" :/

The only result is a single 24bytes small file (among the usual git infrastructure)
.git/svn/refs/remotes/svn/trunk/.rev_map.489a8a1a-d840-0410-b443-d4df6bd36c0d

svn2git https://buzztard.svn.sourceforge.net/svnroot/buzztard/trunk/bml --username ensonic --authors ../authors.txt --verbose --nobranches
Running command: git svn init --prefix=svn/ --username=ensonic --no-metadata --trunk=trunk --tags=tags https://buzztard.svn.sourceforge.net/svnroot/buzztard/trunk/bml
Initialized empty Git repository in /home/ensonic/projects/buzztard/git/bml/.git/
Using higher level of URL: https://buzztard.svn.sourceforge.net/svnroot/buzztard/trunk/bml => https://buzztard.svn.sourceforge.net/svnroot/buzztard
Running command: git config --local svn.authorsfile ../authors.txt
Running command: git svn fetch
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/bml'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Checked through r100
Running command: git branch -l --no-color
Running command: git branch -r --no-color
Running command: git checkout -f master
error: pathspec 'master' did not match any file(s) known to git.
command failed:
2>&1 git checkout -f master

Command failing - 2>&1 git config --local user.name 'danny'

Output:

        Daniel-Staples-iMac-2:svn2gitrepos danny$ svn2git file:///Users/danny/repos/svnRepo/FindDuplicates --nobranches
        command failed:
        2>&1 git config --local user.name 'danny'
        sh: line 1: usage:: command not found
        usage: config [ -bcdo dir ] [ -p ] sysname
        sh: line 4: --global: command not found
        sh: line 5: --system: command not found
        sh: line 6: FILE: No such file or directory
        sh: line 8: Action: command not found
        sh: line 9: --get: command not found
        sh: line 10: --get-all: command not found
        sh: line 11: --get-regexp: command not found
        sh: line 12: --replace-all: command not found
        sh: line 13: --add: command not found
        sh: line 14: --unset: command not found
        sh: line 15: --unset-all: command not found
        sh: line 16: --rename-section: command not found
        sh: line 17: --remove-section: command not found
        sh: line 18: -l,: command not found
        sh: line 19: -e,: command not found
        sh: line 20: slot: No such file or directory
        sh: -c: line 21: syntax error near unexpected token `newline'
        sh: -c: line 21: `    --get-colorbool <slot>'
        command failed:
        2>&1 git config --local user.email 'error: unknown option `local'
        usage: git config [options]

        Config file location
            --global              use global config file
            --system              use system config file
            -f, --file <FILE>     use given config file

        Action
            --get                 get value: name [value-regex]
            --get-all             get all values: key [value-regex]
            --get-regexp          get values for regexp: name-regex [value-regex]
            --replace-all         replace all matching variables: name value [value_regex]
            --add                 adds a new variable: name value
            --unset               removes a variable: name [value-regex]
            --unset-all           removes all matches: name [value-regex]
            --rename-section      rename section: old-name new-name
            --remove-section      remove a section: name
            -l, --list            list all
            -e, --edit            opens an editor
            --get-color <slot>    find the color configured: [default]
            --get-colorbool <slot>
                                  find the color setting: [stdout-is-tty]

        Type
            --bool                value is "true" or "false"
            --int                 value is decimal number
            --bool-or-int         value is --bool or --int
            --path                value is a path (file or directory name)

        Other
            -z, --null            terminate values with NUL byte'

Environment:
OSX Lion.

Daniel-Staples-iMac-2:svn2gitrepos danny$ git --version
git version 1.7.2.3

Daniel-Staples-iMac-2:svn2gitrepos danny$ ruby --version
ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]

git svn is installed.
I've been using git on other projects plenty on this machine, and without issues.

Daniel-Staples-iMac-2:svn2gitrepos danny$ which git
/usr/local/git/bin/git

Error: command failed: GIT_COMMITTER_DATE

One of my tagnames starts with -- which generates an error.

dumped here:


Running command: git log -1 --pretty=format:'%s' 'svn/tags/--20122302-0704--trunk'
release tag, of trunk version: 12.5
Running command: git log -1 --pretty=format:'%ci' 'svn/tags/--20122302-0704--trunk'
2012-02-23 06:04:38 +0000
Running command: git log -1 --pretty=format:'%an' 'svn/tags/--20122302-0704--trunk'
Running command: GIT_COMMITTER_DATE='2012-02-23 06:04:38 +0000' git tag -a -m 'release tag, of trunk version: 12.5' '--20122302-0704--trunk' 'svn/tags/--20122302-0704--trunk'
error: unknown option `20122302-0704--trunk'
usage: git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]
   or: git tag -d <tagname>...
   or: git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>] 
                [<pattern>...]
   or: git tag -v <tagname>...

    -l, --list            list tag names
    -n[<n>]               print <n> lines of each tag message
    -d, --delete          delete tags
    -v, --verify          verify tags

Tag creation options
    -a, --annotate        annotated tag, needs a message
    -m, --message <message>
                          tag message
    -F, --file <file>     read message from file
    -s, --sign            annotated and GPG-signed tag
    --cleanup <mode>      how to strip spaces and #comments from message
    -u, --local-user <key-id>
                          use another key to sign the tag
    -f, --force           replace the tag if exists

Tag listing options
    --contains <commit>   print only tags that contain the commit
    --points-at <object>  print only tags of the object

command failed:
2>&1 GIT_COMMITTER_DATE='2012-02-23 06:04:38 +0000' git tag -a -m 'release tag, of trunk version: 12.5' '--20122302-0704--trunk' 'svn/tags/--20122302-0704--trunk'

svn2git lacks semantic versioning

Especially it can be found in resulted tags.

Now you get something like:

git tag -l | head -3
0.1
1.0
1.0.1

Where semver.org (SemVerTag) suggests:

git tag -l | head -3
v0.1
v1.0
v1.0.1

For more information, check semver.org and @mojombo/semver.org

Option to create empty directories.

It might be useful to have an option to handle empty directories.
Perhaps something that would, when a empty directory is identified, create a empty flag file in that directory so git would maintain identical directory structure to svn?
Thoughts?

svn2git --rebase failed, porcelain?

Any ideas what's going wrong here?

[rochkind@xs001 umlaut]$ svn2git --rebase
command failed:
2>&1 git status --porcelain --untracked-files=no
[rochkind@xs001 umlaut]$ git status --porcelain --untracked-files=no
error: unknown option `porcelain'
usage: git status [options] [--] <filepattern>..

Hmm, not a recent enough git version to support "--porcelain"? Is it documented what git version you need for svn2git?

Also, I'm trying a --rebase here, because I already used svn2git on this same machine... with the same version of git installed. In fact, I swear I've done a rebase succesfully before too. Not sure what's changed.

svn2git fails if branch contains shell special characters

Running svn2git --rebase on a previously converted repository of http://antville.googlecode.com/svn shows the following output:

Switched to branch 'Juliette'
sh: Syntax error: "(" unexpected
sh: Syntax error: "(" unexpected
Switched to branch 'antville_1_0'
...
Switched to branch 'master'
Counting objects: 29403, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7614/7614), done.
Writing objects: 100% (29403/29403), done.
Total 29403 (delta 21404), reused 29403 (delta 21404)

As far as I can see there is a branch juliette but not Juliette (with upper-case J).

What could be the reason for the Syntax error? Obviously the command itself does not fail, so can I ignore this?

Failed svn2git --rebase

Hi,
when i want to update git repository by 'svn2git --rebase -v' get the following error:

Running command: git checkout -f "1.5"
warning: refname '1.5' is ambiguous.
Switched to branch '1.5'
Running command: git rebase "remotes/svn/1.5"
warning: refname '1.5' is ambiguous.
First, rewinding head to replay your work on top of it...
error: Ref refs/heads/1.5 is at d434cf859d6783e63f72284969d7f24eb209209d but expected 07d2fb116c246774eb8f09dc4bdbbc8b63c11f5c
fatal: Cannot lock the ref 'refs/heads/1.5'.
Could not move back to refs/heads/1.5
command failed:
2>&1 git rebase "remotes/svn/1.5"

Unable to convert SVN repo with branch named "trunk"

I'm trying to convert a SVN repository with over 25k commits with the standard syntax:

svn2git http://svn.example.com/path/to/repo

Every time at revision 20172 (which is a commit with a branch named "trunk") it fails with the following output:

r20172 = b420dc95ce992710b836a8150ec45e80927b9866 (refs/remotes/svn/trunk)
Found possible branch point: http://svn.example.com/path/to/repo/trunk => http://svn.example.com/path/to/repo/branches/new_cron_order, 20172
Found branch parent: (refs/remotes/svn/new_cron_order) b420dc95ce992710b836a8150ec45e80927b9866
Following parent with do_switch
Incomplete data: Delta source ended unexpectedly at /usr/lib/git-core/git-svn line 5689

command failed:
2>&1 git svn fetch

Any ideas how to fix this? Importing only trunk (--rootistrunk) works fine with the same repository.

getting syntax errors when running svn2git

Environment:
ubuntu 10.04.
git version 1.7.0.4
git-svn installed
ruby 1.8.7
svn2git 2.1.1

When running the following command

 /var/lib/gems/1.8/bin/svn2git http://host/svn/myrepo

I then get the following syntax errors. What did I miss in the installation?

/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:246: syntax error, unexpected $undefined, expecting ')' (SyntaxError) run_command("git checkout \"#{branch}"\") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:253: syntax error, unexpected tIDENTIFIER, expecting kEND run_command("git checkout svn/trunk") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:253: syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '(' run_command("git checkout svn/trunk") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:254: syntax error, unexpected tIDENTIFIER, expecting kEND run_command("git branch -D master") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:254: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '(' run_command("git branch -D master") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:255: syntax error, unexpected tIDENTIFIER, expecting kEND run_command("git checkout -f -b master") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:255: syntax error, unexpected tUMINUS, expecting kDO or '{' or '(' run_command("git checkout -f -b master") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:257: syntax error, unexpected tIDENTIFIER, expecting kEND run_command("git checkout -f master") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:257: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '(' run_command("git checkout -f master") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:262: syntax error, unexpected tIDENTIFIER, expecting kEND run_command("git gc") ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:266: syntax error, unexpected tCONSTANT, expecting kEND log "Running command: #{cmd}" ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:271: syntax error, unexpected kDO_BLOCK, expecting kEND IO.popen(cmd) do |stdout| ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:272: syntax error, unexpected kDO_BLOCK, expecting kEND stdout.each do |line| ^ /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:273: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '(' /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git/migration.rb:309: syntax error, unexpected kEND, expecting $end from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /var/lib/gems/1.8/gems/svn2git-2.1.1/lib/svn2git.rb:1
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /var/lib/gems/1.8/gems/svn2git-2.1.1/bin/svn2git:23
from /var/lib/gems/1.8/bin/svn2git:19:in `load'
from /var/lib/gems/1.8/bin/svn2git:19

import failed: error: pathspec 'master' did not match any file(s) known to git.

my SVN repository has a standard layout trunk/branches/tags.

import to GIT failed:

Found possible branch point: https://subversion.assembla.com/svn/taskadapter/trunk => https://subversion.assembla.com/svn/taskadapter/tags/release_1.0.24, 465
Use of uninitialized value $u in substitution (s///) at /usr/lib/git-core/git-svn line 1735.
Use of uninitialized value $u in concatenation (.) or string at /usr/lib/git-core/git-svn line 1735.
refs/remotes/svn/trunk: 'https://subversion.assembla.com/svn/taskadapter' not found in ''

error: pathspec 'master' did not match any file(s) known to git.
Counting objects: 7623, done.
Compressing objects: 100% (4561/4561), done.
Writing objects: 100% (7623/7623), done.
Total 7623 (delta 3583), reused 1358 (delta 552)

branches, tags ignored

Hello, the command

svn2git -v http://cdk.svn.sourceforge.net/svnroot/cdk/jchempaint --no-minimize-url

in a fresh directory correctly reproduced all revisions but ignored jchempaint/branches and /tags. Removing --no-minimize-url will not let the command succeed, as this is a subdir in the cdk project.

Hangs on "Error validating server certificate"

I'm trying to check out from my repo, and svn2git is hanging on this error:

"Error validating server certificate for 'https://www.my.server.org:443':

  • The certificate is not issued..." etc.

This message is only printed if I run with the -v flag; without, I get nothing. In either case, svn2git sits doing nothing (as far as I can tell) and not giving me any feedback. This should cause svn2git to either quit, or print a reassuring message about how it's forging ahead.

"Use of uninitialized value $u"

Hi,

While giving a try to svn2git on my local machine for JBoss Tools repo - which is quite huge, I got the following error, that I don't understand:

$ /var/lib/gems/1.8/bin/svn2git -v http://anonsvn.jboss.org/repos/jbosstools
Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches http://anonsvn.jboss.org/repos/jbosstools
Running command: git svn fetch
Found possible branch point: http://anonsvn.jboss.org/repos/jbosstools/trunk => http://anonsvn.jboss.org/repos/jbosstools/branches/jboss, 78
Use of uninitialized value $u in substitution (s///) at /usr/lib/git-core/git-svn line 1728.
Use of uninitialized value $u in concatenation (.) or string at /usr/lib/git-core/git-svn line 1728.
refs/remotes/svn/trunk: 'http://anonsvn.jboss.org/repos/jbosstools' not found in ''

The first time I run this command, I could see the files being fetched. Now I don't see the fetch occur (probably files are cached), but I always get this issue.

Could someone help me on this?

Is my svn2git running or hung?

I am a newbie/project manager/admin-when needed (not a developer) and have inherited a SVN repository as we transition between development teams. I have the entire SVN file structure from a DVD and I have setup VisualSVN to serve it. Everything appears to be fine with the VisualSVN setup as I can browse the contents of the repository exactly as expected. Per the svn2git instructions, I have installed Ruby and added it to the PATH and created a new folder for the new Git repo. From this new folder [in the Git Bash widow], I have executed "svn2git " with no additional parameters (I want everything in the new repo).

My question is should I have received some feedback after I executed this command? It has been running for over 4 hours and there has been no response provided in my Git Bash window; just a blinking cursor on the next line (I have not yet got a new '$' cursor). I have done some searches for information and it does seem that this process may well take a long time. However, I have not seen any reference to determine if the process is actually running or is it just hung? FYI: The file size of my SVN repo is about 1.5 GB. So perhaps this is just normal. However, the destination Git folder has been at 14 folders and 14 files (60kb total) the entire time. If it is actually doing something, should I be seeing some file growth somewhere?

Error importing tno.euphorie repo

I am trying to convert http://code.simplon.biz/svn/projects/tno/euphorie/Develop to git, but running svn2git on that URL quickly results in an error:

$ svn2git --authors ~/.git-authors http://code.simplon.biz/svn/projects/tno/euphorie/Develop
Found possible branch point: http://code.simplon.biz/svn/projects/tno/euphorie/Develop/trunk => http://code.simplon.biz/svn/projects/tno/euphorie/Develop/tags/1.0, 16165
Use of uninitialized value $u in substitution (s///) at /usr/lib/git-core/git-svn line 1730.
Use of uninitialized value $u in concatenation (.) or string at /usr/lib/git-core/git-svn line 1730.
refs/remotes/svn/trunk: 'http://code.simplon.biz/svn' not found in ''

error: pathspec 'master' did not match any file(s) known to git.
Counting objects: 6, done.
Writing objects: 100% (6/6), done.
Total 6 (delta 4), reused 6 (delta 4)

gem install svn2git errors 'buffer overflow detected'

OS: CentOS 5.6 x64

I got the following error when trying to install svn2git. If I get home at a decent hour tonight, I'll try it on Ubuntu.

[dan@midget ~]$ sudo gem install -V svn2git
GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://production.s3.rubygems.org/latest_specs.4.8.gz
GET 302 Found: http://gems.rubyforge.org/quick/Marshal.4.8/svn2git-2.2.1.gemspec.rz
GET 200 OK: http://production.cf.rubygems.org/quick/Marshal.4.8/svn2git-2.2.1.gemspec.rz
Installing gem svn2git-2.2.1
*** buffer overflow detected ***: /usr/bin/ruby terminated
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0xb7d35921]
/usr/lib/ruby/1.8/i386-linux/syck.so(rb_syck_mktime+0x501)[0xb7bb36a1]
/usr/lib/ruby/1.8/i386-linux/syck.so(yaml_org_handler+0x838)[0xb7bb3fb8]
/usr/lib/ruby/1.8/i386-linux/syck.so(syck_defaultresolver_node_import+0x3f)[0xb7bb431f]
/usr/lib/libruby.so.1.8[0xb7e45e2a]
/usr/lib/libruby.so.1.8[0xb7e4d55b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e4e832]
/usr/lib/libruby.so.1.8(rb_funcall+0x20)[0xb7e4e9c0]
/usr/lib/ruby/1.8/i386-linux/syck.so(rb_syck_load_handler+0x69)[0xb7bb30c9]
/usr/lib/ruby/1.8/i386-linux/syck.so(syck_hdlr_add_node+0x4a)[0xb7bad94a]
/usr/lib/ruby/1.8/i386-linux/syck.so(syckparse+0xb98)[0xb7bae7a8]
/usr/lib/ruby/1.8/i386-linux/syck.so(syck_parse+0x32)[0xb7bb8132]
/usr/lib/ruby/1.8/i386-linux/syck.so(syck_parser_load+0x112)[0xb7bb2f12]
/usr/lib/libruby.so.1.8[0xb7e45e48]
/usr/lib/libruby.so.1.8[0xb7e4d55b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e55ef6]
/usr/lib/libruby.so.1.8[0xb7e54720]
/usr/lib/libruby.so.1.8[0xb7e4de2b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e55ef6]
/usr/lib/libruby.so.1.8[0xb7e54720]
/usr/lib/libruby.so.1.8[0xb7e4de2b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e55ef6]
/usr/lib/libruby.so.1.8[0xb7e569ce]
/usr/lib/libruby.so.1.8[0xb7e4de2b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e56012]
/usr/lib/libruby.so.1.8[0xb7e54434]
/usr/lib/libruby.so.1.8[0xb7e56c8c]
/usr/lib/libruby.so.1.8[0xb7e58b3c]
/usr/lib/libruby.so.1.8[0xb7e55c9f]
/usr/lib/libruby.so.1.8[0xb7e58b3c]
/usr/lib/libruby.so.1.8[0xb7e59dfd]
/usr/lib/libruby.so.1.8[0xb7e45e35]
/usr/lib/libruby.so.1.8[0xb7e4d55b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e56012]
/usr/lib/libruby.so.1.8[0xb7e572dc]
/usr/lib/libruby.so.1.8[0xb7e4de2b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e55ef6]
/usr/lib/libruby.so.1.8[0xb7e572dc]
/usr/lib/libruby.so.1.8[0xb7e4de2b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8(rb_obj_call_init+0x57)[0xb7e4e547]
/usr/lib/libruby.so.1.8(rb_class_new_instance+0x3a)[0xb7e7c22a]
/usr/lib/libruby.so.1.8[0xb7e45e48]
/usr/lib/libruby.so.1.8[0xb7e4d55b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8(rb_call_super+0xa3)[0xb7e4f203]
/usr/lib/libruby.so.1.8[0xb7e4d6e8]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e56012]
/usr/lib/libruby.so.1.8[0xb7e54720]
/usr/lib/libruby.so.1.8[0xb7e56c8c]
/usr/lib/libruby.so.1.8[0xb7e4de2b]
/usr/lib/libruby.so.1.8[0xb7e4e278]
/usr/lib/libruby.so.1.8[0xb7e55ef6]
/usr/lib/libruby.so.1.8[0xb7e57a0d]
/usr/lib/libruby.so.1.8[0xb7e552f9]
======= Memory map: ========
08048000-08049000 r-xp 00000000 fc:00 4163519                            /usr/bin/ruby
08049000-0804a000 rw-p 00000000 fc:00 4163519                            /usr/bin/ruby
088e7000-0a10c000 rw-p 088e7000 00:00 0                                  [heap]
b6a2e000-b6a39000 r-xp 00000000 fc:00 240549890                          /lib/libgcc_s-4.1.2-20080825.so.1
b6a39000-b6a3a000 rw-p 0000a000 fc:00 240549890                          /lib/libgcc_s-4.1.2-20080825.so.1
b6a40000-b6c6c000 rw-p b6a40000 00:00 0
b6c6c000-b6c6d000 ---p b6c6c000 00:00 0
b6c6d000-b766d000 rw-p b6c6d000 00:00 0
b766d000-b7671000 r-xp 00000000 fc:00 240549915                          /lib/libnss_dns-2.5.so
b7671000-b7672000 r--p 00003000 fc:00 240549915                          /lib/libnss_dns-2.5.so
b7672000-b7673000 rw-p 00004000 fc:00 240549915                          /lib/libnss_dns-2.5.so
b7673000-b767d000 r-xp 00000000 fc:00 240549917                          /lib/libnss_files-2.5.so
b767d000-b767e000 r--p 00009000 fc:00 240549917                          /lib/libnss_files-2.5.so
b767e000-b767f000 rw-p 0000a000 fc:00 240549917                          /lib/libnss_files-2.5.so
b7682000-b7685000 rw-p b7682000 00:00 0
b7685000-b7690000 r-xp 00000000 fc:00 5670174                            /usr/lib/ruby/1.8/i386-linux/socket.so
b7690000-b7691000 rw-p 0000a000 fc:00 5670174                            /usr/lib/ruby/1.8/i386-linux/socket.so
b7691000-b7693000 r-xp 00000000 fc:00 5669730                            /usr/lib/ruby/1.8/i386-linux/digest.so
b7693000-b7694000 rw-p 00001000 fc:00 5669730                            /usr/lib/ruby/1.8/i386-linux/digest.so
b7694000-b769d000 r-xp 00000000 fc:00 5670179                            /usr/lib/ruby/1.8/i386-linux/zlib.so
b769d000-b769e000 rw-p 00008000 fc:00 5670179                            /usr/lib/ruby/1.8/i386-linux/zlib.so
b769e000-b77bb000 rw-p b769e000 00:00 0
b77bb000-b77f6000 r-xp 00000000 fc:00 240549939                          /lib/libsepol.so.1
b77f6000-b77f7000 rw-p 0003b000 fc:00 240549939                          /lib/libsepol.so.1
b77f7000-b7801000 rw-p b77f7000 00:00 0
b7801000-b7817000 r-xp 00000000 fc:00 240549940                          /lib/libselinux.so.1
b7817000-b7819000 rw-p 00015000 fc:00 240549940                          /lib/libselinux.so.1
b7819000-b781b000 r-xp 00000000 fc:00 4166636                            /lib/libkeyutils-1.2.so
b781b000-b781c000 rw-p 00001000 fc:00 4166636                            /lib/libkeyutils-1.2.so
b781c000-b7824000 r-xp 00000000 fc:00 248447061                          /usr/lib/libkrb5support.so.0.1
b7824000-b7825000 rw-p 00007000 fc:00 248447061                          /usr/lib/libkrb5support.so.0.1
b7825000-b7837000 r-xp 00000000 fc:00 4169856                            /usr/lib/libz.so.1.2.3
b7837000-b7838000 rw-p 00011000 fc:00 4169856                            /usr/lib/libz.so.1.2.3
b7838000-b7848000 r-xp 00000000 fc:00 240549927                          /lib/libresolv-2.5.so
b7848000-b7849000 r--p 0000f000 fc:00 240549927                          /lib/libresolv-2.5.so
b7849000-b784a000 rw-p 00010000 fc:00 240549927                          /lib/libresolv-2.5.so
b784a000-b784c000 rw-p b784a000 00:00 0
b784c000-b7872000 r-xp 00000000 fc:00 248447049                          /usr/lib/libk5crypto.so.3.1
b7872000-b7873000 rw-p 00025000 fc:00 248447049                          /usr/lib/libk5crypto.so.3.1
b7873000-b7875000 r-xp 00000000 fc:00 240549950                          /lib/libcom_err.so.2.1
b7875000-b7876000 rw-p 00001000 fc:00 240549950                          /lib/libcom_err.so.2.1
b7876000-b790a000 r-xp 00000000 fc:00 248447059                          /usr/lib/libkrb5.so.3.3
b790a000-b790d000 rw-p 00093000 fc:00 248447059                          /usr/lib/libkrb5.so.3.3
b790d000-b7939000 r-xp 00000000 fc:00 248447045                    Aborted

`popen': No such file or directory

Hello, when I try to run svn2git https://my-repo/svn/project --trunk trunk --branches branches --tags tags , i get the following error which i can't seem to find any resolution for through google.

$ svn2git https://127.0.0.1:8443/svn/project --trunk trunk --branches branche
s --tags tags
openpath: pathname too long (ignored)
        Directory ""
        File "git"
c:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migration.rb:270:i
n `popen': No such file or directory - git svn init --prefix=svn/ --no-metadata
--trunk=trunk --tags=tags --branches=branches https://127.0.0.1:8443/svn/project (Errno::ENOENT)
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:270:in `run_command'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:178:in `clone!'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:27:in `run!'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/bin/svn2git:26:in
 `<top (required)>'
        from c:/Ruby192/bin/svn2git:19:in `load'
        from c:/Ruby192/bin/svn2git:19:in `<main>'

any help or direction would be greatly appreciated.
thanks.

Update : This error only occurs when i run that command in the msysgit git prompt. When I run this command in windows command prompt, it looks like it's going to work, until the end. Here is that error :

Checked out HEAD:
  https://127.0.0.1:8443/svn/project/trunk r39
C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migration.rb:270:i
n `popen': No such file or directory - GIT_COMMITTER_DATE='2011-11-08 05:38:19 +
0000' git tag -a -m 'project rough draft before restructuring into an object f
ormat;' 'dev' 'svn/tags/dev' (Errno::ENOENT)
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:270:in `run_command'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:221:in `block in fix_tags'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:213:in `each'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:213:in `fix_tags'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/lib/svn2git/migra
tion.rb:29:in `run!'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.1.0/bin/svn2git:26:in
 `<top (required)>'
        from C:/Ruby192/bin/svn2git:19:in `load'
        from C:/Ruby192/bin/svn2git:19:in `<main>'

again, an issue with popen

migration of svn-ignore to .gitignore

would be nice to have, else I always do this after svn2git:

svn propget svn:ignore -R svn://host/repo > .gitignore
git add .gitignore
git commit -m 'Convert svn:ignore properties to .gitignore.'

Problem connection to password protected SVN repo

Hi,

I'm trying to convert an SVN repo to git. The SVN repo sits on my home server which I have aliased in my hosts file to svnserver. When I run this command:

svn://svnserver/qkschool.org.uk -v --username markstickley

it just sits there showing only the following output:

Running command: git svn init --prefix=svn/ --username=markstickley --no-metadata --trunk=trunk --tags=tags --branches=branches svn://svnserver/qkschool.org.uk
Initialized empty Git repository in /Users/markstickley/workspace/qkschool.org.uk/.git/
Authentication realm: <svn://svnserver:3690> 2d1a41b5-b418-457c-9cb5-d753d313de4d

I left it along for hours in case it was doing something. Nada. When I press ctrl+c I get this, if it's any help:

/Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/lib/svn2git/migration.rb:295:in `each': Interrupt
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/lib/svn2git/migration.rb:295:in `block in run_command'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/lib/svn2git/migration.rb:294:in `popen'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/lib/svn2git/migration.rb:294:in `run_command'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/lib/svn2git/migration.rb:178:in `clone!'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/lib/svn2git/migration.rb:27:in `run!'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/gems/svn2git-2.2.1/bin/svn2git:26:in `<top (required)>'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/bin/svn2git:23:in `load'
    from /Users/markstickley/.rvm/gems/ruby-1.9.2-p320/bin/svn2git:23:in `<main>'

Thanks!

can't parse options.. debian squeeze

/usr/lib/ruby/1.8/optparse.rb:1450:in complete': invalid option: --username (OptionParser::InvalidOption) from /usr/lib/ruby/1.8/optparse.rb:1448:incatch'
from /usr/lib/ruby/1.8/optparse.rb:1448:in complete' from /usr/lib/ruby/1.8/optparse.rb:1261:inparse_in_order'
from /usr/lib/ruby/1.8/optparse.rb:1254:in catch' from /usr/lib/ruby/1.8/optparse.rb:1254:inparse_in_order'
from /usr/lib/ruby/1.8/optparse.rb:1248:in order!' from /usr/lib/ruby/1.8/optparse.rb:1339:inpermute!'
from /usr/lib/ruby/1.8/optparse.rb:1360:in parse!' from /var/lib/gems/1.8/gems/nirvdrum-svn2git-1.3.1/lib/svn2git/migration.rb:101:inparse'
from /var/lib/gems/1.8/gems/nirvdrum-svn2git-1.3.1/lib/svn2git/migration.rb:12:in initialize' from /var/lib/gems/1.8/gems/nirvdrum-svn2git-1.3.1/bin/svn2git:25:innew'
from /var/lib/gems/1.8/gems/nirvdrum-svn2git-1.3.1/bin/svn2git:25
from /usr/local/bin/svn2git:19:in `load'
from /usr/local/bin/svn2git:19

svn2git does not create tags when nested in a sub directory

My SVN repo is structured as follows

Project/branch/trunk
...
Project/tags
  1.0.0
  1.0.1
  1.0.2
  1.1.0
  2.0.0

I run the following command to create the git repo

svn2git http://svn.example.com/path/to/repo --trunk Project/branch/trunk --tags Project/tags --nobranches

svn2git imports the trunk fine, however all the tags are missing

$ git branch
* master
  trunk@1387
$  git tag -l
[ empty ]

buffer overflow detected

guys thanks for the script. not sure why this is failing. I got to be honest and say every time I come across a ruby script it fails miserably. Ruby is such a compatibility mess. Beggars can't be choosers I guess. I suppose everyone has their preferred language to develop in.

System state:
RPMs installed

ruby-ri-1.8.6.383-6.el5.kb
rubygems-1.3.2-2.el5.rf
ruby-shadow-1.4.1-7.el5
ruby-irb-1.8.6.383-6.el5.kb
ruby-libs-1.8.6.383-6.el5.kb
ruby-rdoc-1.8.6.383-6.el5.kb
ruby-1.8.6.383-6.el5.kb
libselinux-ruby-1.33.4-5.7.el5
ruby-augeas-0.4.1-2.el5.rf
ruby-devel-1.8.6.383-6.el5.kb
rubygems-1.3.2-2.el5.rf

ARCH: x86_64

Installation:

[root@marvin nirvdrum-svn2git-ffedaee]# gem install svn2git
*** buffer overflow detected ***: /usr/bin/ruby terminated
======= Backtrace: =========
/lib64/libc.so.6(__chk_fail+0x2f)[0x399cae6faf]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(rb_syck_mktime+0x48e)[0x2b79b6e4939e]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(yaml_org_handler+0x860)[0x2b79b6e49cb0]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_defaultresolver_node_import+0x39)[0x2b79b6e49eb9]
/usr/lib64/libruby.so.1.8[0x399da34611]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3512a]
/usr/lib64/libruby.so.1.8(rb_funcall+0x85)[0x399da353f5]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(rb_syck_load_handler+0x47)[0x2b79b6e48e47]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_hdlr_add_node+0x39)[0x2b79b6e4acb9]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(syckparse+0xb45)[0x2b79b6e4ba85]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_parse+0x19)[0x2b79b6e4d7f9]
/usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_parser_load+0xed)[0x2b79b6e48cbd]
/usr/lib64/libruby.so.1.8[0x399da34611]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3bec6]
/usr/lib64/libruby.so.1.8[0x399da3b217]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3bec6]
/usr/lib64/libruby.so.1.8[0x399da3b217]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3bec6]
/usr/lib64/libruby.so.1.8[0x399da3d77a]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3c004]
/usr/lib64/libruby.so.1.8[0x399da3af1e]
/usr/lib64/libruby.so.1.8[0x399da3db03]
/usr/lib64/libruby.so.1.8[0x399da3fd2f]
/usr/lib64/libruby.so.1.8[0x399da3c1cb]
/usr/lib64/libruby.so.1.8[0x399da3fd2f]
/usr/lib64/libruby.so.1.8[0x399da41269]
/usr/lib64/libruby.so.1.8[0x399da34611]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3c004]
/usr/lib64/libruby.so.1.8[0x399da3e11a]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3bec6]
/usr/lib64/libruby.so.1.8[0x399da3e11a]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8(rb_funcall2+0x35)[0x399da34d65]
/usr/lib64/libruby.so.1.8(rb_obj_call_init+0x54)[0x399da34e24]
/usr/lib64/libruby.so.1.8(rb_class_new_instance+0x32)[0x399da5fda2]
/usr/lib64/libruby.so.1.8[0x399da34611]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8(rb_call_super+0x9b)[0x399da35beb]
/usr/lib64/libruby.so.1.8[0x399da33e49]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3c004]
/usr/lib64/libruby.so.1.8[0x399da3b217]
/usr/lib64/libruby.so.1.8[0x399da3db03]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3bec6]
/usr/lib64/libruby.so.1.8[0x399da3e99d]
/usr/lib64/libruby.so.1.8[0x399da3c72f]
/usr/lib64/libruby.so.1.8[0x399da34633]
/usr/lib64/libruby.so.1.8[0x399da34b28]
/usr/lib64/libruby.so.1.8[0x399da3bec6]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 76198155 /usr/bin/ruby
00600000-00602000 rw-p 00000000 fd:00 76198155 /usr/bin/ruby
1936c000-1bab4000 rw-p 1936c000 00:00 0 [heap]
41af2000-41af3000 ---p 41af2000 00:00 0
41af3000-424f3000 rw-p 41af3000 00:00 0
399c600000-399c61c000 r-xp 00000000 fd:00 25460747 /lib64/ld-2.5.so
399c81c000-399c81d000 r--p 0001c000 fd:00 25460747 /lib64/ld-2.5.so
399c81d000-399c81e000 rw-p 0001d000 fd:00 25460747 /lib64/ld-2.5.so
399ca00000-399cb4d000 r-xp 00000000 fd:00 25460763 /lib64/libc-2.5.so
399cb4d000-399cd4d000 ---p 0014d000 fd:00 25460763 /lib64/libc-2.5.so
399cd4d000-399cd51000 r--p 0014d000 fd:00 25460763 /lib64/libc-2.5.so
399cd51000-399cd52000 rw-p 00151000 fd:00 25460763 /lib64/libc-2.5.so
399cd52000-399cd57000 rw-p 399cd52000 00:00 0
399ce00000-399ce02000 r-xp 00000000 fd:00 25460801 /lib64/libdl-2.5.so
399ce02000-399d002000 ---p 00002000 fd:00 25460801 /lib64/libdl-2.5.so
399d002000-399d003000 r--p 00002000 fd:00 25460801 /lib64/libdl-2.5.so
399d003000-399d004000 rw-p 00003000 fd:00 25460801 /lib64/libdl-2.5.so
399d200000-399d216000 r-xp 00000000 fd:00 25460780 /lib64/libpthread-2.5.so
399d216000-399d415000 ---p 00016000 fd:00 25460780 /lib64/libpthread-2.5.so
399d415000-399d416000 r--p 00015000 fd:00 25460780 /lib64/libpthread-2.5.so
399d416000-399d417000 rw-p 00016000 fd:00 25460780 /lib64/libpthread-2.5.so
399d417000-399d41b000 rw-p 399d417000 00:00 0
399d600000-399d682000 r-xp 00000000 fd:00 25460910 /lib64/libm-2.5.so
399d682000-399d881000 ---p 00082000 fd:00 25460910 /lib64/libm-2.5.so
399d881000-399d882000 r--p 00081000 fd:00 25460910 /lib64/libm-2.5.so
399d882000-399d883000 rw-p 00082000 fd:00 25460910 /lib64/libm-2.5.so
399da00000-399dad2000 r-xp 00000000 fd:00 76195786 /usr/lib64/libruby.so.1.8.6
399dad2000-399dcd1000 ---p 000d2000 fd:00 76195786 /usr/lib64/libruby.so.1.8.6
399dcd1000-399dcd6000 rw-p 000d1000 fd:00 76195786 /usr/lib64/libruby.so.1.8.6
399dcd6000-399dcf4000 rw-p 399dcd6000 00:00 0
399de00000-399de15000 r-xp 00000000 fd:00 25460967 /lib64/libselinux.so.1
399de15000-399e015000 ---p 00015000 fd:00 25460967 /lib64/libselinux.so.1
399e015000-399e017000 rw-p 00015000 fd:00 25460967 /lib64/libselinux.so.1
399e017000-399e018000 rw-p 399e017000 00:00 0
399e200000-399e23b000 r-xp 00000000 fd:00 25460959 /lib64/libsepol.so.1
399e23b000-399e43b000 ---p 0003b000 fd:00 25460959 /lib64/libsepol.so.1
399e43b000-399e43c000 rw-p 0003b000 fd:00 25460959 /lib64/libsepol.so.1
399e43c000-399e446000 rw-p 399e43c000 00:00 0
399e600000-399e607000 r-xp 00000000 fd:00 25460792 /lib64/librt-2.5.so
399e607000-399e807000 ---p 00007000 fd:00 25460792 /lib64/librt-2.5.so
399e807000-399e808000 r--p 00007000 fd:00 25460792 /lib64/librt-2.5.so
399e808000-399e809000 rw-p 00008000 fd:00 25460792 /lib64/librt-2.5.so
399ee00000-399ee11000 r-xp 00000000 fd:00 25460932 /lib64/libresolv-2.5.so
399ee11000-399f011000 ---p 00011000 fd:00 25460932 /lib64/libresolv-2.5.so
399f011000-399f012000 r--p 00011000 fd:00 25460932 /lib64/libresolv-2.5.so
399f012000-399f013000 rw-p 00012000 fd:00 25460932 /lib64/libresolv-2.5.so
399f013000-399f015000 rw-p 399f013000 00:00 0
399f200000-399f202000 r-xp 00000000 fd:00 25460916 /lib64/libkeyutils-1.2.so
399f202000-399f401000 ---p 00002000 fd:00 25460916 /lib64/libkeyutils-1.2.so
399f401000-399f402000 rw-p 00001000 fd:00 25460916 /lib64/libkeyutils-1.2.so
399f600000-399f72d000 r-xp 00000000 fd:00 25461007 /lib64/libcrypto.so.0.9.8e
399f72d000-399f92c000 ---p 0012d000 fd:00 25461007 /lib64/libcrypto.so.0.9.8e
399f92c000-399f94d000 rw-p 0012c000 fd:00 25461007 /lib64/libcrypto.so.0.9.8e
399f94d000-399f951000 rw-p 399f94d000 00:00 0
399fe00000-399fe02000 r-xp 00000000 fd:00 25460978 /lib64/libcom_err.so.2.1
399fe02000-39a0001000 ---p 00002000 fd:00 25460978 /lib64/libcom_err.so.2.1
39a0001000-39a0002000 rw-p 00001000 fd:00 25460978 /lib64/libcom_err.so.2.1
39a0200000-39a0291000 r-xp 00000000 fd:00 76188943 /usr/lib64/libkrb5.so.3.3
39a0291000-39a0491000 ---p 00091000 fd:00 76188943 /usr/lib64/libkrb5.so.3.3
39a0491000-39a0495000 rw-p 00091000 fd:00 76188943 /usr/lib64/libkrb5.so.3.3
39a0600000-39a0608000 r-xp 00000000 fd:00 76188760 /usr/lib64/libkrb5support.so.0.1
39a0608000-39a0807000 ---p 00008000 fd:00 76188760 /usr/lib64/libkrb5support.so.0.1
39a0807000-39a0808000 rw-p 00007000 fd:00 76188760 /usr/lib64/libkrb5support.so.0.1
39a0a00000-39a0a24000 r-xp 00000000 fd:00 76188937 /usr/lib64/libk5crypto.so.3.1
39a0a24000-39a0c23000 ---p 00024000 fd:00 76188937 /usr/lib64/libk5crypto.so.3.1
39a0c23000-39a0c25000 rw-p 00023000 fd:00 76188937 /usr/lib64/libk5crypto.so.3.1
39a0e00000-39a0e2c000 r-xp 00000000 fd:00 76188991 /usr/lib64/libgssapi_krb5.so.2.2
39a0e2c000-39a102c000 ---p 0002c000 fd:00 76188991 /usr/lib64/libgssapi_krb5.so.2.2
39a102c000-39a102e000 rw-p 0002c000 fd:00 76188991 /usr/lib64/libgssapi_krb5.so.2.2
39a1200000-39a1246000 r-xp 00000000 fd:00 25461009 /lib64/libssl.so.0.9.8e
39a1246000-39a1446000 ---p 00046000 fd:00 25461009 /lib64/libssl.so.0.9.8e
39a1446000-39a144c000 rw-p 00046000 fd:00 25461009 /lib64/libssl.so.0.9.8e
39a5e00000-39a5e0d000 r-xp 00000000 fd:00 25461062 /lib64/libgcc_s-4.1.2-20080825.so.1
39a5e0d000-39a600d000 ---p 0000d000 fd:00 25461062 /lib64/libgcc_s-4.1.2-20080825.so.1
39a600d000-39a600e000 rw-p 0000d000 fd:00 25461062 /lib64/libgcc_s-4.1.2-20080825.so.1
39a6a00000-39a6a09000 r-xp 00000000 fd:00 25460913 /lib64/libcrypt-2.5.so
39a6a09000-39a6c08000 ---p 00009000 fd:00 25460913 /lib64/libcrypt-2.5.so
39a6c08000-39a6c09000 r--p 00008000 fd:00 25460913 /lib64/libcrypt-2.5.so
39a6c09000-39a6c0a000 rw-p 00009000 fd:00 25460913 /lib64/libcrypt-2.5.so
39a6c0a000-39a6c38000 rw-p 39a6c0a000 00:00 0
2aaaaaadc000-2aaaaaade000 rw-p 2aaaaaadc000 00:00 0
2aaaaaade000-2aaaaab10000 rw-p 2aaaaaaab000 00:00 0
2aaaaab91000-2aaaab6cc000 rw-p 2aaaaab91000 00:00 0
2b79b66f9000-2b79b66fb000 rw-p 2b79b66f9000 00:00 0
2b79b6717000-2b79b677c000 rw-p 2b79b6717000 00:00 0
2b79b677c000-2b79b6780000 r-xp 00000000 fd:00 77038425 /usr/lib64/ruby/1.8/x86_64-linux/thread.so
2b79b6780000-2b79b697f000 ---p 00004000 fd:00 77038425 /usr/lib64/ruby/1.8/x86_64-linux/thread.so
2b79b697f000-2b79b6980000 rw-p 00003000 fd:00 77038425 /usr/lib64/ruby/1.8/x86_64-linux/thread.so
2b79b6980000-2b79b6982000 r-xp 00000000 fd:00 77038355 /usr/lib64/ruby/1.8/x86_64-linux/etc.so
2b79b6982000-2b79b6b81000 ---p 00002000 fd:00 77038355 /usr/lib64/ruby/1.8/x86_64-linux/etc.so
2b79b6b81000-2b79b6b82000 rw-p 00001000 fd:00 77038355 /usr/lib64/ruby/1.8/x86_64-linux/etc.so
2b79b6b83000-2b79b6c33000 rw-p 2b79b6b83000 00:00 0
2b79b6c33000-2b79b6c37000 r-xp 00000000 fd:00 77038421 /usr/lib64/ruby/1.8/x86_64-linux/stringio.so
2b79b6c37000-2b79b6e37000 ---p 00004000 fd:00 77038421 /usr/lib64/ruby/1.8/x86_64-linux/stringio.so
2b79b6e37000-2b79b6e38000 rw-p 00004000 fd:00 77038421 /usr/lib64/ruby/1.8/x86_64-linux/stringio.so
2b79b6e38000-2b79b6e54000 r-xp 00000000 fd:00 77038423 /usr/lib64/ruby/1.8/x86_64-linux/syck.so
2b79b6e54000-2b79b7053000 ---p 0001c000 fd:00 77038423 /usr/lib64/ruby/1.8/x86_64-linux/syck.so
2b79b7053000-2b79b7055000 rw-p 0001b000 fd:00 77038423 /usr/lib64/ruby/1.8/x86_64-linux/syck.so
2b79b7056000-2b79b7193000 rw-p 2b79b7056000 00:00 0
2b79b71af000-2b79b71b9000 r-xp 00000000 fd:00 25460914 /lib64/libnss_files-2.5.so
2b79b71b9000-2b79b73b8000 ---p 0000a000 fd:00 25460914 /lib64/libnss_files-2.5.so
2b79b73b8000-2b79b73b9000 r--p 00009000 fd:00 25460914 /lib64/libnss_files-2.5.so
2b79b73b9000-2b79b73ba000 rw-p 0000a000 fd:00 25460914 /lib64/libnss_files-2.5.so
2b79b73ba000-2b79b75f4000 rw-p 2b79b73ba000 00:00 0
2b79b75f4000-2b79b762e000 r-xp 00000000 fd:00 77038361 /usr/lib64/ruby/1.8/x86_64-linux/openssl.so
2b79b762e000-2b79b782d000 ---p 0003a000 fd:00 77038361 /usr/lib64/ruby/1.8/x86_64-linux/openssl.so
2b79b782d000-2b79b7830000 rw-p 00039000 fd:00 77038361 /usr/lib64/ruby/1.8/x86_64-linux/openssl.so
2b79b784c000-2b79b7860000 r-xp 00000000 fd:00 25460996 /lib64/libz.so.1.2.3
2b79b7860000-2b79b7a5f000 ---p 00014000 fd:00 25460996 /lib64/libz.so.1.2.3
2b79b7a5f000-2b79b7a60000 rw-p 00013000 fd:00 25460996 /lib64/libz.so.1.2.3
2b79b7a60000-2b79b7a61000 r-xp 00000000 fd:00 77038356 /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so
2b79b7a61000-2b79b7c60000 ---p 00001000 fd:00 77038356 /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so
2b79b7c60000-2b79b7c61000 rw-p 00000000 fd:00 77038356 /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so
2b79b7c61000-2b79b7c6a000 r-xp 00000000 fd:00 77038426 /usr/lib64/ruby/1.8/x86_64-linux/zlib.so
2b79b7c6a000-2b79b7e69000 ---p 00009000 fd:00 77038426 /usr/lib64/ruby/1.8/x86_64-linux/zlib.so
2b79b7e69000-2b79b7e6a000 rw-p 00008000 fd:00 77038426 /usr/lib64/ruby/1.8/x86_64-linux/zlib.so
2b79b7e6a000-2b79b7e6c000 r-xp 00000000 fd:00 81232154 /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so
2b79b7e6c000-2b79b806b000 ---p 00002000 fd:00 81232154 /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so
2b79b806b000-2b79b806c000 rw-p 00001000 fd:00 81232154 /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so
2b79b806c000-2b79b806f000 r-xp 00000000 fd:00 77038352 /usr/lib64/ruby/1.8/x86_64-linux/digest.so
2b79b806f000-2b79b826e000 ---p 00003000 fd:00 77038352 /usr/lib64/ruby/1.8/x86_64-linux/digest.so
2b79b826e000-2b79b826f000 rw-p 00002000 fd:00 77038352 /usr/lib64/ruby/1.8/x86_64-linux/digest.so
2b79b826f000-2b79b827a000 r-xp 00000000 fd:00 77038420 /usr/lib64/ruby/1.8/x86_64-linux/socket.so
2b79b827a000-2b79b8479000 ---p 0000b000 fd:00 77038420 /usr/lib64/ruby/1.8/x86_64-linux/socket.so
2b79b8479000-2b79b847a000 rw-p 0000a000 fd:00 77038420 /usr/lib64/ruby/1.8/x86_64-linux/socket.so
2b79b847a000-2b79b847c000 rw-p 2b79b847a000 00:00 0
2b79b8496000-2b79b849a000 r-xp 00000000 fd:00 25460813 /lib64/libnss_dns-2.5.so
2b79b849a000-2b79b8699000 ---p 00004000 fd:00 25460813 /lib64/libnss_dns-2.5.so
2b79b8699000-2b79b869a000 r--p 00003000 fd:00 25460813 /lib64/libnss_dns-2.5.so
2b79b869a000-2b79b869b000 rw-p 00004000 fd:00 25460813 /lib64/libnss_dns-2.5.so
7fff47147000-7fff4717e000 rw-p 7ffffffc7000 00:00 0 [stack]
7fff471fd000-7fff47200000 r-xp 7fff471fd000 00:00 0 [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
Aborted

Allow multiple --tags options

The svn repo I am trying to migrate has 2 "tags" directories. The "git svn clone" command allows specification of multiple --tags options to handle this but unfortunately svn2git does not accept this.

LoadError on Mac OS X Lion

svn2git seems like the perfect way to interact with svn-git in order to convert an old svn repo into a git repo. Unfortunately, I am running into some problems. Hopefully someone with much more knowledge than I will be able to work some magic to help me get this working!

When I run svn2git file:///path/to/mySVN/Repo/paper1 --no-minimize-url --rootistrunk -v, I get the following error:

/Users/me/svn2git/bin/svn2git:23:in `require': no such file to load -- svn2git (LoadError)
    from /Users/me/svn2git/bin/svn2git:23

Does anyone have any ideas about what is going on here?

svn2git does not error out with missing author in authors file

When svn2git encounters a SVN commit author not in the authors file, it will print out an error but keep going in the migration. The error normally looks something like this:

Author: x not defined in authors.txt file

Even though the svn migration didn't complete successfully, svn2git will keep going and build the branches and tags, which buries the error.

I'd rather have svn2git error out than keep going on a incomplete migration, or have a flag to force this behavior.

command failed: 2>&1 git svn fetch

i run this command: svn2git http://svn.alleg.net/svn/Allegiance --verbose

then i get this:
(...)
W: +empty_dir: trunk/x86
Use of uninitialized value $u in substitution (s///) at /usr/lib/git-core/git-svn line 2097.
Use of uninitialized value $u in concatenation (.) or string at /usr/lib/git-core/git-svn line 2097.
refs/remotes/svn/trunk: 'http://svn.alleg.net/svn/Allegiance' not found in ''

command failed:
2>&1 git svn fetch


http://svn.alleg.net/svn/Allegiance is in standard layout (trunk, branches, tags) at the root level of the repo so i did not use any other options when running git2svn

2096 my $u = (::cmt_metadata("$refname"))[0];
2097 $u =~ s!^\Q$url\E(/|$)!! or die "$refname: '$url' not found in '$u'\n";

svn2git is not put in my PATH

The readme states that

Once you have the necessary software your system, you can install svn2git through rubygems, which will add the svn2git command to your PATH.

This is not true. I managed to find svn2git in /var/lib/gems/1.8/bin/svn2git. I'm running Ubuntu 10.04 (Lucid Lynx).

Not identifying --username parameter

I am getting a problem similar to that mentioned in issue #22. I am working on a Windows 7 machine with cygwin. I have installed svn2git according to the instructions found at http://shrubbery.mynetgear.net/c/display/W/Converting+SVN+to+Git+with+svn2git. I am getting the following errors from the script:

/usr/lib/ruby/1.8/optparse.rb:1445:in complete': invalid option: --username (OptionParser::InvalidOption) from /usr/lib/ruby/1.8/optparse.rb:1443:incatch'
from /usr/lib/ruby/1.8/optparse.rb:1443:in complete' from /usr/lib/ruby/1.8/optparse.rb:1256:inparse_in_order'
from /usr/lib/ruby/1.8/optparse.rb:1249:in catch' from /usr/lib/ruby/1.8/optparse.rb:1249:inparse_in_order'
from /usr/lib/ruby/1.8/optparse.rb:1243:in order!' from /usr/lib/ruby/1.8/optparse.rb:1334:inpermute!'
from /usr/lib/ruby/1.8/optparse.rb:1355:in parse!' from /usr/lib/ruby/gems/1.8/gems/nirvdrum-svn2git-1.3.1/lib/svn2git/migration.rb:101:inparse'
from /usr/lib/ruby/gems/1.8/gems/nirvdrum-svn2git-1.3.1/lib/svn2git/migration.rb:12:in initialize' from /usr/lib/ruby/gems/1.8/gems/nirvdrum-svn2git-1.3.1/bin/svn2git:25:innew'
from /usr/lib/ruby/gems/1.8/gems/nirvdrum-svn2git-1.3.1/bin/svn2git:25
from /usr/bin/svn2git:19:in `load'
from /usr/bin/svn2git:19

I am not a Ruby developer so I haven't gone into the code to see what is going on. Any ideas?

Use of uninitialized value $u in substitution (s///) at /usr/lib/git-core/git-svn line 2098

Hi!

I'm trying to import an old and extensive Subversion repository into Git.

I'm using the following command line:

svn2git --username gael --notrunk --branches postsharp/branches --notags --verbose https://tygr.kpy.sharpcrafters.com:8443/svn/postsharp

It dies with the following output:

Running command: git svn init --prefix=svn/ --username=gael --no-metadata --branches=postsharp/branches https://tygr.kpy.sharpcrafters.com:8443/svn/postsharp
Running command: git svn fetch 
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/postsharp/branches'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Found possible branch point: https://tygr.kpy.sharpcrafters.com:8443/svn/postsharp/postsharp/branches/2.0 => https://tygr.kpy.sharpcrafters.com:8443/svn/postsharp/postsharp/branches/2.0-mdb, 1285
$refname=refs/remotes/svn/1.0
Use of uninitialized value $u in substitution (s///) at /usr/lib/git-core/git-svn line 2098.
Use of uninitialized value $u in concatenation (.) or string at /usr/lib/git-core/git-svn line 2098.
refs/remotes/svn/1.0: 'https://tygr.kpy.sharpcrafters.com:8443/svn/postsharp' not found in ''

Would you have an idea of how to work around this issue?

Thanks!

-gael

--exclude works great, but is there a way to not include the empty commits?

NB. I posted this also to stack overflow: http://stackoverflow.com/questions/7067015/svn2git-with-exclude-any-way-to-ignore-the-empty-blank-commits forgive the cross-posting, I really want to know if this is possible, or if I should just live with the blank commits.

I'm converting a big SVN repository into multiple git repositories (one for each project).

I am running svn2git for each repo with all unwanted directories --excluded this works well to keep the tags and branches (I delete all the unrelated tags & branches after the conversion)

The only problem is I have loads of empty commits (commits relating to the excluded directories).

Is there any way to exclude these empty commits during the svn2git process?

This solution is a fine way to remove them after the fact, but filter-branch only affects the current branch, and not all the other branches and tags.

sub-tags folder structure

I have a slightly different tags folder structure than svn2git seems to be expecting, and therefore tags are not being imported properly. In your readme, you specify tags like this:

tags
   1.0.0
   1.0.1
   1.0.2
   1.1.0
   2.0.0

however my structure is:

tags
   1.0
      1.0.1
      1.0.2
   1.1
   2.0

this is causing svn2git to only create the 1.0, 1.1, 2.0 tags, whereas I would like all the sub-tags of 1.0 to also be created.

Is there a switch I can specify to make it understand my "recursive" tags, or is this something you can support in a future release?

error: Entry '...' would be overwritten by merge. Cannot merge.

I am trying to convert a reasonably large svn repository with branches and tags to git.

We have branches and tags with version numbers, e.g. 0.1, 0.2, ..., 0.10, 0.11, ..., 1.13, ..., 1.33 etc

Things are running for a long while, but then at some point however I am getting this error and not entirely sure how to fix this or continue:

Deleted remote branch svn/tags/last-local (was a6b0eb5).
Running command: git config --unset user.name
Running command: git config --unset user.email
Running command: git branch --track "0.10" "remotes/svn/0.10"
Branch 0.10 set up to track local ref refs/remotes/svn/0.10.
Running command: git checkout "0.10"
Switched to branch '0.10'
Running command: git branch --track "0.5" "remotes/svn/0.5"
Branch 0.5 set up to track local ref refs/remotes/svn/0.5.
Running command: git checkout "0.5"
warning: refname '0.5' is ambiguous.
Switched to branch '0.5'
Running command: git branch --track "0.6" "remotes/svn/0.6"
Branch 0.6 set up to track local ref refs/remotes/svn/0.6.
Running command: git checkout "0.6"
warning: refname '0.6' is ambiguous.
error: Entry 'GUID.py' would be overwritten by merge. Cannot merge.
command failed:
2>&1 git checkout "0.6"

Any suggestions??

error: pathspec 'master' did not match any file(s) known to git.

Here is the log, any idea?

Running command: git branch --track "Release0012" "remotes/svn/Release0012"
Branch Release0012 set up to track local ref refs/remotes/svn/Release0012.
Running command: git checkout "Release0012"
Switched to branch 'Release0012'
Running command: git branch --track "Release0012old" "remotes/svn/Release0012old
"
Branch Release0012old set up to track local ref refs/remotes/svn/Release0012old.

Running command: git checkout "Release0012old"
Switched to branch 'Release0012old'
Running command: git branch --track "Release0013" "remotes/svn/Release0013"
Branch Release0013 set up to track local ref refs/remotes/svn/Release0013.
Running command: git checkout "Release0013"
Switched to branch 'Release0013'
Running command: git branch --track "Release0013@509" "remotes/svn/Release0013@5
09"
Branch Release0013@509 set up to track local ref refs/remotes/svn/Release0013@50
9.
Running command: git checkout "Release0013@509"
Switched to branch 'Release0013@509'
Running command: git branch --track "Release0013a" "remotes/svn/Release0013a"
Branch Release0013a set up to track local ref refs/remotes/svn/Release0013a.
Running command: git checkout "Release0013a"
Switched to branch 'Release0013a'
Running command: git branch --track "Release0014" "remotes/svn/Release0014"
Branch Release0014 set up to track local ref refs/remotes/svn/Release0014.
Running command: git checkout "Release0014"
Switched to branch 'Release0014'
Running command: git branch --track "Reports_RDL" "remotes/svn/Reports_RDL"
Branch Reports_RDL set up to track local ref refs/remotes/svn/Reports_RDL.
Running command: git checkout "Reports_RDL"
Switched to branch 'Reports_RDL'
Running command: git branch --track "test@736" "remotes/svn/test@736"
Branch test@736 set up to track local ref refs/remotes/svn/test@736.
Running command: git checkout "test@736"
Checking out files: 3% (111/3146)
Checking out files: 4% (126/3146)
Checking out files: 5% (158/3146)
Checking out files: 6% (189/3146)
Checking out files: 7% (221/3146)
Checking out files: 8% (252/3146)
Checking out files: 9% (284/3146)
Checking out files: 10% (315/3146)
Checking out files: 11% (347/3146)
Checking out files: 12% (378/3146)
Checking out files: 13% (409/3146)
Checking out files: 14% (441/3146)
Checking out files: 15% (472/3146)
Checking out files: 16% (504/3146)
Checking out files: 16% (530/3146)
Checking out files: 17% (535/3146)
Checking out files: 18% (567/3146)
Checking out files: 19% (598/3146)
Checking out files: 20% (630/3146)
Checking out files: 21% (661/3146)
Checking out files: 22% (693/3146)
Checking out files: 23% (724/3146)
Checking out files: 24% (756/3146)
Checking out files: 25% (787/3146)
Checking out files: 26% (818/3146)
Checking out files: 27% (850/3146)
Checking out files: 28% (881/3146)
Checking out files: 29% (913/3146)
Checking out files: 30% (944/3146)
Checking out files: 31% (976/3146)
Checking out files: 31% (982/3146)
Checking out files: 32% (1007/3146)
Checking out files: 33% (1039/3146)
Checking out files: 34% (1070/3146)
Checking out files: 35% (1102/3146)
Checking out files: 36% (1133/3146)
Checking out files: 37% (1165/3146)
Checking out files: 38% (1196/3146)
Checking out files: 39% (1227/3146)
Checking out files: 40% (1259/3146)
Checking out files: 41% (1290/3146)
Checking out files: 42% (1322/3146)
Checking out files: 43% (1353/3146)
Checking out files: 44% (1385/3146)
Checking out files: 45% (1416/3146)
Checking out files: 46% (1448/3146)
Checking out files: 47% (1479/3146)
Checking out files: 48% (1511/3146)
Checking out files: 49% (1542/3146)
Checking out files: 49% (1554/3146)
Checking out files: 50% (1573/3146)
Checking out files: 51% (1605/3146)
Checking out files: 52% (1636/3146)
Checking out files: 53% (1668/3146)
Checking out files: 54% (1699/3146)
Checking out files: 55% (1731/3146)
Checking out files: 56% (1762/3146)
Checking out files: 57% (1794/3146)
Checking out files: 58% (1825/3146)
Checking out files: 59% (1857/3146)
Checking out files: 60% (1888/3146)
Checking out files: 61% (1920/3146)
Checking out files: 62% (1951/3146)
Checking out files: 63% (1982/3146)
Checking out files: 64% (2014/3146)
Checking out files: 65% (2045/3146)
Checking out files: 66% (2077/3146)
Checking out files: 67% (2108/3146)
Checking out files: 68% (2140/3146)
Checking out files: 69% (2171/3146)
Checking out files: 69% (2175/3146)
Checking out files: 70% (2203/3146)
Checking out files: 71% (2234/3146)
Checking out files: 72% (2266/3146)
Checking out files: 73% (2297/3146)
Checking out files: 74% (2329/3146)
Checking out files: 75% (2360/3146)
Checking out files: 76% (2391/3146)
Checking out files: 77% (2423/3146)
Checking out files: 78% (2454/3146)
Checking out files: 79% (2486/3146)
Checking out files: 80% (2517/3146)
Checking out files: 81% (2549/3146)
Checking out files: 82% (2580/3146)
Checking out files: 83% (2612/3146)
Checking out files: 84% (2643/3146)
Checking out files: 85% (2675/3146)
Checking out files: 86% (2706/3146)
Checking out files: 87% (2738/3146)
Checking out files: 88% (2769/3146)
Checking out files: 89% (2800/3146)
Checking out files: 90% (2832/3146)
Checking out files: 91% (2863/3146)
Checking out files: 92% (2895/3146)
Checking out files: 93% (2926/3146)
Checking out files: 94% (2958/3146)
Checking out files: 95% (2989/3146)
Checking out files: 96% (3021/3146)
Checking out files: 97% (3052/3146)
Checking out files: 98% (3084/3146)
Checking out files: 99% (3115/3146)
Checking out files: 100% (3146/3146)
Checking out files: 100% (3146/3146), done.
Switched to branch 'test@736'
Running command: git checkout -f master
error: pathspec 'master' did not match any file(s) known to git.
command failed:
2>&1 git checkout -f master

quiet mode would be nice

Hi!

I set up a cronjob and do only want to be notified about errors. Since git prints out normal status like 'Switched to branch...' to stderr and I do not want to throw stderr output away all git commands should be called with the -q option when I want it.
Feature-Request: add a -q option to svn2git that adds that -q option to all git commands.

regards,
cebe

svn authors errors with git

I setup an authors file in ~/.svn2git/authors and then ran the following command

svn2git https://path/to/repo/website/trunk --no-minimize-url --trunk trunk --nobranches --notags --username rick --verbose

And it errored around git config --local

Running command: git config --local svn.authorsfile ~/.svn2git/authors
error: unknown option `local'
<git config example output here>
command failed:
2>&1 git config --local svn.authorsfile ~/.svn2git/authors

Running git 1.7.1

Better installation instructions

It was obvious in hindsight that I would need git-svn but was very confusing when I got git: 'svn' is not a git command. running svn2git for the first time. It might be handy to add this to the installation instructions.

Also on Ubuntu ruby gems are installed in /var/lib/gems/1.8/bin so either that needs to be added to the users path or a symlink in /usr/bin to svn2git is required otherwise the program will not show up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.