Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 33730:52c5ff856b49
context: rename troubled into isunstable
As we changed the meaning of unstable between the old vocabulary and the new
one, we can't reuse the unstable method name at the risk of breaking
extensions calling unstable and getting a wrong result.
Instead rename troubled into isunstable so extensions will continue to work.
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.
Differential Revision: https://phab.mercurial-scm.org/D242
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 02 Aug 2017 19:13:56 +0200 |
parents | ab0c55c2ad9a |
children | 2cb442bc1a76 |
comparison
equal
deleted
inserted
replaced
33729:8413cbeae275 | 33730:52c5ff856b49 |
---|---|
1462 | 1462 |
1463 def _changesetlabels(ctx): | 1463 def _changesetlabels(ctx): |
1464 labels = ['log.changeset', 'changeset.%s' % ctx.phasestr()] | 1464 labels = ['log.changeset', 'changeset.%s' % ctx.phasestr()] |
1465 if ctx.obsolete(): | 1465 if ctx.obsolete(): |
1466 labels.append('changeset.obsolete') | 1466 labels.append('changeset.obsolete') |
1467 if ctx.troubled(): | 1467 if ctx.isunstable(): |
1468 labels.append('changeset.troubled') | 1468 labels.append('changeset.troubled') |
1469 for instability in ctx.instabilities(): | 1469 for instability in ctx.instabilities(): |
1470 labels.append('trouble.%s' % instability) | 1470 labels.append('trouble.%s' % instability) |
1471 return ' '.join(labels) | 1471 return ' '.join(labels) |
1472 | 1472 |
1575 label='log.user') | 1575 label='log.user') |
1576 # i18n: column positioning for "hg log" | 1576 # i18n: column positioning for "hg log" |
1577 self.ui.write(_("date: %s\n") % date, | 1577 self.ui.write(_("date: %s\n") % date, |
1578 label='log.date') | 1578 label='log.date') |
1579 | 1579 |
1580 if ctx.troubled(): | 1580 if ctx.isunstable(): |
1581 # i18n: column positioning for "hg log" | 1581 # i18n: column positioning for "hg log" |
1582 instabilities = ctx.instabilities() | 1582 instabilities = ctx.instabilities() |
1583 self.ui.write(_("instability: %s\n") % ', '.join(instabilities), | 1583 self.ui.write(_("instability: %s\n") % ', '.join(instabilities), |
1584 label='log.trouble') | 1584 label='log.trouble') |
1585 | 1585 |