##// END OF EJS Templates
revset: try to handle hyphenated symbols if lookup callback is available...
revset: try to handle hyphenated symbols if lookup callback is available Formerly an expression like "2.4-rc::" was tokenized as 2.4|-|rc|::. This allows dashes in symbols iff the whole symbol-like string can be looked up. Otherwise, it's tokenized as a series of symbols and operators. No attempt is made to accept dashed symbols inside larger symbol-like string, for instance foo-bar or bar-baz inside foo-bar-baz.

File last commit:

r10263:25e57239 stable
r20780:403f1f73 default
Show More
node.py
18 lines | 449 B | text/x-python | PythonLexer
# node.py - basic nodeid manipulation for mercurial
#
# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import binascii
nullrev = -1
nullid = "\0" * 20
# This ugly style has a noticeable effect in manifest parsing
hex = binascii.hexlify
bin = binascii.unhexlify
def short(node):
return hex(node[:6])