schacon/hg-git

hggit 0.2.6-1 dies if it try to push in an empty git repo on my hdd

Closed this issue · 2 comments

$ hg push ../myflipflops
Übertrage nach ../myflipflops
importing Hg objects into Git
creating and sending data
error: refusing to update checked out branch: refs/heads/master
error: By default, updating the current branch in a non-bare repository
error: is denied, because it will make the index and work tree inconsistent
error: with what you pushed, and will require 'git reset --hard' to match
error: the work tree to HEAD.
error:
error: You can set 'receive.denyCurrentBranch' configuration variable to
error: 'ignore' or 'warn' in the remote repository to allow pushing into
error: its current branch; however, this is not recommended unless you
error: arranged to update its work tree to match what you pushed in some
error: other way.
error:
error: To squelch this message and still keep the default behaviour, set
error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84292, Apr 20 2011, 11:58:30) [GCC 4.5.2]
** Mercurial Distributed SCM (version 1.8.1)
** Erweiterungen geladen: git
Traceback (most recent call last):
File "/usr/bin/hg", line 38, in
mercurial.dispatch.run()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 36, in dispatch
return _runcatch(u, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 58, in _runcatch
return _dispatch(ui, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 601, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 406, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 655, in _runcommand
return checkargs()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 609, in checkargs
return cmdfunc()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 598, in
d = lambda: util.checksignature(func)(ui, _args, *_cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check
return func(_args, *_kwargs)
File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 3019, in push
newbranch=opts.get('new_branch'))
File "/usr/lib/pymodules/python2.6/hgext/git/hgrepo.py", line 22, in push
git.push(remote.path, revs, force)
File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 152, in push
changed_refs = self.upload_pack(remote, revs, force)
File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 554, in upload_pack
changed_refs = client.send_pack(path, changed, genpack)
File "/usr/lib/python2.6/dist-packages/dulwich/client.py", line 187, in send_pack
self._parse_status_report(proto)
File "/usr/lib/python2.6/dist-packages/dulwich/client.py", line 139, in _parse_status_report
ref_status=ref_status)
dulwich.errors.UpdateRefsError: refs/heads/master failed to update
michael@bigbird:~/Entwicklung/myflipflops_hg$ hg push ../myflipflops
*** failed to import extension hggit: No module named hggit

Abbruch: Projektarchiv ../myflipflops nicht gefunden!

my hgrc

[ui]
username = xxxxxxx
[extensions]
hgext.bookmarks =

git =

note that i have to type "git =" instead of "hggit ="

I installed the package "mercurial-git" from testing branch of Debian Gnu/Linux "Wheezy" (the next release after the actual "Squeeze"). I have a hg repo on my hdd named "myflipflops_hg" and in the same folder an empty git repo named "myflipflops". I tried to push from the hg repo in to the git repo.

Did you try cloning the git repo here (with normal git) and then setting the hggit to where you cloned it to make sure the issue is still there with the latest version?

Interestingly, while hg apparently attempts to use git, you're still getting a "failed to import" error at the end of that traceback:
** failed to import extension hggit: No module named hggit