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

Mercurial 3.2 breaks git-remote-hg #27

Closed
alchemicalhydra opened this issue Nov 7, 2014 · 32 comments
Closed

Mercurial 3.2 breaks git-remote-hg #27

alchemicalhydra opened this issue Nov 7, 2014 · 32 comments
Labels

Comments

@alchemicalhydra
Copy link

Upgrading to Mercurial 3.2 appears to break git-remote-hg.

I get the following upon running git fetch:

Traceback (most recent call last):
  File "/home/tomxtobin/bin/git-remote-hg", line 1322, in <module>
    sys.exit(main(sys.argv))
  File "/home/tomxtobin/bin/git-remote-hg", line 1286, in main
    repo = get_repo(url, alias)
  File "/home/tomxtobin/bin/git-remote-hg", line 433, in get_repo
    repo.pull(peer, heads=None, force=True)
  File "/usr/lib/python2.7/site-packages/mercurial/repoview.py", line 307, in __getattr__
    return getattr(self._unfilteredrepo, attr)
AttributeError: 'localrepository' object has no attribute 'pull'

Downgrading to Mercurial 3.1.2 resolves the issue.

@tyrylu
Copy link

tyrylu commented Nov 8, 2014

If you look at the mercurial changelog, they mention it, but unfortunately without any migration instructions. And, they also removed the LocalRepository.push method, but it fortunately appears not to be used anywhere.

@Lekensteyn
Copy link

Some of the changes are documented at http://mercurial.selenic.com/wiki/ApiChanges:

localrepo.pull method have been removed in favor of the exchange.pull function. It returns a pulloperation object. the former returned value is stored in the pullop.cgresult attribute.

getbundle to getchangegroup rename is not documented, but here it is:
http://selenic.com/hg/rev/e2806b8613ca

@djmitche
Copy link

With Mercuail 3.2.3 and the patch from #28 applied, I'm seeing

Traceback (most recent call last):
  File "/usr/bin/git-remote-hg", line 1307, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/git-remote-hg", line 1271, in main
    repo = get_repo(url, alias)
  File "/usr/bin/git-remote-hg", line 429, in get_repo
    repo.pull(peer, heads=None, force=True)
  File "/usr/lib64/python2.7/site-packages/mercurial/repoview.py", line 307, in __getattr__
    return getattr(self._unfilteredrepo, attr)
AttributeError: 'mqrepo' object has no attribute 'pull'

Which is slightly different, but perhaps related?

@fingolfin
Copy link
Contributor

This looks as if the patch is not actually applied -- perhaps you have multiple copies of git-remote-hg on your system and patched the wrong one?

@djmitche
Copy link

Yeah, you're right. Ebuild error on my part. Sorry for the noise.

@AdamWill
Copy link

#28 Works for me on Fedora Rawhide, FWIW (I'm backporting it to the Fedora package now).

@ChristopherKing42
Copy link

I just cloned right from github and got this:

git clone "hg::https://code.google.com/p/pychess/"
Cloning into 'pychess'...
Traceback (most recent call last):
File "/home/chris/bin/git-remote-hg", line 1322, in
sys.exit(main(sys.argv))
File "/home/chris/bin/git-remote-hg", line 1286, in main
repo = get_repo(url, alias)
File "/home/chris/bin/git-remote-hg", line 433, in get_repo
repo.pull(peer, heads=None, force=True)
File "/usr/lib/python2.7/site-packages/mercurial/repoview.py", line 307, in getattr
return getattr(self._unfilteredrepo, attr)
AttributeError: 'localrepository' object has no attribute 'pull'

@AdamWill
Copy link

@theking42 the fix has not been merged yet, you have to check out the branch from #28 or apply the fix to your master checkout.

@fingolfin
Copy link
Contributor

@theking42 you could also just use my fork, which fixes this issue and a few other minor things: https://github.com/fingolfin/git-remote-hg

@nengxu
Copy link

nengxu commented Mar 26, 2015

@fingolfin I used your fork to solve this bug. Thanks.

@bukzor
Copy link

bukzor commented May 18, 2015

Please to merge.

@bukzor
Copy link

bukzor commented Jun 3, 2015

You can also use mercurial<3.2 as a workaround.

@DanielGGordon
Copy link

Is @fingolfin's changes not merged? I just pulled today and got the same error. Will try @fingolfin's fork

@pcn
Copy link

pcn commented Sep 25, 2015

👍 for @fingolfin's fork. Is there a discussion of what needs to be done for a merge?

@fingolfin
Copy link
Contributor

@pcn For a merge to happen, Felipe would have to do it, i.e. resurface. But it seems that currently he is busy with other things. Anyway, as long as my fork works for you, that should do it, right? (That said, I don't really use git-remote-hg myself very mich right now, so it indeed would be nice if there was somebody to properly maintain this project).

@fingolfin
Copy link
Contributor

@DanielGGordon No it is not merged. Rest assured, if it ever gets merged, this issue will get a comment clearly stating so ;-)

