comparison mercurial/debugcommands.py @ 37396:9966f44ecab4

debugwhyunstable: add support for revsets Differential Revision: https://phab.mercurial-scm.org/D3166
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 06 Apr 2018 11:26:50 -0700
parents e32dfff71529
children 61e405fb6372
comparison
equal deleted inserted replaced
37395:810413b745ff 37396:9966f44ecab4
2545 ui.write("%s\n" % line.rstrip()) 2545 ui.write("%s\n" % line.rstrip())
2546 2546
2547 @command('debugwhyunstable', [], _('REV')) 2547 @command('debugwhyunstable', [], _('REV'))
2548 def debugwhyunstable(ui, repo, rev): 2548 def debugwhyunstable(ui, repo, rev):
2549 """explain instabilities of a changeset""" 2549 """explain instabilities of a changeset"""
2550 for entry in obsutil.whyunstable(repo, repo[rev]): 2550 for entry in obsutil.whyunstable(repo, scmutil.revsingle(repo, rev)):
2551 dnodes = '' 2551 dnodes = ''
2552 if entry.get('divergentnodes'): 2552 if entry.get('divergentnodes'):
2553 dnodes = ' '.join('%s (%s)' % (ctx.hex(), ctx.phasestr()) 2553 dnodes = ' '.join('%s (%s)' % (ctx.hex(), ctx.phasestr())
2554 for ctx in entry['divergentnodes']) + ' ' 2554 for ctx in entry['divergentnodes']) + ' '
2555 ui.write('%s: %s%s %s\n' % (entry['instability'], dnodes, 2555 ui.write('%s: %s%s %s\n' % (entry['instability'], dnodes,