Skip to content

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

Closed
grassbl8d opened this Issue Dec 24, 2009 · 8 comments

3 participants

@grassbl8d

Hi,

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://git@git.sxi.com/iris/iris.git
importing Hg objects into Git
creating and sending data
[Error 2] The system cannot find the file specified
[command interrupted]

@durin42
Collaborator
durin42 commented Dec 26, 2009

Do you have a virus scanner running?

@grassbl8d

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

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

@grassbl8d

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

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

@grassbl8d

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://git@git.sxi.com/iris/iris.git
importing Hg objects into Git
creating and sending data
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial@selenic.com
** 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\hgrepo.py", line 19, in push
git.push(remote.path, revs, force)
File "c:\Program Files\TortoiseHg\hg-git\hggit\git_handler.py", line 151, in p
ush
changed_refs = self.upload_pack(remote, revs, force)
File "c:\Program Files\TortoiseHg\hg-git\hggit\git_handler.py", line 534, in u
pload_pack
changed_refs = client.send_pack(path, changed, genpack)
File "C:\Program Files\TortoiseHg\library.zip\dulwich\client.py", line 309, in
send_pack
File "C:\Program Files\TortoiseHg\library.zip\dulwich\client.py", line 118, in
send_pack
File "C:\Program Files\TortoiseHg\library.zip\dulwich\object_store.py", line 4
65, in __len

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

@dbinit
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:

[ui]
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...

@grassbl8d

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?
90904ff
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.