# HG changeset patch # User Augie Fackler # Date 2020-09-07 20:25:16 # Node ID 98baadff2b1c51a8fd7a219eab800dbf8c8173cb # Parent 7e0919a9bdb76b8c529da38fe36835e6b46a63bf 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 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -8,6 +8,7 @@ from __future__ import absolute_import import errno +import functools import os import random import sys @@ -193,6 +194,7 @@ def hasunfilteredcache(repo, name): 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)