##// END OF EJS Templates
pullreport: skip or rework some early return...
Boris Feld -
r39934:b5e12039 default
parent child Browse files
Show More
@@ -1620,35 +1620,36 b' def registersummarycallback(repo, otr, t'
1620 def reportnewcs(repo, tr):
1620 def reportnewcs(repo, tr):
1621 """Report the range of new revisions pulled/unbundled."""
1621 """Report the range of new revisions pulled/unbundled."""
1622 origrepolen = tr.changes.get('origrepolen', len(repo))
1622 origrepolen = tr.changes.get('origrepolen', len(repo))
1623 if origrepolen >= len(repo):
1623 unfi = repo.unfiltered()
1624 if origrepolen >= len(unfi):
1624 return
1625 return
1625
1626
1626 # Compute the bounds of new visible revisions' range.
1627 # Compute the bounds of new visible revisions' range.
1627 revs = smartset.spanset(repo, start=origrepolen)
1628 revs = smartset.spanset(repo, start=origrepolen)
1628 if not revs:
1629 if revs:
1629 return
1630 minrev, maxrev = repo[revs.min()], repo[revs.max()]
1630 minrev, maxrev = repo[revs.min()], repo[revs.max()]
1631
1631
1632 if minrev == maxrev:
1632 if minrev == maxrev:
1633 revrange = minrev
1633 revrange = minrev
1634 else:
1634 else:
1635 revrange = '%s:%s' % (minrev, maxrev)
1635 revrange = '%s:%s' % (minrev, maxrev)
1636 draft = len(repo.revs('%ld and draft()', revs))
1636 draft = len(repo.revs('%ld and draft()', revs))
1637 secret = len(repo.revs('%ld and secret()', revs))
1637 secret = len(repo.revs('%ld and secret()', revs))
1638 if not (draft or secret):
1638 if not (draft or secret):
1639 msg = _('new changesets %s\n') % revrange
1639 msg = _('new changesets %s\n') % revrange
1640 elif draft and secret:
1640 elif draft and secret:
1641 msg = _('new changesets %s (%d drafts, %d secrets)\n')
1641 msg = _('new changesets %s (%d drafts, %d secrets)\n')
1642 msg %= (revrange, draft, secret)
1642 msg %= (revrange, draft, secret)
1643 elif draft:
1643 elif draft:
1644 msg = _('new changesets %s (%d drafts)\n')
1644 msg = _('new changesets %s (%d drafts)\n')
1645 msg %= (revrange, draft)
1645 msg %= (revrange, draft)
1646 elif secret:
1646 elif secret:
1647 msg = _('new changesets %s (%d secrets)\n')
1647 msg = _('new changesets %s (%d secrets)\n')
1648 msg %= (revrange, secret)
1648 msg %= (revrange, secret)
1649 else:
1649 else:
1650 raise error.ProgrammingError('entered unreachable condition')
1650 errormsg = 'entered unreachable condition'
1651 repo.ui.status(msg)
1651 raise error.ProgrammingError(errormsg)
1652 repo.ui.status(msg)
1652
1653
1653 @reportsummary
1654 @reportsummary
1654 def reportphasechanges(repo, tr):
1655 def reportphasechanges(repo, tr):
General Comments 0
You need to be logged in to leave comments. Login now