Problem converting a remote Git repository

Dr Rainer Woitok rainer.woitok at gmail.com
Wed May 6 12:07:21 UTC 2015


Greetings,

Attempting to  convert a remote  Git repository  to Mercurial I ran into
the following problem:

$ uname -a
CYGWIN_NT-6.0 tablet 2.0.1(0.287/5/3) 2015-04-30 18:13 i686 Cygwin
$ hg --version
Mercurial Distributed SCM (version 3.3)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ git --version
git version 2.1.4
$ cd /tmp
$ hg convert -d hg -s git http://git.sv.gnu.org/r/gperf.git gperf-hg
initializing destination gperf-hg repository
http://git.sv.gnu.org/r/gperf.git does not look like a Git repository
abort: http://git.sv.gnu.org/r/gperf.git: missing or unsupported repository
$ git clone http://git.sv.gnu.org/r/gperf.git gperf-git
Cloning into 'gperf-git'...
remote: Counting objects: 2775, done.
remote: Compressing objects: 100% (530/530), done.
remote: Total 2775 (delta 2238), reused 2775 (delta 2238)
Receiving objects: 100% (2775/2775), 2.72 MiB | 387.00 KiB/s, done.
Resolving deltas: 100% (2238/2238), done.
Checking connectivity... done.
$

Using the  source  specification  "git://git.savannah.gnu.org/gperf.git"
with "hg convert" doesn't  work either.   Now, I'm currently  not at all
interested in a "gperf" repository,  this is just for demonstration pur-
poses, using a rather small repository.

Searching the web, I found

   http://bz.selenic.com/show_bug.cgi?id=1246

which was opened 2008  and closed 2012,  and which seems  to exactly de-
scribe this problem.  Did the bug somehow make it again into the Mercur-
ial code, or did Git again change its ways?

Of course, first using Git and then "hg convert" IS a workaround.  Merc-
urial had no problems at all to convert the temporary local Git reposit-
ory.  But using this  workaround for larger  repositories leaves me with
two choices:  wasting space  (by keeping  the temporary  Git repository,
pulling new changes  from time to time  using Git directly, and doing an
incremental conversion from the  local Git repository to the correspond-
ing Mercurial repository) versus wasting time (not keeping the temporary
local Git repository and doing a full "git clone" and "hg convert" every
time).  I don't really like either choice.

Using the "Hg-Git" extension seems overkill for my purpose, because I do
not want to push anything back to the main repository.  And then, if I'm
interpreting the documentation correctly,  "Hg-Git", too, is permanently
keeping a local Git repository, thus doubling the overall space require-
ments.

Are there  any other  suggestions  or did I  simply forget  to configure
something?

By the way, up to now I naively thought not to need Git, Subversion, Ba-
zaar, CVS,  and others  at all,  thanks to  "hg convert".   I thought, I
could keep my laptop "Mercurial only", and this bug report was the first
hint whatsoever that I need Git to get away from Git.   Is this true for
the other version control systems, too?  Do I need "bzr" to successfully
use "hg convert -s bzr ..."?  Perhaps it would be nice for the naive us-
er like me, if "hg help convert" would point this out clearly.

Sincerely
 Rainer

PS: I'm not subscribed to this list, so please reply by personal mail.

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : (+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : Rainer.Woitok at Gmail.Com     |
| Germany                        |                                     |
 ----------------------------------------------------------------------


More information about the Mercurial mailing list