Show More
@@ -1464,7 +1464,7 b' 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. |
|
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) | |
@@ -1577,7 +1577,7 b' class changeset_printer(object):' | |||||
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. |
|
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), |
@@ -4849,7 +4849,7 b' def summary(ui, repo, **opts):' | |||||
4849 | ui.write(_(' (no revision checked out)')) |
|
4849 | ui.write(_(' (no revision checked out)')) | |
4850 | if p.obsolete(): |
|
4850 | if p.obsolete(): | |
4851 | ui.write(_(' (obsolete)')) |
|
4851 | ui.write(_(' (obsolete)')) | |
4852 |
if p. |
|
4852 | if p.isunstable(): | |
4853 | instabilities = (ui.label(instability, 'trouble.%s' % instability) |
|
4853 | instabilities = (ui.label(instability, 'trouble.%s' % instability) | |
4854 | for instability in p.instabilities()) |
|
4854 | for instability in p.instabilities()) | |
4855 | ui.write(' (' |
|
4855 | ui.write(' (' |
@@ -240,6 +240,12 b' class basectx(object):' | |||||
240 | return self.rev() in obsmod.getrevs(self._repo, 'divergent') |
|
240 | return self.rev() in obsmod.getrevs(self._repo, 'divergent') | |
241 |
|
241 | |||
242 | def troubled(self): |
|
242 | def troubled(self): | |
|
243 | msg = ("'context.troubled' is deprecated, " | |||
|
244 | "use 'context.isunstable'") | |||
|
245 | self._repo.ui.deprecwarn(msg, '4.4') | |||
|
246 | return self.unstable() | |||
|
247 | ||||
|
248 | def isunstable(self): | |||
243 | """True if the changeset is either unstable, bumped or divergent""" |
|
249 | """True if the changeset is either unstable, bumped or divergent""" | |
244 | return self.orphan() or self.phasedivergent() or self.contentdivergent() |
|
250 | return self.orphan() or self.phasedivergent() or self.contentdivergent() | |
245 |
|
251 |
@@ -680,7 +680,7 b' def _pushcheckoutgoing(pushop):' | |||||
680 | ctx = unfi[node] |
|
680 | ctx = unfi[node] | |
681 | if ctx.obsolete(): |
|
681 | if ctx.obsolete(): | |
682 | raise error.Abort(mso % ctx) |
|
682 | raise error.Abort(mso % ctx) | |
683 |
elif ctx. |
|
683 | elif ctx.isunstable(): | |
684 | # TODO print more than one instability in the abort |
|
684 | # TODO print more than one instability in the abort | |
685 | # message |
|
685 | # message | |
686 | raise error.Abort(mst[ctx.instabilities()[0]] % ctx) |
|
686 | raise error.Abort(mst[ctx.instabilities()[0]] % ctx) |
General Comments 0
You need to be logged in to leave comments.
Login now