Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing local repository #68

Open
schallert opened this issue Jun 18, 2012 · 6 comments
Open

Importing local repository #68

schallert opened this issue Jun 18, 2012 · 6 comments

Comments

@schallert
Copy link

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/
@sleicht
Copy link

sleicht commented Jun 19, 2012

That works just fine, but you have to write "file://" first:
svn2git file:///path/to/local/repo

@Downchuck
Copy link

"Couldn't open a repository: Unable to open an ra_local session to URL: Unable to open repository 'file:///path/to/local/rep' git-svn line 2327

@dsferruzza
Copy link

I had the same issue and I solved it by running svnserve temporarily:

# As root
svnserve -d -r /path/to/local/rep

Then it is possible to use:

svn2git svn://localhost/

And finally we kill the svnserve process:

# Find the PID of the process (second column)
ps -ef | grep "svnserve"

# Kill it (replace PID by the one you found)
# As root
kill PID

@aucl
Copy link

aucl commented Nov 19, 2012

svn2git file:///path/to/repo works fine for me

@nirvdrum
Copy link
Owner

It may just be whatever version of git-svn you have installed. svn2git ultimately is just a wrapper to git-svn, which is itself an evolving piece of software.

@kayhadrin
Copy link

About the error stating "Couldn't open a repository: Unable to open an ra_local session to URL: Unable to open repository 'file:///path/to/local/rep' git-svn line 2327" mentioned by Downchuck:

My understanding is that it ultimately depends on the version of the svnadmin tool that was used to create the local svn repo. I read somewhere on the internet that it would work if the svn repo was created from an old svn repo version.

I tried myself this technique using a local svn repo created with "svnadmin create --pre-1.4-compatible" and it still didn't work. (note that I was using svn v1.7.x though, so that may explain it)

The most compatible solution is using svnserve as previously indicated.

At the end of the day, "git svn fetch" analyses svn merges very slowly so it makes little difference to use a local svn repo or a local svn server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants