From patchwork Sat Oct 28 08:09:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1252: dirstate: move clear onto dirstatemap class From: phabricator X-Patchwork-Id: 25297 Message-Id: <979d453abf845816232c0c5bc919b3ff@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sat, 28 Oct 2017 08:09:01 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG0217f75b6e59: dirstate: move clear onto dirstatemap class (authored by durham, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1252?vs=3128&id=3145 REVISION DETAIL https://phab.mercurial-scm.org/D1252 AFFECTED FILES mercurial/dirstate.py CHANGE DETAILS To: durham, #hg-reviewers, yuja Cc: mercurial-devel diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -593,8 +593,7 @@ return path def clear(self): - self._map = dirstatemap(self._ui, self._opener, self._root) - self._map.setparents(nullid, nullid) + self._map.clear() self._lastnormaltime = 0 self._updatedfiles.clear() self._dirty = True @@ -1210,6 +1209,11 @@ # for consistent view between _pl() and _read() invocations self._pendingmode = None + def clear(self): + self._map = {} + self.copymap = {} + self.setparents(nullid, nullid) + def iteritems(self): return self._map.iteritems()