Comments (12)
Do you have execution rights for git-remote-hg?
from git-remote-hg.
Yes:
~/bin/
$ ls -l git-remote-hg
-rwxr-xr-x 1 andy andy 35844 9 Dec 13:56 git-remote-hg
from git-remote-hg.
OK, another case that would match your symptoms: the interpreter for git-remote-hg cannot be found.
Example:
> which git-remote-hg
/home/bpierre/progs/bin/git-remote-hg
> head /home/bpierre/progs/bin/git-remote-hg
#!/usr/bin/python_bad_version
print 'arst'
> git clone "hg::http://selenic.com/repo/hello"
16:25:11> git clone "hg::http://selenic.com/repo/hello"
Cloning into 'hello'...
fatal: Unable to find remote helper for 'hg'
So check it's the correct Python version.
from git-remote-hg.
Hmm, I think the interpreter is ok:
$ head git-remote-hg
#!/usr/bin/env python2
#
# Copyright (c) 2012 Felipe Contreras
#
# Inspired by Rocco Rutte's hg-fast-export
# Just copy to your ~/bin, or anywhere in your $PATH.
# Then you can clone with:
# git clone hg::/path/to/mercurial/repo/
~/bin/
$ /usr/bin/env python2 --version
Python 2.7.8
One weirdness though is which
doesn't find the script.
~/bin/
$ which git-remote-hg
(nothing)
I can see how this would mean git can't find the remote helper.
However I have no idea why which
can't see git-remote-hg
.
from git-remote-hg.
Yeah, which not finding it is weird. What happen if you call git-remote-hg directly? It should error out with: "ERROR: Not enough arguments.".
from git-remote-hg.
Yes, it does:
$ ./git-remote-hg
ERROR: Not enough arguments.
So I guess git-remote-hg
is fine...the problem is somewhere else at my end.
from git-remote-hg.
The problem's definitely not with git-remote-hg
. I realised that other executables in my ~/bin
directory weren't visible to which
even though I could execute them.
My PATH starts with .git/safe/../../bin:
. This is so that I can run known-safe project executables easily. However it seems to break which
's search since removing it makes all of my ~/bin
directory, including git-remote-hg
visible to which
again.
Sorry for the noise and thank you for your help!
from git-remote-hg.
I notice you're calling it with a relative path, does it work without it? Are you sure your PATH is correctly set?
Also you could try this:
> git --exec-path="$HOME/bin:$(git --exec-path)" clone "hg::http://selenic.com/repo/hello"
from git-remote-hg.
I can execute git-remote-hg
from anywhere and I get ERROR: Not enough arguments.
At the same time which git-remote-hg
can't see it.
My PATH starts with the entry I described above, which is a location which only exists in certain directories. I wonder whether which
gives up if the first location in PATH doesn't exist.
I tried git --exec-path...
and it went further than before...before crashing:
$ git --exec-path="$HOME/bin:$(git --exec-path)" clone "hg::http://selenic.com/repo/hello"
Cloning into 'hello'...
Traceback (most recent call last):
File "/Users/andy/bin/git-remote-hg", line 1322, in <module>
sys.exit(main(sys.argv))
File "/Users/andy/bin/git-remote-hg", line 1286, in main
repo = get_repo(url, alias)
File "/Users/andy/bin/git-remote-hg", line 433, in get_repo
repo.pull(peer, heads=None, force=True)
File "/usr/local/lib/python2.7/site-packages/mercurial/repoview.py", line 307, in __getattr__
return getattr(self._unfilteredrepo, attr)
AttributeError: 'localrepository' object has no attribute 'pull'
from git-remote-hg.
This last error is due to incompatible changes to the Mercurial API in the last version, you need this patch: https://github.com/felipec/git-remote-hg/pull/28/files
from git-remote-hg.
Thanks, that patch worked for me.
from git-remote-hg.
FYI I posted this as a question on StackOverflow.
from git-remote-hg.
Related Issues (20)
- TypeError: int() argument must be a string or a number, not 'changectx' HOT 8
- Git commit ID (SHA-1 hash) is not consistent between the committing repository and others HOT 2
- "Branch name doesn't conform to GIT standards" HOT 1
- Issue #72 is ok when using solution below, already mentionend by another user. HOT 2
- Pointer to more up-to-date fork from mnauw? HOT 1
- point to active repo? HOT 10
- About hg largefiles HOT 1
- pushes are rejected with a non-fast-forward error (looks like #36)
- Import of "lemon" hg repo failed HOT 1
- How can i get more debug information? HOT 1
- Push to hg fails with KeyError in to_rev() HOT 3
- Extra lines in commit comment changes the commit hash - breaks hg-git interoperability HOT 2
- mercurial.error.Abort: stream ended unexpectedly HOT 2
- Git ls-remote error: accessing `persistent-nodemap` repository without associated fast implementation HOT 1
- Cloning error due to decode HOT 3
- How to undo git config core.notesRef refs/notes/hg? HOT 1
- Transfer the githashes to the mercurial repository (locally) HOT 2
- SyntaxWarning about regexes
- Working with Mercurial topic branches HOT 1
- SyntaxWaring: invalid escape sequence \w HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-remote-hg.