Code Monkey home page Code Monkey logo

Comments (5)

fingolfin avatar fingolfin commented on June 16, 2024

I assume you meant to have a cd fdroidclient after git clone and before git remote add. Doing that, I can reproduce the issue with git 2.1.2 and hg 2.9.2. It turns out the fastimport stream sent to the remote helper contains this:

mark :2767
author Daniel Martí <[email protected]> 1379960489 +0200
committer Daniel Martí <[email protected]> 1379960489 +0200
data 185
from :2759
M 100644 :2760 .gitmodules
M 160000 24ca7dd0dbaee8a011aad6195f33e840793e7df9 extern/Universal-Image-Loader

According to the fast-import specification, mode 160000 indicates a gitlink, and the SHA-1 we see refers to a commit in another repository.

This is currently not supported by git-remote-hg (and it might be difficult to properly support it -- what should it map to on the hg side, after all?). But it certainly should be possible to catch this and print a more helpful error to the user.

Perhaps also 040000 should be caught and handled at the same time (at least the docs seem to indicate that for this, a SHA-1 might also turn up instead of a mark).

from git-remote-hg.

nocnokneo avatar nocnokneo commented on June 16, 2024

I'm also seeing this error message but for a different use case:

git clone hg::https://[email protected]/eigen/eigen
cd eigen
git remote add nocnokneo hg::ssh://[email protected]/nocnokneo/eigen
git checkout -b branches/my-branch origin/master
# hack...
git commit -a -m "..."
git push nocnokneo branches/my-branch

Fails with the error:

searching for changes
no changes found
searching for changes
Traceback (most recent call last):
  File "/usr/bin/git-remote-hg", line 1322, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/git-remote-hg", line 1308, in main
    do_export(parser)
  File "/usr/bin/git-remote-hg", line 1185, in do_export
    if not push(parser.repo, peer, parsed_refs, p_revs):
  File "/usr/bin/git-remote-hg", line 1073, in push
    ret = push_unsafe(repo, remote, parsed_refs, p_revs)
  File "/usr/bin/git-remote-hg", line 1048, in push_unsafe
    ret = remote.unbundle(cg, remoteheads, 'push')
  File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 395, in unbundle
    stream = self._calltwowaystream('unbundle', cg, heads=heads)
  File "/usr/lib/python2.7/dist-packages/mercurial/sshpeer.py", line 193, in _calltwowaystream
    d = fp.read(4096)
AttributeError: 'NoneType' object has no attribute 'read'
remote: ** Unknown exception encountered with possibly-broken third-party extension pathconfig
remote: ** which supports versions unknown of Mercurial.
remote: ** Please disable pathconfig and try your action again.
remote: ** If that fixes the bug please report it to the extension author.
remote: ** Python 2.7.3 (default, Apr 23 2012, 00:40:27) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
remote: ** Mercurial Distributed SCM (version 2.9+8-aac87f70f38e)
remote: ** Extensions loaded: convert, pathconfig
remote: Traceback (most recent call last):
remote:   File "/opt/python/domains/bitbucket.org/current/bitbucket/local/env/bin/hg", line 38, in <module>
remote:     mercurial.dispatch.run()
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 28, in run
remote:     sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 69, in dispatch
remote:     ret = _runcatch(req)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 134, in _runcatch
remote:     return _dispatch(req)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 806, in _dispatch
remote:     cmdpats, cmdoptions)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 586, in runcommand
remote:     ret = _runcommand(ui, options, cmd, d)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 897, in _runcommand
remote:     return checkargs()
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 868, in checkargs
remote:     return cmdfunc()
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/dispatch.py", line 803, in <lambda>
remote:     d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/util.py", line 511, in check
remote:     return func(*args, **kwargs)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/commands.py", line 5173, in serve
remote:     s.serve_forever()
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/sshserver.py", line 94, in serve_forever
remote:     while self.serve_one():
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/sshserver.py", line 112, in serve_one
remote:     rsp = wireproto.dispatch(self.repo, self, cmd)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/wireproto.py", line 353, in dispatch
remote:     return func(repo, proto, *args)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/wireproto.py", line 622, in unbundle
remote:     proto.getfile(fp)
remote:   File "/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/local/env/lib/python2.7/site-packages/mercurial/sshserver.py", line 53, in getfile
remote:     count = int(self.fin.readline())
remote: ValueError: invalid literal for int() with base 10: ''
To hg::ssh://[email protected]/nocnokneo/eigen
 + 7e8e503...7e8e503 branches/bug-1100-fix-cmake-install-prefix -> branches/bug-1100-fix-cmake-install-prefix (forced update)
error: failed to push some refs to 'hg::ssh://[email protected]/nocnokneo/eigen'

I'm using the git-remote-hg that ships with git version 2.6.3.

from git-remote-hg.

fingolfin avatar fingolfin commented on June 16, 2024

@nocnokneo that version is ancient. You may want to use my fork of git-remote-hg, which fixes the issue originally reported here. But you actually have more issues, e.g. Mercurial complains about some obsolete extension "pathconfig" which perhaps you activated in the past in your ~/.hgrc ?

from git-remote-hg.

nocnokneo avatar nocnokneo commented on June 16, 2024

Thanks @fingolfin . I'll try out your fork. If the pathconfig issue is an issue there's not much I can do about it because that error is coming from the remote bitbucket.org side. I'm not sure what pathconfig is or what they are using it for.

from git-remote-hg.

felipec avatar felipec commented on June 16, 2024

I pushed a similar fix as the one from Mark (fa3484e). Should be fixed now.

from git-remote-hg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.