##// END OF EJS Templates
perf: make `perfphasesremote` use the new `index.has_node` api...
marmoute -
r43951:3350d7ae default
parent child Browse files
Show More
@@ -1421,13 +1421,15 b' def perfphasesremote(ui, repo, dest=None'
1421 else:
1421 else:
1422 ui.statusnoi18n(b'publishing: no\n')
1422 ui.statusnoi18n(b'publishing: no\n')
1423
1423
1424 nodemap = repo.changelog.nodemap
1424 has_node = getattr(repo.changelog.index, 'has_node', None)
1425 if has_node is None:
1426 has_node = repo.changelog.nodemap.__contains__
1425 nonpublishroots = 0
1427 nonpublishroots = 0
1426 for nhex, phase in remotephases.iteritems():
1428 for nhex, phase in remotephases.iteritems():
1427 if nhex == b'publishing': # ignore data related to publish option
1429 if nhex == b'publishing': # ignore data related to publish option
1428 continue
1430 continue
1429 node = bin(nhex)
1431 node = bin(nhex)
1430 if node in nodemap and int(phase):
1432 if has_node(node) and int(phase):
1431 nonpublishroots += 1
1433 nonpublishroots += 1
1432 ui.statusnoi18n(b'number of roots: %d\n' % len(remotephases))
1434 ui.statusnoi18n(b'number of roots: %d\n' % len(remotephases))
1433 ui.statusnoi18n(b'number of known non public roots: %d\n' % nonpublishroots)
1435 ui.statusnoi18n(b'number of known non public roots: %d\n' % nonpublishroots)
General Comments 0
You need to be logged in to leave comments. Login now