equal
deleted
inserted
replaced
|
1 # node.py - basic nodeid manipulation for mercurial |
|
2 # |
|
3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> |
|
4 # |
|
5 # This software may be used and distributed according to the terms of the |
|
6 # GNU General Public License version 2 or any later version. |
|
7 |
|
8 import binascii |
|
9 |
|
10 nullrev = -1 |
|
11 nullid = "\0" * 20 |
|
12 |
|
13 # This ugly style has a noticeable effect in manifest parsing |
|
14 hex = binascii.hexlify |
|
15 bin = binascii.unhexlify |
|
16 |
|
17 def short(node): |
|
18 return hex(node[:6]) |