Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git pull failes, ERROR FOUND -> FIXED/WORK AROUND #67

Open
ReedWood opened this issue Apr 1, 2013 · 6 comments
Open

Git pull failes, ERROR FOUND -> FIXED/WORK AROUND #67

ReedWood opened this issue Apr 1, 2013 · 6 comments

Comments

@ReedWood
Copy link

ReedWood commented Apr 1, 2013

FIX:
The repository I cloned lives directly in the home directory of its dedicated user, this is
/home/repoUser
Therefore, login into the machine using ssh droped me in the correct place for the repo, and hence, the URI I used to clone was

git clone gitifyhg::ssh://repoUserSSH

where repoUserSSH is the ssh shortcut (~./ssh/config) for the remoe machine. This was good enough for cloning, but the pull failed. Changing the clone to

git clone gitifyhg::ssh://repoUserSSH://home/repoUser

fixed the pull command. Is this inconsistency worth a bug report?

ORIGINAL MESSAGE:
Using a fresh clone of a hg repo using
git gitifyhg::ssh://user@repo
which completes w/o errors a following git pull results in

git pull
Traceback (most recent call last):
File “/home/wmader/local/bin/git-remote-hg”, line 805, in
sys.exit(main(sys.argv))
File “/home/wmader/local/bin/git-remote-hg”, line 774, in main
repo = get_repo(url, alias)
File “/home/wmader/local/bin/git-remote-hg”, line 280, in get_repo
peer = hg.peer(myui, {}, url)
File “/usr/lib/python2.7/site-packages/mercurial/hg.py”, line 121, in peer
return _peerorrepo(rui, path, create).peer()
File “/usr/lib/python2.7/site-packages/mercurial/hg.py”, line 101, in _peerorrepo
obj = _peerlookup(path).instance(ui, path, create)
File “/usr/lib/python2.7/site-packages/mercurial/sshpeer.py”, line 36, in init
self.abort(error.RepoError((“couldn’t parse location %s”) % path))
File “/usr/lib/python2.7/site-packages/mercurial/sshpeer.py”, line 115, in _abort
raise exception
mercurial.error.RepoError: couldn’t parse location ssh://d2d_repository@tesla.fdm.uni-freiburg.de

I am using hg 2.5.2 and the gitify packages from arch linux' aur repo. The standard python is python 3. Might this be the problem?

@dusty-phillips
Copy link
Owner

The interesting thing about this error is that the exception is being raised inside Mercurial. Are you able to hg clone that url directly using hg clone ssh://user@repo?

The version of gitifyhg in the AUR is also out of date; the latest version is 0.8.1. I think if you change the version number in the PKGBUILD it'll build. However, I don't recall having fixed anything that would address your problem since 0.7.2. There was a commit that might give you a less scary (but less useful) error message, though.

@ReedWood
Copy link
Author

ReedWood commented Apr 1, 2013

Yes, I am able to hg clone the repo.

I will try the up-to-date gitify version and come back.

@ReedWood
Copy link
Author

ReedWood commented Apr 2, 2013

As a quick info, I updated to gitifyhg 0.8.1 and now I get

git pull
Traceback (most recent call last):
File "/usr/bin/git-remote-gitifyhg", line 8, in
load_entry_point('gitifyhg==0.8.1', 'console_scripts', 'git-remote-gitifyhg')()
File "/usr/lib/python2.7/site-packages/gitifyhg/gitifyhg.py", line 262, in main
HGRemote(*[x.decode('utf-8') for x in sys.argv[1:3]]).process()
File "/usr/lib/python2.7/site-packages/gitifyhg/gitifyhg.py", line 135, in init
self.build_repo(url)
File "/usr/lib/python2.7/site-packages/gitifyhg/gitifyhg.py", line 158, in build_repo
self.peer = hg.peer(myui, {}, url.encode('utf-8'))
File "/usr/lib/python2.7/site-packages/mercurial/hg.py", line 121, in peer
return _peerorrepo(rui, path, create).peer()
File "/usr/lib/python2.7/site-packages/mercurial/hg.py", line 101, in _peerorrepo
obj = _peerlookup(path).instance(ui, path, create)
File "/usr/lib/python2.7/site-packages/mercurial/sshpeer.py", line 36, in init
self.abort(error.RepoError(("couldn't parse location %s") % path))
File "/usr/lib/python2.7/site-packages/mercurial/sshpeer.py", line 115, in _abort
raise exception
mercurial.error.RepoError: couldn't parse location ssh://d2d_repository@tesla.fdm.uni-freiburg.de

The strange thing is that in the last line where mercurial complains about not beeing able to parse the location, the location looks pretty good to me. I have set up an ssh-key to be used for this server, but I can not imagine that this has an influence on the location string.

@dusty-phillips
Copy link
Owner

That is indeed a bizarre error. Can you try extracting the code that calls mercurial from python to do the clone and see if the error can be isolated?

It's particularly odd that the hg clone succeeds, but the pull fails. You could try adding some debugging statements to see if the location changes between initial clone and pull.

@ReedWood
Copy link
Author

ReedWood commented Apr 5, 2013

@buchuki I hope I will find time this weekend to investigate further.

@felipec
Copy link
Contributor

felipec commented Apr 5, 2013

I think the bug is in mercurial, this should work: git clone gitifyhg::ssh//repoUserSSH/ (with a slash at the end).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants