This is an archive of the discontinued Mercurial Phabricator instance.

context: rename troubles into instabilities
ClosedPublic

Authored by lothiraldan on Aug 7 2017, 6:07 AM.

Details

Summary

Rename troubles context method into instabilities.

Copy the old troubles method and add a deprecation warning. This way
extensions calling troubles will see the deprecation warning but will not
break due to new return values.

The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lothiraldan created this revision.Aug 7 2017, 6:07 AM
indygreg requested changes to this revision.Aug 8 2017, 12:36 AM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/context.py
246–248

This feels like it should be a set not a list.

Should this be changed as part of changing the API?

mercurial/exchange.py
684–686

Why does this only print 1 instability?

This revision now requires changes to proceed.Aug 8 2017, 12:36 AM
lothiraldan added inline comments.Aug 8 2017, 6:35 AM
mercurial/context.py
246–248

Semantically I agree, but the list has the nice property of being sorted.

If we change it to a set, I think we would be forced to sort it in order to have stable test outputs.

mercurial/exchange.py
684–686

I think it was easier to display a message when considering a single trouble. We could do better, but I'm not sure how displaying all troubles would interact with translation.

durin42 added inline comments.
mercurial/exchange.py
684–686

Let's add a TODO about this?

lothiraldan edited edge metadata.Aug 9 2017, 2:07 AM
lothiraldan updated this revision to Diff 664.
lothiraldan marked 3 inline comments as done.Aug 9 2017, 4:43 AM
This revision was automatically updated to reflect the committed changes.