Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 45429:4111954cf86d
localrepo: use functools.wraps() in unfilteredmethod decorator
This makes it easier to figure out what function you're holding on to
when doing printf-style debugging.
Differential Revision: https://phab.mercurial-scm.org/D8994
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 07 Sep 2020 16:25:16 -0400 |
parents | 034d94f8761b |
children | 324ad3e7ef41 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Sep 07 16:13:10 2020 -0400 +++ b/mercurial/localrepo.py Mon Sep 07 16:25:16 2020 -0400 @@ -8,6 +8,7 @@ from __future__ import absolute_import import errno +import functools import os import random import sys @@ -193,6 +194,7 @@ def unfilteredmethod(orig): """decorate method that always need to be run on unfiltered version""" + @functools.wraps(orig) def wrapper(repo, *args, **kwargs): return orig(repo.unfiltered(), *args, **kwargs)