This revision was automatically updated to reflect the committed changes. Closed by commit rHGbe6aa0cff8ea: util: add util.clearcachedproperty (authored by mbthomas, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1337?vs=3337&id=3411 REVISION DETAIL https://phab.mercurial-scm.org/D1337 AFFECTED FILES mercurial/util.py CHANGE DETAILS diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -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, To: mbthomas, #hg-reviewers, indygreg, durin42 Cc: indygreg, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel