Show More
@@ -1,23 +1,25 b'' | |||
|
1 | 1 | # node.py - basic nodeid manipulation for mercurial |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | from __future__ import absolute_import | |
|
9 | ||
|
8 | 10 | import binascii |
|
9 | 11 | |
|
10 | 12 | nullrev = -1 |
|
11 | 13 | nullid = "\0" * 20 |
|
12 | 14 | |
|
13 | 15 | # pseudo identifiers for working directory |
|
14 | 16 | # (they are experimental, so don't add too many dependencies on them) |
|
15 | 17 | wdirrev = 0x7fffffff |
|
16 | 18 | wdirid = "\xff" * 20 |
|
17 | 19 | |
|
18 | 20 | # This ugly style has a noticeable effect in manifest parsing |
|
19 | 21 | hex = binascii.hexlify |
|
20 | 22 | bin = binascii.unhexlify |
|
21 | 23 | |
|
22 | 24 | def short(node): |
|
23 | 25 | return hex(node[:6]) |
General Comments 0
You need to be logged in to leave comments.
Login now