nirvdrum / svn2git

Ruby tool for importing existing svn projects into git.
MIT License
2.11k stars 443 forks source link

Is my svn2git running or hung? #60

Closed jlexer closed 10 years ago

jlexer commented 12 years ago

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?

ansell commented 12 years ago

Did you run svn2git in verbose mode using the flag "-v"? If you do that you should get a stream of output about which revision it is up to etc.

jlexer commented 12 years ago

No, I did not run in verbose mode as it was only the first time that I ran it, so I did not think to run with debugging. It been over 20 hours now and still no change. Assuming that it is running, should I see some cache growing somewhere?

ansell commented 12 years ago

I am fairly sure that in most cases you can safely stop the process with Ctrl-C and restart it using -v to see what is happening. If that doesn't work then you can start from scratch with -v to monitor its progress and the error may appear soon after you start debugging if you are lucky.

TheJosh commented 12 years ago

I agree, had the same issue, didn't know if it was working or not. Can the program be made to output something even if not running in verbose mode, such as:

creating repository...done
importing revisions...done
creating tags...done
kastork commented 12 years ago

for me it was a self-signed server certificate. svn2git just silently hangs unless you type -v. When you do that it hangs, but it at least tells you the reason.

self-signed server certs are pretty common, there needs to be a way to say "self signed cert is okay"

jose-ibanez commented 12 years ago

I'm also trying to convert a VisualSVN server that uses a self-signed certificate, and it appeared to be stuck.

I ran:

svn2git https://PATH/TO/REPO --username jibanez --verbose --authors ./authors-transform.txt

and I got:

Running command: git svn init --prefix=svn/ --username=jibanez --no-metadata --trunk=trunk --tags=tags --branches=branches https://PATH/TO/REPO
Initialized empty Git repository in /Users/jibanez/Documents/REPO/.git/
Authentication realm: <https://PATH> VisualSVN Server

According to Issue 59, this means it's actually waiting for your password, although the prompt doesn't appear until after you've hit enter.

TheJosh commented 12 years ago

You have to run in verbose mode (-v) every time you use this tool because it's completely useless otherwise.

dmitril commented 12 years ago

I did ran it with -v, but still it froze forever. Then I executed git svn init directly and found that it was printing more info than svn2git displayed. First git svn showed Error validating server certificate for ...

I resolved this by running svn co directly.

Then I again ran svn2git, but it again froze. I again had to execute git svn init, which asked for a password!

So, the problem is that svn2git drops stdout (or stderr) from the invoked commands (even in -v mode). So, I have to run git svn directly instead of using svn2git.

toivoh commented 11 years ago

I had similar problems. Excerpt from running svn2git --rebase -v:

Error validating server certificate for 'https://svn.jmodelica.org:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: *.jmodelica.org
 - Valid: from Sun, 29 Jan 2012 18:02:14 GMT until Thu, 30 Jan 2014 09:06:59 GMT
 - Issuer: Secure Digital Certificate Signing, StartCom Ltd., IL
 - Fingerprint: e9:a9:f2:43:81:e0:47:0b:aa:e2:0a:3b:29:4f:0e:2b:6f:aa:d0:f4
p       
(R)eject, accept (t)emporarily or accept (p)ermanently? 

I was able get past this, but only because I knew that I had to respond with a p! As you can see, the prompt was printed after my response. What is svn2git doing with stdout?

pwojnowski commented 10 years ago

IMHO '-v' should be enabled by default or should print some information. I left the command running for around 20 hours and it did nothing, because wanted credentials from me...

nirvdrum commented 10 years ago

It took a bit of effort, but svn2git should pass STDIN in through to the underlying git-svn process as of the 2.3.0 release. This should allow you to respond to the prompt and accept or reject the certificate as well as enter the password. Please re-open if you find otherwise.