And before I forget it \*again\* ...

One of the things I'm currently responsible for (as onnv gatekeeper), is maintenance of our gatehooks. From time to time I need to make changes and test them in a sandbox, and I keep my sandbox pretty small. hg update takes a while when you have to run it over all of ON :-)

Anyway, with the most recent round of changes (to support running the hooks with Mercurial built against python 2.6), I just spent the best part of a day beating my head against two things. Firstly, I'd forgotten that my sandbox was configured to exec mercurial with the


--trace

option. This has the effect with python2.6 and Mercurial 1.3.1 of making any process exit, even a successful one (exit(0)) die with a traceback:


$ $HG push ssh://onhg@localhost//scratch/gate/trees/minirepo-131_26
pushing to ssh://onhg@localhost//scratch/gate/trees/minirepo-131_26
searching for changes
Are you sure you wish to push? [y/N]: y
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: caching changes for gatehooks...
remote: ...changes cached
remote: Sanity checking your push...
remote: ...Sanity checks passed
remote: pushing to /scratch/gate/trees/minirepo-131_26-clone
remote: searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: Traceback (most recent call last):
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/dispatch.py", line 43, in _runcatch
remote: return _dispatch(ui, args)
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/dispatch.py", line 449, in _dispatch
remote: return runcommand(lui, repo, cmd, fullargs, ui, options, d)
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/dispatch.py", line 317, in runcommand
remote: ret = _runcommand(ui, options, cmd, d)
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/dispatch.py", line 501, in _runcommand
remote: return checkargs()
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/dispatch.py", line 454, in checkargs
remote: return cmdfunc()
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/dispatch.py", line 448, in
remote: d = lambda: util.checksignature(func)(ui, \*args, \*\*cmdoptions)
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/util.py", line 402, in check
remote: return func(\*args, \*\*kwargs)
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/commands.py", line 2752, in serve
remote: s.serve_forever()
remote: File "/opt/local/mercurial/1.3.1/lib/python2.6/site-packages/mercurial/sshserver.py", line 46, in serve_forever
remote: sys.exit(0)
remote: SystemExit: 0

The second one was equally frustrating: our hooks have a Test parameter, which you set to True or False in your gate's hgrc. Setting it to True means that the hook does not do any actual work. Guess which value I'd left it set to in my minirepo?

Comments:

Post a Comment:
Comments are closed for this entry.
About

I work at Oracle in the Solaris group. The opinions expressed here are entirely my own, and neither Oracle nor any other party necessarily agrees with them.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today