comparison tests/test-inhibit.t @ 1714:4565b046b850

directaccess: make sure gethashsymbols does not return rev numbers With "hg log -r 1 -r 2 -r 3", gethashsymbols will get the following tree: ('func', ('symbol', '_list'), ('string', '1\x002\x003')) Before this patch, it will return ['1', '2', '3'], which are revision numbers and causes unnecessary (expensive) partialmatch lookups. This patch refacts gethashsymbols a bit, making sure the returning values are always filtered.
author Jun Wu <quark@fb.com>
date Wed, 22 Jun 2016 18:22:17 +0100
parents 27445da063b7
children 83cf722eafc3 9f42f819267b
comparison
equal deleted inserted replaced
1713:00612a019547 1714:4565b046b850
372 372
373 $ hg log -r '. + .^ + 2db36d8066ff' -T '{node|short}\n' 373 $ hg log -r '. + .^ + 2db36d8066ff' -T '{node|short}\n'
374 55c73a90e4b4 374 55c73a90e4b4
375 cf5c4f4554ce 375 cf5c4f4554ce
376 2db36d8066ff 376 2db36d8066ff
377
378 Test directaccess only takes hashes
379
380 $ HOOKPATH=$TESTTMP/printexplicitaccess.py
381 $ cat >> $HOOKPATH <<EOF
382 > def hook(ui, repo, **kwds):
383 > for i in sorted(repo._explicitaccess):
384 > ui.write('directaccess: %s\n' % i)
385 > EOF
386
387 $ hg log -r 1 -r 2 -r 2db36d8066f -T '{rev}\n' --config hooks.post-log=python:$HOOKPATH:hook
388 1
389 2
390 3
391 directaccess: 3
377 392
378 With severals hidden sha, rebase of one hidden stack onto another one: 393 With severals hidden sha, rebase of one hidden stack onto another one:
379 $ hg update -C 0 394 $ hg update -C 0
380 0 files updated, 0 files merged, 4 files removed, 0 files unresolved 395 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
381 $ mkcommit cK 396 $ mkcommit cK