← Back to DAGDA | Support | Source: https://github.com/felipec/git-remote-hg/issues/27
Skip to content

Mercurial 3.2 breaks git-remote-hg #27

Closed

Description

@TamsynUlthara

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.

Activity

  1. tyrylu commented on Nov 8, 2014

    @tyrylu

    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.

  2. Lekensteyn commented on Nov 15, 2014

    @Lekensteyn

    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

  3. djmitche commented on Jan 12, 2015

    @djmitche

    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?

  4. fingolfin commented on Jan 12, 2015

    @fingolfin
    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?

  5. djmitche commented on Jan 12, 2015

    @djmitche

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

  6. AdamWill commented on Jan 13, 2015

    @AdamWill

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

  7. ChristopherKing42 commented on Jan 20, 2015

    @ChristopherKing42

    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'

  8. AdamWill commented on Jan 20, 2015

    @AdamWill

    @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.

  9. fingolfin commented on Jan 20, 2015

    @fingolfin
    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

  10. nengxu commented on Mar 26, 2015

    @nengxu

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

  11. bukzor commented on May 18, 2015

    @bukzor

    Please to merge.

  12. bukzor commented on Jun 3, 2015

    @bukzor

    You can also use mercurial<3.2 as a workaround.

  13. DanielGGordon commented on Sep 18, 2015

    @DanielGGordon

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

  14. pcn commented on Sep 25, 2015

    @pcn

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

  15. fingolfin commented on Sep 26, 2015

    @fingolfin
    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).

  16. 5 remaining items

  17. nengxu commented on Sep 27, 2015

    @nengxu

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

    #10

  18. nrolland commented on Oct 30, 2015

    @nrolland

    same error as of today. thks @djmitche

  19. fingolfin commented on Oct 30, 2015

    @fingolfin
    Contributor

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

  20. nrolland commented on Oct 30, 2015

    @nrolland

    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

  21. fingolfin commented on Oct 30, 2015

    @fingolfin
    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.

  22. nrolland commented on Oct 31, 2015

    @nrolland

    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

  23. xrchz commented on Feb 21, 2016

    @xrchz

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

  24. alexei-31 commented on Feb 22, 2016

    @alexei-31

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

  25. fingolfin commented on Feb 22, 2016

    @fingolfin
    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...

  26. xrchz commented on Feb 22, 2016

    @xrchz

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

  27. felipec commented on May 17, 2016

    @felipec
    Owner

    Fixed in 1e27907.

  28. felipec commented on May 17, 2016

    @felipec
    Owner

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions