[PATCH] drawdag: inline transaction() function

Yuya Nishihara yuya at tcha.org
Sun Jul 2 09:05:00 EDT 2017


On Fri, 30 Jun 2017 23:15:57 -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1498889709 25200
> #      Fri Jun 30 23:15:09 2017 -0700
> # Node ID 07d2ba135eae10b08603230039c02feb0b1e5039
> # Parent  6d678ab1b10d0fddc73003d21aa3c7ec43194e2e
> drawdag: inline transaction() function
> 
> I suspect Jun wrote the method before he learnt that Python 2.7 allows
> multiple context managers in a single with-clause.
> 
> diff --git a/tests/drawdag.py b/tests/drawdag.py
> --- a/tests/drawdag.py
> +++ b/tests/drawdag.py
> @@ -277,13 +277,6 @@
>                  if leaf in v:
>                      v.remove(leaf)
>  
> - at contextlib.contextmanager

Removed unused import of contextlib.


More information about the Mercurial-devel mailing list