D899: annotate: track whether a particular annotation was the result of a skip

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Oct 2 06:32:59 EDT 2017


indygreg added a comment.


  Before I stamp this I'd like an answer to the mutability concerns.

INLINE COMMENTS

> context.py:1164-1165
>                              ak = min(a1 + (bk - b1), a2 - 1)
>                              child[0][bk] = parent[0][ak]
> +                            child[0][bk].skip = True
>                  else:

I see that we're copying a ref to the object instead of making an object copy. When we had tuples, that was fine because tuples are immutable. But with attr, instances can be modified.

Will this pose any problems?

> context.py:1177
>                          child[0][bk] = parent[0][ak]
> +                        child[0][bk].skip = True
>      return child

Ditto.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list