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