dusty-phillips / gitifyhg

Tools for using git as a client to mercurial repositories
GNU General Public License v3.0
62 stars 17 forks source link

Error when cloning a local repo via a relative path #7

Closed fingolfin closed 11 years ago

fingolfin commented 11 years ago

The following currently leads to disaster:

hg init
echo a > a
hg add a
hg commit -m a
cd ..
git clone gitifyhg::hgrepo gitrepoCloning into 'gitrepo'...
cd gitrepo
git pull

This errors out, because only the relative path got stored. This does work just fine in git-remote-hg due to this commit: https://github.com/felipec/git/commit/605bad5b52d2fcf3d8f5fd782a87d7c97d1b040a

Perhaps you can adapt a similar solution? This is not quite ideal, see also the discussion on https://github.com/felipec/git/issues/2, but it is a pragmatic solution until there is a better way for remote helpers to achieve this (will require extending the remote helper protocol).

dusty-phillips commented 11 years ago

Hmm, I thought I'd ported that properly. Thanks for the reproducible test case; I'll try to resolve it sometime in the next couple days.

dusty-phillips commented 11 years ago

This should be fixed in the master branch.

dusty-phillips commented 11 years ago

Closing this as it seems to be working fine for me now. Feel free to reopen if you encounter further issues.

fingolfin commented 11 years ago

Thanks, this fixed worked for me. I just have one concern: Shouldn't there be a test case for this, to make sure it doesn't get re-broken in the future?

fingolfin commented 11 years ago

(And I don't think I can reopen issues on your tracker)

dusty-phillips commented 11 years ago

I had just added a git pull to the existing test: https://github.com/buchuki/gitifyhg/commit/9b98689e85b764ecfbbbde4fd8360c68d6bdf844

fingolfin commented 11 years ago

I see it now, thanks for helping my slow brain :-)