##// END OF EJS Templates
log: use "hidden" filtering instead of manual check at display time...
Pierre-Yves David -
r18243:b3b1b8e1 default
parent child Browse files
Show More
@@ -1406,6 +1406,8 b' def getgraphlogrevs(repo, pats, opts):'
1406 # depends on revisions resolved from --rev...
1406 # depends on revisions resolved from --rev...
1407 follow = opts.get('follow') or opts.get('follow_first')
1407 follow = opts.get('follow') or opts.get('follow_first')
1408 possiblyunsorted = False # whether revs might need sorting
1408 possiblyunsorted = False # whether revs might need sorting
1409 if not opts.get('hidden'):
1410 repo = repo.filtered('hidden')
1409 if opts.get('rev'):
1411 if opts.get('rev'):
1410 revs = scmutil.revrange(repo, opts['rev'])
1412 revs = scmutil.revrange(repo, opts['rev'])
1411 # Don't sort here because _makegraphlogrevset might depend on the
1413 # Don't sort here because _makegraphlogrevset might depend on the
@@ -1432,24 +1434,7 b' def getgraphlogrevs(repo, pats, opts):'
1432 # again to fix that.
1434 # again to fix that.
1433 revs = matcher(repo, revs)
1435 revs = matcher(repo, revs)
1434 revs.sort(reverse=True)
1436 revs.sort(reverse=True)
1435 if not opts.get('hidden'):
1437 if limit is not None:
1436 # --hidden is still experimental and not worth a dedicated revset
1437 # yet. Fortunately, filtering revision number is fast.
1438 hiddenrevs = repo.hiddenrevs
1439 nrevs = []
1440 taken = 0
1441 if limit is not None:
1442 for i in xrange(len(revs)):
1443 if taken >= limit:
1444 break
1445 r = revs[i]
1446 if r not in hiddenrevs:
1447 nrevs.append(r)
1448 taken += 1
1449 revs = nrevs
1450 else:
1451 revs = [r for r in revs if r not in hiddenrevs]
1452 elif limit is not None:
1453 revs = revs[:limit]
1438 revs = revs[:limit]
1454
1439
1455 return revs, expr, filematcher
1440 return revs, expr, filematcher
General Comments 0
You need to be logged in to leave comments. Login now