mjpieters added inline comments.

INLINE COMMENTS

> extensions.py:408-412
> +        origfn = getattr(container, funcname)
> +        assert callable(origfn)
> +        wrap = bind(wrapper, origfn)
> +        _updatewrapper(wrap, origfn, wrapper)
> +        setattr(container, funcname, wrap)

Move this to `__enter__`. You want to be able to create the context manager 
separately from actually entering the context:

  cmwrapper = wrapfunction(cont, 'name', wrapper)
  
  # do other things, `cont.name` is *not* wrapped
  
  with cmwrapper:
      # `cont.name` is wrapped

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D472

To: martinvonz, #hg-reviewers, quark
Cc: quark, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to