Error when trying to use svn2git on Windows - windows

I am trying to import a svn repository into git on Windows 7. I have Ruby/Gems/svn2git installed, but when I run this command:
svn2git http://svn.server/path
I get the following error:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.0.0/lib/svn2git/migration.rb:226:i
n `popen': No such file or directory - git svn init --no-metadata --trunk=trunk
--tags=tags --branches=branches http://svn.server/path (Errno::ENO
ENT)
I don't know what this error means. All files are in the correct place as far as I can tell, and copying the repository to my local system doesn't work. Any help is appreciated. Thanks!
EDIT: My SVN repository has the default trunk/branch structure.

Svn2Git documentation states that depends on git-core (msysgit in windows) and git-svn, since the error is related to the "git svn" command, i guess you'll have to install it and make it available in your PATH.
Check this other StackOverflow question on how to install both git-core and git-svn.

Related

vs code git error: Git: /usr/bin/bash: init: No such file or directory

EDIT: I've rebooted my computer, and the issue is fixed. I have no idea why it fixed it.
In vs code on windows, when I try to Initialize Repository, I get the error
However, it used to worked fine. It changed when I tried to install Ubuntu on Windows following this video. Git is installed, and the path is in the .json file.
I'll recommend you to install git in ubuntu by apt
The git.path you've specified is to bash, not git. There's probably some wrapper that invokes that binary using git, and so when you type git init, you're really invoking bash init, which asks bash to run the script named init. Since it doesn't exist, your command is failing.
You should set git.path to a path to a Git binary, and not a bash binary.

Please suggest another fastest way for Migrating SVN repository to GIT respository

Downloaded the Ruby Installer for Windows and installed the latest version with Add Ruby executable to your path.
Installed svn2git.
Start menu ->All programs -> Ruby -> Start command prompt with ruby
Then type “gem install svn2git” and enter.
Migrate subversion repository
In Ruby command prompt gone to the directory where the files to be migrated
Then used the below command
svn2git http://[domain name]/svn/ [repository root]
It is taking around 2 days to migrate 20K commits into GIT and in SVN we have around 65K commits.
Please let me know is there any other fastest way to migrate the SVN repository to GIT repository.
You can try the github importer:
https://help.github.com/articles/importing-from-subversion/
I don't have any information on speed though.
Not sure what does svn2git do, but with the standard git-svn we noticed substantial slowness on the windows machines, especially annoying when doing the initial import indeed. There were two ways to solve it: performing the import on macos/linux machine and then simply copying the resulting repo onto the windows workstation or partial import (git svn fetch -R <recent revision>).

How to install go-sql-driver on Windows

I am trying to install go-sql-driver on Windows Vista but I am having problems with GOPATH.
I installed git as suggested and added GOPATH as a new user environment in Windows with path C:/users/A/desktop/go.
I ran go get github.com/go-sql-driver/mysql in the command line but it gives me this error:
C:\>go get github.com/go-sql-driver/mysql
go: missing Git command. See http://golang.org/s/gogetcmd
package github.com/go-sql-driver/mysql: exec: "git": executable file not found in %PATH%
When I go look at http://golang.org/s/gogetcmd it merely says download git. But it is already downloaded in my machine.
I also went ahead and created a new environement variable for PATH and set its path to the directory where git was installed but that did not help either.
What am I doing wrong?
Download the Windows version of Git from http://git-scm.com/downloads.
Run the downloaded executable file, currently Git-1.8.3-preview20130601.exe, which will start a Git Setup wizard to install Git.
Check Git Setup Options
Run Git from the Windows Command Prompt
Checkout as-is, commit Unix-style line endings
Check the installation by running:
C:\>git --version
git version 1.8.3.msysgit.0
Make sure Git is in the %PATH% environment variable and ensure Git is installed. If you cannot run git --version in the command prompt, then the Git binary directory isn't listed in your %PATH%. Fix this by adding Git to the path, close the command prompt, and run git --version in a new command prompt. If you're still having issues, then you might be having other problems.
Install the GIT BASH desktop app in your Windows PC. The download link is here. Once installed, open the shell and type:
go get -u github.com/go-sql-driver/mysql
This will install driver for Golang's MySQL database package

Using bzr with SFTP on Windows/Cygwin

Note: I'm not sure if this belongs on ServerFault or StackOverflow
I'm currently working on a project which has an SFTP-only bzr repository. All works fine using my Linux machine, but when using Windows with Cygwin I get the following issue:
$ bzr checkout sftp://user#hostname/var/bzr/project
bzr: ERROR: Unsupported protocol for url "sftp://user#hostname/var/bzr/project": Unable to import paramiko (required for sftp support): No module named Crypto
I have installed Cygwin's python-paramiko package, so I'm not sure why it's refusing to use it.
Any suggestions much appreciated.
Clarification: This does work with Windows bazaar GUI tool & Windows cmd shell, I'm just wondering if I can make it work in Cygwin as I prefer UNIXy command line tools.
Played around with this today.
Had to install python-crypto which should be a prerequisite of python-paramiko but isn't.

Git command "git svn rebase" not working with XCode 4.3.1

I have cloned few SVN Project on my system, I used to do "git svn rebase" to sync them up with SVN Repositories. Now after updating XCode to version 4.3.1, this command stopped working.
Executing "git svn rebase" on my mac (v 10.7.3) gives me error "git: 'svn' is not a git command".
I suspect, Apple is no longer installing git-svn with new XCode. Do anybody has any idea, how to fix this issue?
Thanks.
I'm quite sure git-svn never came included in the command line tools but I might be wrong. Anyhow, that's not the point, use macports (or any alike, it just happens I use this one) to get it installed:
$> sudo port selfupdate
$> sudo port variants git-core
Here you're shown the different variants for a given port (in this case git-core), and amongst them there is the one we need:
...
svn: Bi-directional subversion repository support
...
We install it by typing
$> sudo port install git-core +svn
And off you go, you should be able to use git-svn again!

Resources