Skip to content

Can't Push On WIndows System With Mercurial 1.4 and TortoiseHG #60

grassbl8d opened this Issue Dec 24, 2009 · 8 comments

3 participants



I'm doing this on a windows vista box. I was able to configure git to push and pull btw.

When I tried to configure hg-git,
Cloning and pulling seems to work properly.

However, pushing gives me this error.

What logs can I look at for this?

pushing to git+ssh://
importing Hg objects into Git
creating and sending data
[Error 2] The system cannot find the file specified
[command interrupted]

durin42 commented Dec 26, 2009

Do you have a virus scanner running?


no i don't have one....
any ideas?

durin42 commented Dec 26, 2009

No, I don't have a Windows machine to test on. I'm afraid you're on your own for theories and debugging...


any thing i could take a look at?
log files?
i've tried it on linux machine and had no problems

durin42 commented Dec 26, 2009

There's no log files because we've never needed them - you might have luck by editing the source and adding print statements to debug.

Another option would be the --debugger flag to hg, which should get you a debugger prompt when the error occurs.


i was able to somehow get over this problem,
first, i edited mercurial.ini to point to the ssh which is installed via cygwin.

i also had to point the cygwin binaries into the windows PATH variable.

HOwever i'm encountering a new problem which i still can't find out
pushing to git+ssh://
importing Hg objects into Git
creating and sending data
** unknown exception encountered, details follow
** report bug details to
** or
** Mercurial Distributed SCM (version 1.4)
** Extensions loaded: extdiff, bookmarks, hggit, record, mq, crecord
Traceback (most recent call last):
File "hg", line 36, in
File "mercurial\dispatch.pyo", line 16, in run
File "mercurial\dispatch.pyo", line 30, in dispatch
File "mercurial\dispatch.pyo", line 46, in runcatch
File "mercurial\dispatch.pyo", line 449, in dispatch
File "mercurial\dispatch.pyo", line 319, in runcommand
File "mercurial\dispatch.pyo", line 500, in _runcommand
File "mercurial\dispatch.pyo", line 454, in checkargs
File "mercurial\dispatch.pyo", line 448, in
File "mercurial\util.pyo", line 386, in check
File "mercurial\commands.pyo", line 2356, in push
File "hgext\mq.pyo", line 2491, in push
File "c:\Program Files\TortoiseHg\hg-git\hggit\", line 19, in push
git.push(remote.path, revs, force)
File "c:\Program Files\TortoiseHg\hg-git\hggit\", line 151, in p
changed_refs = self.upload_pack(remote, revs, force)
File "c:\Program Files\TortoiseHg\hg-git\hggit\", line 534, in u
changed_refs = client.send_pack(path, changed, genpack)
File "C:\Program Files\TortoiseHg\\dulwich\", line 309, in
File "C:\Program Files\TortoiseHg\\dulwich\", line 118, in
File "C:\Program Files\TortoiseHg\\dulwich\", line 4
65, in __len

File "C:\Program Files\TortoiseHg\\dulwich\", line 4
39, in itershas
File "C:\Program Files\TortoiseHg\\dulwich\", line 5
24, in next
File "C:\Program Files\TortoiseHg\\dulwich\", line 8
2, in getitem
File "C:\Program Files\TortoiseHg\\dulwich\", line 2
46, in get_raw
File "C:\Program Files\TortoiseHg\\dulwich\", line 2
09, in _get_shafile
File "C:\Program Files\TortoiseHg\\dulwich\", line 190, i
n from_file
File "C:\Program Files\TortoiseHg\\dulwich\", line 172, i
n _parse_file
File "C:\Program Files\TortoiseHg\\dulwich\", line 96, in
File "C:\Program Files\TortoiseHg\\dulwich\", line 61, in
zlib.error: Error -3 while decompressing: invalid code lengths set

dbinit commented Dec 31, 2009

The problem is that dulwich uses "ssh" as its default ssh command. So you have to have ssh in your path.

Mercurial on the other hand lets you customize the ssh command in your .hgrc as so:

ssh = plink -ssh -i "C:/Users/yourname/.ssh/id_rsa.ppk" -C

I've created a patch for hg-git that overrides the dulwich ssh command to use the custom one (if available).

Hope this helps...


i have successfuly pushed already thanks a lot.
i also updated dulwich version to 0.4.1.

@durin42 durin42 pushed a commit that referenced this issue Nov 24, 2012
@davidmc24 davidmc24 git_handler: add bookmark compatibility with new bmstore (issue #60)
Prior to this fix, tests against the latest hg codebase would fail with:
creating bookmarks failed, do you have bookmarks enabled?
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.