Skip to content

Instantly share code, notes, and snippets.

@jerrykan
Created September 23, 2013 03:19
Show Gist options
  • Save jerrykan/6666178 to your computer and use it in GitHub Desktop.
Save jerrykan/6666178 to your computer and use it in GitHub Desktop.
A wrapper script to invoke git-remote-hg on Debian. Debian includes the Mercurial helper script in the git package but it is not placed in the $PATH by default and does not have execute permissions. This short script is a work-around for both of this issues.
#!/bin/sh
#
# Create this shell script in:
#
# /usr/local/bin/git-remote-hg
#
# Set the correct file permissions on the script:
#
# chmod 755 /usr/local/bin/git-remote-hg
#
# You should now be able to clone a Mercurial repo using the git tools:
#
# git clone hg::ssh://<host>/<repo> <local_path>
# git clone hg::http://<host>/<respo> <local_path>
#
python /usr/share/doc/git/contrib/remote-helpers/git-remote-hg $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment