Patchwork hook: give exthooks tags for blocking time

login
register
mail settings
Submitter Simon Farnsworth
Date March 6, 2017, 11:09 a.m.
Message ID <9bdc781849eb9bba369c.1488798567@devvm022.lla2.facebook.com>
Download mbox | patch
Permalink /patch/18933/
State Accepted
Headers show

Comments

Simon Farnsworth - March 6, 2017, 11:09 a.m.
# HG changeset patch
# User Simon Farnsworth <simonfar@fb.com>
# Date 1488798555 28800
#      Mon Mar 06 03:09:15 2017 -0800
# Node ID 9bdc781849eb9bba369cf9698cb8a1f5aef2b966
# Parent  b4cd912d7704cd976e1bee3a3c927e0e578ec88f
hook: give exthooks tags for blocking time

The ui.system autogenerated tag isn't really useful - as they're named, let's
use the name the user gave us.
Augie Fackler - March 7, 2017, 5:27 p.m.
On Mon, Mar 06, 2017 at 03:09:27AM -0800, Simon Farnsworth wrote:
> # HG changeset patch
> # User Simon Farnsworth <simonfar@fb.com>
> # Date 1488798555 28800
> #      Mon Mar 06 03:09:15 2017 -0800
> # Node ID 9bdc781849eb9bba369cf9698cb8a1f5aef2b966
> # Parent  b4cd912d7704cd976e1bee3a3c927e0e578ec88f
> hook: give exthooks tags for blocking time

Queued, thanks.

>
> The ui.system autogenerated tag isn't really useful - as they're named, let's
> use the name the user gave us.
>
> diff --git a/mercurial/hook.py b/mercurial/hook.py
> --- a/mercurial/hook.py
> +++ b/mercurial/hook.py
> @@ -142,7 +142,7 @@
>          cwd = repo.root
>      else:
>          cwd = pycompat.getcwd()
> -    r = ui.system(cmd, environ=env, cwd=cwd)
> +    r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,))
>
>      duration = util.timer() - starttime
>      ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n',
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -142,7 +142,7 @@ 
         cwd = repo.root
     else:
         cwd = pycompat.getcwd()
-    r = ui.system(cmd, environ=env, cwd=cwd)
+    r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,))
 
     duration = util.timer() - starttime
     ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n',