# HG changeset patch # User Siddharth Agarwal # Date 2017-06-04 23:08:50 # Node ID e696f597d02f971eeed1217096b8f200ddb903d2 # Parent d677bd21ee98cc41b2f1a0d12e40c35d9df90b5a dirstate: add docstring for invalidate This always confuses me, and we already have a docstring on localrepo.invalidatedirstate. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -470,6 +470,12 @@ class dirstate(object): self._pl = p def invalidate(self): + '''Causes the next access to reread the dirstate. + + This is different from localrepo.invalidatedirstate() because it always + rereads the dirstate. Use localrepo.invalidatedirstate() if you want to + check whether the dirstate has changed before rereading it.''' + for a in ("_map", "_copymap", "_filefoldmap", "_dirfoldmap", "_branch", "_pl", "_dirs", "_ignore", "_nonnormalset", "_otherparentset"):