D752: dirstate: create new dirstatemap class

durham (Durham Goode) phabricator at mercurial-scm.org
Tue Sep 26 06:40:22 EDT 2017


durham added inline comments.

INLINE COMMENTS

> indygreg wrote in dirstate.py:1345
> Do we want this inherit from `collections.MutableMapping`?
> 
> A good reason to say "no" is KISS, especially if we'll be having multiple backends.

For now I'd say no, until we've done at least one other backend implementation and have seen that MutableMapping is still appropriate.  In particular, we might not want to allow iteration without a matcher, to discourage O(working copy) operations.

> indygreg wrote in dirstate.py:1349-1350
> Given that `iteritems()` no longer exists in Python 3, should we change this to `items()` and standardize on the modern convention?

Do we do that anywhere else in the code base already?  My initial tendency is to just follow existing patterns, especially during a refactor, to minimize churn.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D752

To: durham, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list