how can i update the work directory in a hook?
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Thu May 29 01:22:21 CDT 2008
On Thu, May 29, 2008 at 6:29 AM, Fallwind <coolqiufeng at hotmail.com> wrote:
>
> Hi,
> I'm going to add a auto compile check in server side. So I add a hook like
> this:
> pretxnchangegroup.check = hg update -C >/dev/null && make check >/dev/null
I think you have to redirect both stdout and stderr to /dev/null.
> but I end up with this:
> [mqiu at msoclnx01 wizards]$ hg --debug --traceback push
> ssh://build@192.168.8.32/build/wizards
> running ssh build at 192.168.8.32 "hg -R build/wizards serve --stdio"
> sending hello command
> sending between command
> remote: 48
> remote: capabilities: unbundle lookup changegroupsubset
> remote: 1
> pushing to ssh://build@192.168.8.32/build/wizards
> sending heads command
> searching for changes
> common changesets up to ce398b6145ce
> 1 changesets found
> List of changesets:
> 1339956b53191914ad2198de105f376f75c32ff8
> sending unbundle command
> remote: adding changesets
> remote: adding manifests
> remote: adding file changes
> remote: added 1 changesets with 1 changes to 1 files
> remote: 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> remote: common.mk:26: *** missing separator. Stop.
> remote: transaction abort!
> remote: rollback completed
> remote: abort: pretxnchangegroup.check hook exited with status 2
> Traceback (most recent call last):
> File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 45, in
> _runcatch
> return _dispatch(ui, args)
> File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 364,
> in _dispatch
> ret = _runcommand(ui, options, cmd, d)
> File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 417,
> in _runcommand
> return checkargs()
> File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 373,
> in checkargs
> return cmdfunc()
> File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 356,
> in <lambda>
> d = lambda: func(ui, repo, *args, **cmdoptions)
> File "/usr/lib/python2.4/site-packages/mercurial/commands.py", line 2094,
> in push
> r = repo.push(other, opts['force'], revs=revs)
> File "/usr/lib/python2.4/site-packages/mercurial/localrepo.py", line 1498,
> in push
> return self.push_unbundle(remote, force, revs)
> File "/usr/lib/python2.4/site-packages/mercurial/localrepo.py", line 1578,
> in push_unbundle
> return remote.unbundle(cg, remote_heads, 'push')
> File "/usr/lib/python2.4/site-packages/mercurial/sshrepo.py", line 216, in
> unbundle
> r = self._recv()
> File "/usr/lib/python2.4/site-packages/mercurial/sshrepo.py", line 135, in
> _recv
> self.raise_(util.UnexpectedOutput(_("unexpected response:"), l))
> File "/usr/lib/python2.4/site-packages/mercurial/sshrepo.py", line 100, in
> raise_
> raise exception
> UnexpectedOutput: ('unexpected response:', '')
> abort: unexpected response: empty string
>
>
> So, is there any restrict in the hook? And reenter/lock problem there?
> --
> View this message in context: http://www.nabble.com/how-can-i-update-the-work-directory-in-a-hook--tp17527404p17527404.html
> Sent from the Mercurial mailing list archive at Nabble.com.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
More information about the Mercurial
mailing list