nirvdrum / svn2git

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

username only partially picked up from --username option #104

Open willhains opened 11 years ago

willhains commented 11 years ago

I tried using the --username option to migrate a password-protected SVN repository, with a user name that doesn't match the logged-in user name. It seems that svn2git is using the --username value for some steps, but the user name of the currently logged-in user for other steps.

Steps to reproduce:

  1. Log in with user A.
  2. Run svn2git with option --username B (I'm using the piped password.txt method to get the password for user B into svn2git).

Expected results:

Actual results:

Script output (usernames modified to protect the innocent):

user_A$ svn2git http://companySVNserver/repos/projectName/ --revision 1670 --username user_B --authors authors-transform.txt --verbose < password.txt
Running command: git svn init --prefix=svn/ --username=user_B --no-metadata --trunk=trunk --tags=tags --branches=branches http://companySVNserver/repos/projectName/
Authentication realm: <http://companySVNserver:80> Please Enter User/Password
Password for 'user_B':
Running command: git config --local svn.authorsfile authors-transform.txt
Running command: git svn fetch -r 1670:HEAD
Authentication realm: <http://companySVNserver:80> Please Enter User/Password
Password for 'user_A':
Authentication realm: <http://companySVNserver:80> Please Enter User/Password
Username: Use of uninitialized value in chomp at /usr/lib/perl5/site_perl/Git/SVN/Prompt.pm line 114.
      0 [main] perl.exe" 2400 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
   1258 [main] perl.exe" 2400 open_stackdumpfile: Dumping stack trace to perl.exe.stackdump
Running command: git branch -l --no-color
Running command: git branch -r --no-color
Running command: git config --local --get user.name
Running command: git config --local --get user.email
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
ydbondt commented 11 years ago

Any progress on this one ? Experiencing the same issue.