Mercurial > public > mercurial-scm > hg
diff mercurial/manifest.py @ 39315:57c3864f3aad
manifest: make tree a public attribute
changegroup generation accesses this attribute. We should make it
public and expose it on the interface.
Differential Revision: https://phab.mercurial-scm.org/D4387
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 15 Aug 2018 16:50:44 +0000 |
parents | 7f5e6d3e9032 |
children | 53363a8eff57 |
line wrap: on
line diff
--- a/mercurial/manifest.py Mon Aug 27 10:15:15 2018 -0700 +++ b/mercurial/manifest.py Wed Aug 15 16:50:44 2018 +0000 @@ -1285,7 +1285,8 @@ if tree: indexfile = "meta/" + tree + indexfile - self._tree = tree + self.tree = tree + # The dirlogcache is kept on the root manifest log if tree: self._dirlogcache = dirlogcache @@ -1330,7 +1331,7 @@ def clearcaches(self, clear_persisted_data=False): self._revlog.clearcaches() self._fulltextcache.clear(clear_persisted_data=clear_persisted_data) - self._dirlogcache = {self._tree: self} + self._dirlogcache = {self.tree: self} def dirlog(self, d): if d: @@ -1366,8 +1367,8 @@ # process. if self._treeondisk: assert readtree, "readtree must be set for treemanifest writes" - m1 = readtree(self._tree, p1) - m2 = readtree(self._tree, p2) + m1 = readtree(self.tree, p1) + m2 = readtree(self.tree, p2) n = self._addtree(m, transaction, link, m1, m2, readtree) arraytext = None else: @@ -1383,7 +1384,7 @@ def _addtree(self, m, transaction, link, m1, m2, readtree): # If the manifest is unchanged compared to one parent, # don't write a new revision - if self._tree != '' and (m.unmodifiedsince(m1) or m.unmodifiedsince( + if self.tree != '' and (m.unmodifiedsince(m1) or m.unmodifiedsince( m2)): return m.node() def writesubtree(subm, subp1, subp2): @@ -1393,7 +1394,7 @@ m.writesubtrees(m1, m2, writesubtree) text = m.dirtext() n = None - if self._tree != '': + if self.tree != '': # Double-check whether contents are unchanged to one parent if text == m1.dirtext(): n = m1.node()