D5447: test: adding test of issue4700

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Wed Dec 19 07:09:50 EST 2018


yuja added a comment.


  > +  > def wrappedlookup(orig, repo, *args, **kwargs):
  >  +  >     ret = orig(repo, *args, **kwargs)
  >  +  >     repo.hook('lookup')
  >  +  >     return ret
  >  +  > for table in [wireprotov1server.commands, wireprotov2server.COMMANDS]:
  >  +  >   table['lookup'].func = functools.partial(wrappedlookup, table['lookup'].func)
  
  Nit: has to be `b'lookup'` to support Python 3. Can be fixed in flight.

REPOSITORY
  rHG Mercurial

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

To: valentin.gatienbaron, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list