diff -r b9bbcf9ffac1 -r efc4fb344c05 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Tue Mar 13 20:34:38 2018 +0800 +++ b/mercurial/debugcommands.py Mon Feb 26 20:44:01 2018 +0800 @@ -2529,6 +2529,17 @@ line = fmt % (abs, f(m.rel(abs)), m.exact(abs) and 'exact' or '') ui.write("%s\n" % line.rstrip()) +@command('debugwhyunstable', [], _('REV')) +def debugwhyunstable(ui, repo, rev): + """explain instabilities of a changeset""" + for entry in obsutil.whyunstable(repo, repo[rev]): + dnodes = '' + if entry.get('divergentnodes'): + dnodes = ' '.join('%s (%s)' % (ctx.hex(), ctx.phasestr()) + for ctx in entry['divergentnodes']) + ' ' + ui.write('%s: %s%s %s\n' % (entry['instability'], dnodes, + entry['reason'], entry['node'])) + @command('debugwireargs', [('', 'three', '', 'three'), ('', 'four', '', 'four'),