D6151: branchmap: remove the dict interface from the branchcache class (API)

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Mar 23 21:10:56 EDT 2019

yuja added a comment.

  >   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.

  rHG Mercurial


To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel

More information about the Mercurial-devel mailing list