ValueError: invalid literal for int()

Vishal Kamat vishalkamat at gmail.com
Fri Jun 20 17:51:35 CDT 2008


Hi,
I am trying to use pretxnchangegroup hook and it gives me the following
error while push happens and hook exits with status 1 (other than 0). I
tried to workaround it by redirecting the hook output to a file (also
/dev/null) but still didnt work. If the hook exits with a stuatus 0,
everything goes fine. Any solutions?

bash-3.00$ hg push
pushing to ssh://hguser@xxxxxxxx
searching for changes
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.5)
Traceback (most recent call last):
  File "<string>", line 4, in ?
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 29, in dispatch
    return _runcatch(u, args)
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 45, in _runcatch
    return _dispatch(ui, args)
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 348, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 401, in _runcommand
    return checkargs()
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 357, in checkargs
    return cmdfunc()
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/dispatch.py",
line 340, in <lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/commands.py",
line 2147, in push
    r = repo.push(other, opts['force'], revs=revs)
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/localrepo.py",
line 1385, in push
    return self.push_unbundle(remote, force, revs)
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/localrepo.py",
line 1465, in push_unbundle
    return remote.unbundle(cg, remote_heads, 'push')
  File
"/workspace/rebuild/ext_pkgs/Mercurial/Mercurial/sparc/0.9.5/lib/python2.4/site-packages/mercurial/sshrepo.py",
line 202, in unbundle
    l = int(self.pipei.readline())
ValueError: invalid literal for int():
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: /export/hguser/bin/mercurialHooks/check_copyright.sh: line 30: exit:
a: numeric argument required
remote: sh: test: argument expected
remote: transaction abort!
remote: rollback completed
remote: abort: pretxnchangegroup.copyright hook exited with status 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20080620/b868887b/attachment.htm 


More information about the Mercurial mailing list