We're going to expose this information in the UI in an upcoming patch.
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG2f5a135b2b04: annotate: track whether a particular annotation was the result of a skip
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Before I stamp this I'd like an answer to the mutability concerns.
mercurial/context.py | ||
---|---|---|
1164–1165 | 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? | |
1176 | Ditto. |
mercurial/context.py | ||
---|---|---|
1164–1165 | Good question! Not in this case, because a particular annotation can never go from skip=True to skip=False. If we decide to overwrite the annotation afterwards, the whole object is replaced, not just fctx and lineno. |
mercurial/context.py | ||
---|---|---|
1164–1165 | Actually -- hmm, you're right, this is a bit risky to code changes in the future -- especially if the same object gets shared between skipped and not-skipped lines. I'll create a new one to be safe. |
Turns out it actually was buggy. Thanks for catching it!
I switched to using attrs.evolve (and in the earlier diff setting frozen=True to make the attr immutable)
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?