Mercurial Hg-Git: Clone from a local directory?

I have a local Git repository on my computer that I am trying to clone with Hg-Git. It works fine for me when I’m cloning from a git:// type path, but if I try to clone from two local directories.

Here is an example…

  • Git, Can't clone repo on windows
  • Error running git“Cannot run program ”git": error=2
  • Cloning a previous version on Heroku
  • Mercurial clone from a branch
  • What do these words mean in Git: Repository, fork, branch, clone, track?
  • GIT pulling or cloning repository only gets Master branch
  • hg clone "C:\Users\James\Documents\My Games\FalloutNV"
    destination directory: FalloutNV
    importing Hg objects into Git
    abort: The system cannot find the file specified
    

    The path does exist, and somehow it knows that it’s a Git repo, but it has the direction backwards. It should be importing Git objects into a (new) Hg repo.

    Any ideas? I am on Windows, trying to use TortoiseHg but comfortable enough in the command line.

    Update

    Tonight I discovered that if I rename FalloutNV to FalloutNV.git … the clone will magically work from the local disk. Just a pointer that may help!

  • fatal: Not a Git Repository
  • Git - repository and file size limits
  • Error when changing to master branch: my local changes would be overwritten by checkout
  • How to check for changes on remote (origin) Git repository?
  • Commit and push a Git repository using Rails
  • What does “git+” mean in the url?
  • One Solution collect form web for “Mercurial Hg-Git: Clone from a local directory?”

    This is strange since that error message is usually associated with Hg-Git (the dulwich part of it) not finding your ssh key.

    That is why manojlds suggested cloning using explicitly the file protocol (except I would use “file:///C:/Users/James/Documents/My Games/FalloutNV” with 3 “/” at the beginning instead of two).

    The “A guide to getting the hg-git Mercurial plugin to work on a Windows machine” confirms the ssh issue:

    If you’re getting an error like “abort: The system cannot find the file specified”, then dulwich cannot find ssh in your PATH.
    You need to make sure to install Cygwin’s OpenSSH and that you can run “ssh” from the command line.
    (and it also recommend you get the latest version of the dulwich library)


    The OP jocull adds in the comment:

    Fun fact: Tonight I discovered that if I rename “FalloutNV” to “FalloutNV.git” … the clone will magically work from the local disk.

    And that is similar to the Git protocols page, where every path of a local Git repo ends with .git.

    Git Baby is a git and github fan, let's start git clone.