Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG3d35e7483602: manifest: remove pycompat.iteritems()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/manifest.py (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
9ac69401fc46 | 6259364a98e2 | Gregory Szorc | Feb 21 2022, 1:11 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | D12339 ui: use input() directly | |
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
self._dirty = True # Mark flat manifest dirty after parsing | self._dirty = True # Mark flat manifest dirty after parsing | ||||
def _subpath(self, path): | def _subpath(self, path): | ||||
return self._dir + path | return self._dir + path | ||||
def _loadalllazy(self): | def _loadalllazy(self): | ||||
selfdirs = self._dirs | selfdirs = self._dirs | ||||
subpath = self._subpath | subpath = self._subpath | ||||
for d, (node, readsubtree, docopy) in pycompat.iteritems( | for d, (node, readsubtree, docopy) in self._lazydirs.items(): | ||||
self._lazydirs | |||||
): | |||||
if docopy: | if docopy: | ||||
selfdirs[d] = readsubtree(subpath(d), node).copy() | selfdirs[d] = readsubtree(subpath(d), node).copy() | ||||
else: | else: | ||||
selfdirs[d] = readsubtree(subpath(d), node) | selfdirs[d] = readsubtree(subpath(d), node) | ||||
self._lazydirs = {} | self._lazydirs = {} | ||||
def _loadlazy(self, d): | def _loadlazy(self, d): | ||||
v = self._lazydirs.get(d) | v = self._lazydirs.get(d) | ||||
d = mdiff.patchtext(store.revdiff(store.deltaparent(r), r)) | d = mdiff.patchtext(store.revdiff(store.deltaparent(r), r)) | ||||
return manifestdict(store.nodeconstants.nodelen, d) | return manifestdict(store.nodeconstants.nodelen, d) | ||||
else: | else: | ||||
# Need to perform a slow delta | # Need to perform a slow delta | ||||
r0 = store.deltaparent(store.rev(self._node)) | r0 = store.deltaparent(store.rev(self._node)) | ||||
m0 = self._manifestlog.get(self._dir, store.node(r0)).read() | m0 = self._manifestlog.get(self._dir, store.node(r0)).read() | ||||
m1 = self.read() | m1 = self.read() | ||||
md = treemanifest(self._manifestlog.nodeconstants, dir=self._dir) | md = treemanifest(self._manifestlog.nodeconstants, dir=self._dir) | ||||
for f, ((n0, fl0), (n1, fl1)) in pycompat.iteritems(m0.diff(m1)): | for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).items(): | ||||
if n1: | if n1: | ||||
md[f] = n1 | md[f] = n1 | ||||
if fl1: | if fl1: | ||||
md.setflag(f, fl1) | md.setflag(f, fl1) | ||||
return md | return md | ||||
def readfast(self, shallow=False): | def readfast(self, shallow=False): | ||||
"""Calls either readdelta or read, based on which would be less work. | """Calls either readdelta or read, based on which would be less work. |