[PATCH V2] extensions: add onsub extension
Yuya Nishihara
yuya at tcha.org
Mon Oct 13 09:57:57 CDT 2014
On Sun, 12 Oct 2014 20:03:18 +0200, Angel Ezquerra wrote:
> On Sun, Oct 12, 2014 at 5:40 PM, Yuya Nishihara <yuya at tcha.org> wrote:
> > On Sun, 12 Oct 2014 16:09:15 +0200, Angel Ezquerra wrote:
> >> + util.system(cmd, environ=envargdict, cwd=cmdwd, onerr=onerr,
> >> + errprefix=_('terminated onsub in %s') % relpath)
> >
> > I didn't look through the onsub extension, but this util.system() call will
> > break the command-server channel.
> >
> > https://bitbucket.org/tortoisehg/thg/issue/3924/
> > (no response yet, as usual)
>
> Wow, that seems easy to get wrong! I can fix it following your
> suggestion in that bitbucket issue and send it again.
>
> I did a quick search of util.system calls in mercurial's code base and
> I found one in sshpeer.py, line 55:
>
> res = util.system(cmd)
>
> There is another one in the last line of hgk.py.
>
> Should those be changed then?
Maybe yes. Though it rarely happens, it's possible to make remote "hg init"
say something to stdout, for example,
[hooks]
pre-init = echo 'hi'
I have no idea whether hgk should be usable in commandserver, but out=ui.fout
have no bad effect on general use.
Regards,
More information about the Mercurial-devel
mailing list