Issue925

Title ValueError: invalid literal for int() with base 10: '8 files updated, 0 files merged, 0 file....
Priority bug Status need-eg
Superseder Nosy List djc, docwhat, lcantey, mpm, tonfa
Assigned To Topics patch, ssh_proto

Created on 2008-01-11.02:32:59 by docwhat, last changed 2008-09-15.08:08:53 by djc.

Files
File name Uploaded Type Edit Remove
redirect.patch mpm, 2008-01-11.18:55:43 text/x-patch
Messages
msg7130 (view) Author: djc Date: 2008-09-15.08:08:53
Setting to need-eg.
msg6924 (view) Author: tonfa Date: 2008-09-03.00:09:27
@docwhat

Hooks stdout is now redirected to stderr. Can you try a recent mercurial (the
one from hardy backports should do it) on the server ?
msg4890 (view) Author: docwhat Date: 2008-01-14.15:05:29
It didn't work for me.  I patched against the version of mercurial that I have 
in Ubuntu.  I added a changegroup line like so:
changegroup = ls --help

This generates bogus stderr output.

I got, essentially, the same error.

Ciao!
msg4874 (view) Author: mpm Date: 2008-01-12.02:48:53
The server.
msg4873 (view) Author: docwhat Date: 2008-01-12.02:41:14
On the server or the client?
msg4871 (view) Author: mpm Date: 2008-01-11.18:55:43
Try the attached patch, which should redirect stderr to stdout.
msg4867 (view) Author: docwhat Date: 2008-01-11.04:29:29
Icantey:

Scary...that was exactly the rule I had (except for missing the >/dev/null part

In that case, is there a bug open already for having HG dealing intelligently 
with something like this?  Either by capturing the output and sending it over 
the line or saving out to a log and complaining to the client?

Actually, it probably isn't a good idea to pass the output back to the client, 
since it's running from a shell account and would allow an attacker to see/know 
more. about the remote system. :-/

Ciao!
msg4866 (view) Author: lcantey Date: 2008-01-11.03:54:20
Do you have a hook setup to automatically update on the server side?

If so you need to ensure it doesn't generate output.  Something like: 

[hooks]
incoming = hg update > /dev/null
msg4865 (view) Author: docwhat Date: 2008-01-11.02:32:58
pushing to ssh://gerf.org//hg/itsalltext/
searching for changes
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 0.9.5)
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 14, in <module>
    mercurial.dispatch.run()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 20, in 
run
    sys.exit(dispatch(sys.argv[1:]))
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 29, in 
dispatch
    return _runcatch(u, args)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 45, in 
_runcatch
    return _dispatch(ui, args)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 348, in 
_dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 401, in 
_runcommand
    return checkargs()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 357, in 
checkargs
    return cmdfunc()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 340, in 
<lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/Library/Python/2.5/site-packages/mercurial/commands.py", line 2147, in 
push
    r = repo.push(other, opts['force'], revs=revs)
  File "/Library/Python/2.5/site-packages/mercurial/localrepo.py", line 1385, in 
push
    return self.push_unbundle(remote, force, revs)
  File "/Library/Python/2.5/site-packages/mercurial/localrepo.py", line 1465, in 
push_unbundle
    return remote.unbundle(cg, remote_heads, 'push')
  File "/Library/Python/2.5/site-packages/mercurial/sshrepo.py", line 202, in 
unbundle
    l = int(self.pipei.readline())
ValueError: invalid literal for int() with base 10: '8 files updated, 0 files 
merged, 0 files removed, 0 files unresolved\n'
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 7 changesets with 13 changes to 8 files
History
Date User Action Args
2008-09-15 08:08:53djcsetnosy: mpm, tonfa, lcantey, djc, docwhat
messages: + msg7130
2008-09-15 08:08:37djcsetstatus: testing -> need-eg
nosy: mpm, tonfa, lcantey, djc, docwhat
2008-09-03 00:09:27tonfasetstatus: chatting -> testing
nosy: + tonfa
messages: + msg6924
2008-08-04 16:34:12djcsettopic: + ssh_proto
nosy: + djc
2008-02-11 13:06:49djcsettopic: + patch
nosy: mpm, lcantey, docwhat
2008-01-14 15:05:30docwhatsetnosy: mpm, lcantey, docwhat
messages: + msg4890
2008-01-12 02:48:53mpmsetnosy: mpm, lcantey, docwhat
messages: + msg4874
2008-01-12 02:41:14docwhatsetnosy: mpm, lcantey, docwhat
messages: + msg4873
2008-01-11 18:55:45mpmsetfiles: + redirect.patch
nosy: + mpm
messages: + msg4871
2008-01-11 04:29:30docwhatsetmessages: + msg4867
2008-01-11 03:54:20lcanteysetstatus: unread -> chatting
nosy: + lcantey
messages: + msg4866
2008-01-11 02:32:59docwhatcreate