@djmitche
Copy link

djmitche commented Sep 26, 2015 via email

@nengxu
Copy link

nengxu commented Sep 26, 2015

@djmitche git-cinnabar seems not quite active. The last commit is in April. Have you used it in real projects?

@djmitche
Copy link

I haven't as I've begun using hg directly, but I've heard good things from
the people using it. It's possible it hasn't needed any updates in the last
5 months.
On Sep 26, 2015 12:41 PM, "nengxu" notifications@github.com wrote:

@djmitche https://github.com/djmitche git-cinnabar seems not quite
active. The last commit is in April. Have you used it in real projects?


Reply to this email directly or view it on GitHub
#27 (comment)
.

@F30
Copy link

F30 commented Sep 27, 2015

@nengxu The 'next' branch had its last commit on 28 August. I've used Cinnabar, it works fine but doesn't support merges at the moment, which is quite a limitation.

@nengxu
Copy link

nengxu commented Sep 27, 2015

@djmitche @F30 Thanks for sharing info. I may stay with git-remote-hg for now since it works fine except this issue:

#10

@nrolland
Copy link

same error as of today. thks @djmitche

@fingolfin
Copy link
Contributor

@nrolland So, have you tried my fork, as suggested?

@nrolland
Copy link

no, I went to the one mentioned by @djmitche no deep reason though.. is this better to use this fork ? I find it absolutely idiotic that people would do "innovation" on the source control front, anything that makes hg get out of my way is good

@fingolfin
Copy link
Contributor

Well, git-cinnabar is a completely different project, with its own sets of pros and cons... Anyway, if it works reasonably for you, I see no need to switch.

@nrolland
Copy link

for noobs like me you recommend this over cinnabar ?

On Fri, Oct 30, 2015 at 6:28 PM, Max Horn notifications@github.com wrote:

Well, git-cinnabar is a completely different project, with its own sets
of pros and cons... Anyway, if it works reasonably for you, I see no need
to switch.


Reply to this email directly or view it on GitHub
#27 (comment)
.

Nicolas Rolland
mobile : +33 6 62 88 42 92

oyvholm added a commit to oyvholm/utils that referenced this issue Jan 12, 2016
git-remote-hg stopped working after I upgraded Mercurial to 3.6.3:

  2016-01-12 09:20:59 sunny@linode:~/src/hggit/mutt (home-sunny *)
  $ PYTHONPATH=/usr/local/lib/python2.7/site-packages git clone hg::http://dev.mutt.org/hg/mutt
  Cloning into 'mutt'...
  Traceback (most recent call last):
    File "/home/sunny/bin/git-remote-hg", line 1322, in <module>
      sys.exit(main(sys.argv))
    File "/home/sunny/bin/git-remote-hg", line 1286, in main
      repo = get_repo(url, alias)
    File "/home/sunny/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 339, in __getattr__
      return getattr(self._unfilteredrepo, attr)
  AttributeError: 'localrepository' object has no attribute 'pull'
  2016-01-12 09:21:02 sunny@linode:~/src/hggit/mutt (home-sunny *)
  $

According to <felipec/git-remote-hg#27> it's
broken by Mercurial 3.2 . github.com/felipec/git-remote-hg.git hasn't
been updated since 2014-06-03, but this fork at
<git@github.com:fingolfin/git-remote-hg.git> fixes this problem and
seems to work great out of the box. Synced against the newest commit
bd8c46e1ea29d192bb8ad67708b33ea59d396b7a from 2015-12-07.

Also update synced.sql with the new location and timestamp when it was
updated.

a22c32c2-b90a-11e5-9ca0-fefdb24f8e10
@xrchz
Copy link

xrchz commented Feb 21, 2016

@felipec how come @fingolfin's patch is not merged yet?

@alexei-31
Copy link

@fingolfin is not patch, its actual fork against this, which depricated.
Author of @felipec is not update something here since 3 Jun 2014.

@fingolfin
Copy link
Contributor

@nrolland sorry, didn't see your last question. I have never tried git-cinnabar, and so I can neither recommend for nor against it. My understanding is that using it is about exactly as easy / difficult as using this project.

What I can say is that my fork of this project has been working well for me for some years now. However, that doesn't mean it will work perfectly for you -- perhaps you will use it quite differently from the way I use it, uncovering problems I never noticed myself... who knows...

@xrchz
Copy link

xrchz commented Feb 22, 2016

@fingolfin I'm using your fork now, and it's working great :) Thanks

@felipec felipec added the bug label May 17, 2016
@felipec
Copy link
Owner

felipec commented May 17, 2016

Fixed in 1e27907.

@felipec felipec closed this as completed May 17, 2016
@felipec
Copy link
Owner

felipec commented May 17, 2016

The home page clearly states:

Contributing

Send your patches to the mailing list git-fc@googlegroups.com (no need to subscribe).

Nobody sent any patches.

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

No branches or pull requests