Changeset 138a6894a0b2…
Parent 2730b8d336aa…
by
Changes to 2 files · Browse files at 138a6894a0b2 Showing diff from parent 2730b8d336aa Diff from another changeset...
@@ -120,3 +120,24 @@
return iter->dstate;
}
+
+
+void Dirstatecache::invalidate(const std::string& hgroot)
+{
+ typedef std::list<E>::iterator Iter;
+
+ if (hgroot.empty())
+ return;
+
+ for (Iter i = cache().begin(); i != cache().end(); ++i)
+ {
+ if (hgroot == i->hgroot)
+ {
+ delete i->dstate;
+ i->dstate = 0;
+ cache().erase(i);
+ TDEBUG_TRACE("Dirstatecache::invalidate(" << hgroot << ")");
+ break;
+ }
+ }
+}
|
@@ -41,6 +41,7 @@
public:
static Dirstate* get(const std::string& hgroot);
+ static void invalidate(const std::string& hgroot);
};
#endif
|
Loading...