[PATCH] dirstate: add docstring for invalidate
Siddharth Agarwal
sid0 at fb.com
Sun Jun 4 23:09:02 UTC 2017
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1496617730 25200
# Sun Jun 04 16:08:50 2017 -0700
# Node ID 45841cedb603b93803eec37bd7d01456a6b8e812
# Parent 5277d6faabb4f9593a5d33cdab6c4a6191ad856d
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"):
More information about the Mercurial-devel
mailing list