##// END OF EJS Templates
store: reuse direncoded path in _hybridencode...
store: reuse direncoded path in _hybridencode For a netbeans clone on Windows 7 x64: Before: $ hg perffncacheencode ! wall 3.516000 comb 3.525623 user 3.525623 sys 0.000000 (best of 3) After: $ hg perffncacheencode ! wall 3.443000 comb 3.447622 user 3.447622 sys 0.000000 (best of 3)

File last commit:

r10263:25e57239 stable
r17609:cbc180cf 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])