Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG154e4f84b51c: treemanifest: use visitchildrenset when filtering a manifest to a matcher
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Queued, thanks.
+ def _loadchildrensetlazy(self, visit):
+ if not visit:
+ return None
+ if visit == 'all' or visit == 'this':
+ self._loadalllazy()
+ return None
+
+ todel = []
+ for k in visit:
+ kslash = k + '/'
+ ld = self._lazydirs.get(kslash)
+ if ld:
+ path, node, readsubtree = ld
+ self._dirs[kslash] = readsubtree(path, node)
+ todel.append(kslash)
+ for kslash in todel:
+ del self._lazydirs[kslash]
Any reason not to use self._loadlazy(kslash)?
Hmm, I feel like there was a previous version that iterated differently and meant I'd need a copy of the list to do this correctly.. in this version, no I don't think there's a reason to avoid it besides a potential minor speed difference; should I send a patch for that?
> Any reason not to use `self._loadlazy(kslash)`? Hmm, I feel like there was a previous version that iterated differently and meant I'd need a copy of the list to do this correctly.. in this version, no I don't think there's a reason to avoid it besides a potential minor speed difference; should I send a patch for that?
I don't have any preference, but please send a patch if that makes sense,
thanks.