D6151: branchmap: remove the dict interface from the branchcache class (API)
Yuya Nishihara
yuya at tcha.org
Sat Mar 23 21:08:23 EDT 2019
> def copy(self):
> """return an deep copy of the branchcache object"""
> - return type(self)(
> - self, self.tipnode, self.tiprev, self.filteredhash,
> + return branchcache(
> + self.entries, self.tipnode, self.tiprev, self.filteredhash,
> self._closednodes)
In order to support subclassing, a `branchcache` type has to be resolved
dynamically. IIRC, that's the point of `type(self)` use here.
More information about the Mercurial-devel
mailing list