hg-git
hg-git copied to clipboard
Unable to push. hg v3.1, hg-git v0.7.0
I get the following error when attempting to push:
~/Development/vim › hg push
pushing to git+ssh://[email protected]:amadeus/vim.git
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
** Mercurial Distributed SCM (version 3.1)
** Extensions loaded: hggit
Traceback (most recent call last):
File "/usr/local/bin/hg", line 43, in <module>
mercurial.dispatch.run()
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 28, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 69, in dispatch
ret = _runcatch(req)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 138, in _runcatch
return _dispatch(req)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 820, in _dispatch
cmdpats, cmdoptions)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 600, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 911, in _runcommand
return checkargs()
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 882, in checkargs
return cmdfunc()
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 817, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/util.py", line 550, in check
return func(*args, **kwargs)
File "/usr/local/Cellar/mercurial/3.1/lib/python2.7/site-packages/mercurial/commands.py", line 4791, in push
newbranch=opts.get('new_branch'))
File "/Library/Python/2.7/site-packages/hggit/util.py", line 41, in inner
return f(*args, **kwargs)
File "/Library/Python/2.7/site-packages/hggit/hgrepo.py", line 28, in push
return self.githandler.push(remote.path, revs, force)
File "/Library/Python/2.7/site-packages/hggit/git_handler.py", line 308, in push
self.export_commits()
File "/Library/Python/2.7/site-packages/hggit/git_handler.py", line 274, in export_commits
self.export_git_objects()
File "/Library/Python/2.7/site-packages/hggit/git_handler.py", line 417, in export_git_objects
self.export_hg_commit(rev, exporter)
File "/Library/Python/2.7/site-packages/hggit/git_handler.py", line 484, in export_hg_commit
if obj.id not in self.git.object_store:
File "/Library/Python/2.7/site-packages/dulwich-0.9.7-py2.7-macosx-10.9-intel.egg/dulwich/object_store.py", line 275, in __contains__
if self.contains_packed(sha) or self.contains_loose(sha):
File "/Library/Python/2.7/site-packages/dulwich-0.9.7-py2.7-macosx-10.9-intel.egg/dulwich/object_store.py", line 346, in contains_loose
return self._get_loose_object(sha) is not None
File "/Library/Python/2.7/site-packages/dulwich-0.9.7-py2.7-macosx-10.9-intel.egg/dulwich/object_store.py", line 522, in _get_loose_object
return ShaFile.from_path(path)
File "/Library/Python/2.7/site-packages/dulwich-0.9.7-py2.7-macosx-10.9-intel.egg/dulwich/objects.py", line 383, in from_path
obj = cls.from_file(f)
File "/Library/Python/2.7/site-packages/dulwich-0.9.7-py2.7-macosx-10.9-intel.egg/dulwich/objects.py", line 403, in from_file
raise ObjectFormatException("invalid object header")
dulwich.errors.ObjectFormatException: invalid object header
The only settings I have in my hgrc are:
[paths]
default = https://vim.googlecode.com/hg/
default-push = git+ssh://[email protected]:amadeus/vim.git
As stated in the title, Mercurial 3.1 and hg-git 0.7.0
This appears to be repository corruption inside your .hg/git store. I'd suggest recloning.
I've had the same problem, but hg verify
shows the repo as clean. Could we instead do this?
cd .hg ; rm -rf ./git ./git-*
I've got a similar issue:
pushing to git+ssh://[email protected]/user/triquetra.git
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.9 (default, Feb 11 2015, 16:08:53) [GCC 4.9.2]
** Mercurial Distributed SCM (version 3.3)
** Extensions loaded: rebase, purge, hggit
Traceback (most recent call last):
File "/usr/lib/python-exec/python2.7/hg", line 43, in <module>
mercurial.dispatch.run()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 28, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 71, in dispatch
ret = _runcatch(req)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 140, in _runcatch
return _dispatch(req)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 860, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 621, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 951, in _runcommand
return checkargs()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 922, in checkargs
return cmdfunc()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 857, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 711, in check
return func(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 5115, in push
bookmarks=opts.get('bookmark', ()))
File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 194, in wrap
return wrapper(origfn, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/hggit/util.py", line 42, in inner
return f(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/hggit/__init__.py", line 258, in exchangepush
pushop.cgresult = repo.githandler.push(remote.path, revs, force)
File "/usr/lib64/python2.7/site-packages/hggit/git_handler.py", line 310, in push
old_refs, new_refs = self.upload_pack(remote, revs, force)
File "/usr/lib64/python2.7/site-packages/hggit/git_handler.py", line 964, in upload_pack
new_refs = client.send_pack(path, changed, genpack)
File "/usr/lib64/python2.7/site-packages/dulwich-0.8.5-py2.7-linux-x86_64.egg/dulwich/client.py", line 439, in send_pack
proto, unused_can_read = self._connect('receive-pack', path)
File "/usr/lib64/python2.7/site-packages/dulwich-0.8.5-py2.7-linux-x86_64.egg/dulwich/client.py", line 625, in _connect
con = get_ssh_vendor().connect_ssh(
AttributeError: '_Vendor' object has no attribute 'connect_ssh'