This revision was automatically updated to reflect the committed changes.
Closed by commit rHG106adc261492: logtoprocess: sends the canonical command
name to the subprocess (authored by lothiraldan, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm
lothiraldan updated this revision to Diff 12307.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4820?vs=12298&id=12307
REVISION DETAIL
https://phab.mercurial-scm.org/D4820
AFFECTED FILES
mercurial/dispatch.py
tests/test-logtoprocess.t
CHANGE DETAIL
lothiraldan added a comment.
In https://phab.mercurial-scm.org/D4820#77397, @yuja wrote:
> > +# extract the canonical command from the passed opts.
> > +# we need to pop it up from the opts else the msg
will try
> > +# bein
lothiraldan updated this revision to Diff 12298.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4820?vs=12296&id=12298
REVISION DETAIL
https://phab.mercurial-scm.org/D4820
AFFECTED FILES
mercurial/dispatch.py
tests/test-logtoprocess.t
CHANGE DETAIL
yuja added a comment.
> +# extract the canonical command from the passed opts.
> +# we need to pop it up from the opts else the msg
will try
> +# being formatted using the passed opts.
Oops, that's probably a bug. IIUC, `**
> +# extract the canonical command from the passed opts.
> +# we need to pop it up from the opts else the msg will
> try
> +# being formatted using the passed opts.
Oops, that's probably a bug. IIUC, `**opts` is just ancillary data, and
lothiraldan added a comment.
In https://phab.mercurial-scm.org/D4820#77055, @yuja wrote:
> > - a/hgext/logtoprocess.py +++ b/hgext/logtoprocess.py @@ -40,6 +40,9 @@
import sys
> >
> > from mercurial import ( +dispatch, +encoding, +extensions,
>
> Unused.
>
> > @
lothiraldan updated this revision to Diff 12296.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4820?vs=12161&id=12296
REVISION DETAIL
https://phab.mercurial-scm.org/D4820
AFFECTED FILES
hgext/logtoprocess.py
mercurial/dispatch.py
tests/test-logto
yuja added a comment.
> - a/hgext/logtoprocess.py +++ b/hgext/logtoprocess.py @@ -40,6 +40,9 @@
import sys
>
> from mercurial import ( +dispatch, +encoding, +extensions,
Unused.
> @@ -110,6 +113,12 @@
>
> script = self.config('logtoprocess', event)
> if
> --- a/hgext/logtoprocess.py
> +++ b/hgext/logtoprocess.py
> @@ -40,6 +40,9 @@
> import sys
>
> from mercurial import (
> +dispatch,
> +encoding,
> +extensions,
Unused.
> @@ -110,6 +113,12 @@
> script = self.config('logtoprocess', event)
> if script:
>
lothiraldan updated this revision to Diff 12161.
lothiraldan edited the summary of this revision.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4820?vs=11521&id=12161
REVISION DETAIL
https://phab.mercurial-scm.org/D4820
AFFECTED FILES
hgext/logtoproc
yuja added a comment.
> I tried to pass it to the `ui.log()` but didn't find a clean way to
transfer it from `dispatch._dispatch` to `dispatch.dispatch`. I tried storing
it in the ui object but without luck.
>
> Do you think it would be ok to store it in the `request` object?
> I tried to pass it to the `ui.log()` but didn't find a clean way to
> transfer it from `dispatch._dispatch` to `dispatch.dispatch`. I tried storing
> it in the ui object but without luck.
>
> Do you think it would be ok to store it in the `request` object?
If that helps, yes. I think us
lothiraldan added a comment.
In https://phab.mercurial-scm.org/D4820#73256, @yuja wrote:
> > +def extsetup():
> > +# this is to get the canonical name of the command: "commit", not
"ci"
> > +def wrapdispatch(orig, *args, **kwargs):
> > +encoding.environ.pop("LTP_C
yuja added a comment.
> +def extsetup():
> +# this is to get the canonical name of the command: "commit", not "ci"
> +def wrapdispatch(orig, *args, **kwargs):
> +encoding.environ.pop("LTP_COMMAND", None)
> +return orig(*args, **kwargs)
> +
> +def wr
> +def extsetup():
> +# this is to get the canonical name of the command: "commit", not "ci"
> +def wrapdispatch(orig, *args, **kwargs):
> +encoding.environ.pop("LTP_COMMAND", None)
> +return orig(*args, **kwargs)
> +
> +def wrapruncommand(orig, *args, **kwargs):
> +
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
One of the use-case of logtoprocess is to monitor command duration. With the
current code, we only get whatever command name the user typed (either
abbreviat
17 matches
Mail list logo