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
--- 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)