comparison tests/test-command-template.t @ 32684:af854b1b36f8

revlog: add support for partial matching of wdir node id The idea is simple. If the given node id prefix is 'ff...f', add +1 to the number of matches (e.g. ambiguous if partial + maybewdir > 1). This patch also fixes id() revset and shortest() template since _partialmatch() can raise WdirUnsupported exception.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 19 Aug 2016 18:26:04 +0900
parents 2ab7578e685b
children dddba6f3e59c
comparison
equal deleted inserted replaced
32683:9f840d99054c 32684:af854b1b36f8
3501 f7769ec2ab 3501 f7769ec2ab
3502 $ hg log -r 0 -T '{shortest(node, "not an int")}\n' 3502 $ hg log -r 0 -T '{shortest(node, "not an int")}\n'
3503 hg: parse error: shortest() expects an integer minlength 3503 hg: parse error: shortest() expects an integer minlength
3504 [255] 3504 [255]
3505 3505
3506 $ hg log -r 'wdir()' -T '{node|shortest}\n'
3507 ffff
3508
3506 $ cd .. 3509 $ cd ..
3507 3510
3508 Test shortest(node) with the repo having short hash collision: 3511 Test shortest(node) with the repo having short hash collision:
3509 3512
3510 $ hg init hashcollision 3513 $ hg init hashcollision