diff -r 36507048da0f -r be6aa0cff8ea mercurial/util.py --- a/mercurial/util.py Fri Nov 10 17:12:04 2017 -0500 +++ b/mercurial/util.py Wed Nov 08 09:18:18 2017 -0800 @@ -931,6 +931,11 @@ # __dict__ assignment required to bypass __setattr__ (eg: repoview) obj.__dict__[self.name] = value +def clearcachedproperty(obj, prop): + '''clear a cached property value, if one has been set''' + if prop in obj.__dict__: + del obj.__dict__[prop] + def pipefilter(s, cmd): '''filter string S through command CMD, returning its output''' p = subprocess.Popen(cmd, shell=True, close_fds=closefds,