2

I'm trying to migrate SVN to Git on Ubuntu 18.04.1 LTS. I've installed git with:

sudo apt-get install git-core

Which doesn't seem to contain git-svn. I tried:

sudo apt-get update

Then:

sudo apt-get install git-svn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package git-svn is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'git-svn' has no installation candidate

I also tried from git-svn not a git command?:

sudo add-apt-repository ppa:git-core/ppa
...
sudo apt-get update
...
sudo apt-get install git-svn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 git-svn : Depends: git (> 1:2.19.0) but 1:2.17.1-1ubuntu0.1 is to be installed
           Depends: libsvn-perl but it is not installable
           Depends: libterm-readkey-perl but it is not installable
E: Unable to correct problems, you have held broken packages.

Seems https://askubuntu.com/questions/1002376/cant-install-package-with-apt?rq=1 has similar issues.

Help would be much appreciated.

RayCh
  • 571
  • 3
  • 8
  • 17
  • What is wrong with the git-svn version that is shipped by ubuntu 18.04 itself ? – marcolz Sep 13 '18 at 09:28
  • @marcolz it looks like Ray first tried with ubuntu-provided packages, not the ppa. – eftshift0 Sep 13 '18 at 14:49
  • Yes, just tried again with official ubuntu-18.04.1-live-server-amd64.iso. git-svn package is not shipped with 18.04.1. Running 'git svn clone ...' results in: "git: 'svn' is not a git command. See 'git --help'." I'm now running with ubuntu-16.04.5, and 'sudo apt-get install git-svn' runs fine in that. I would've liked to use the latest Ubuntu, but ... – RayCh Sep 14 '18 at 10:58

2 Answers2

5

You can easily install by executing this:

sudo apt-get install git git-svn

Before

user@xxx:/mnt/d/Sandbox/SVN_EXPORT$ git svn clone  http://svn.xyz.com/u-a --no-metadata -A authors-transform.txt --stdlayout ./temp
git: 'svn' is not a git command. See 'git --help'.

Did you mean one of these?
        fsck
        mv
        show

After

user@xxx:/mnt/d/Sandbox/SVN_EXPORT$ git svn clone  http://svn.xyz.com/u-a --no-metadata -A authors-transform.txt --stdlayout ./temp
Initialized empty Git repository in /mnt/d/Sandbox/SVN_EXPORT/temp/.git/
HobPet
  • 632
  • 7
  • 13
0

I see that the package is available. Perhaps you need to enable some more ubuntu repos? universe, perhaps?

https://packages.ubuntu.com/bionic/git-svn

eftshift0
  • 26,375
  • 3
  • 36
  • 60