equal
deleted
inserted
replaced
18 try: |
18 try: |
19 return binascii.unhexlify(s) |
19 return binascii.unhexlify(s) |
20 except binascii.Error as e: |
20 except binascii.Error as e: |
21 raise TypeError(e) |
21 raise TypeError(e) |
22 |
22 |
|
23 |
23 nullrev = -1 |
24 nullrev = -1 |
24 # In hex, this is '0000000000000000000000000000000000000000' |
25 # In hex, this is '0000000000000000000000000000000000000000' |
25 nullid = b"\0" * 20 |
26 nullid = b"\0" * 20 |
26 nullhex = hex(nullid) |
27 nullhex = hex(nullid) |
27 |
28 |
36 |
37 |
37 wdirfilenodeids = {newnodeid, addednodeid, modifiednodeid} |
38 wdirfilenodeids = {newnodeid, addednodeid, modifiednodeid} |
38 |
39 |
39 # pseudo identifiers for working directory |
40 # pseudo identifiers for working directory |
40 # (they are experimental, so don't add too many dependencies on them) |
41 # (they are experimental, so don't add too many dependencies on them) |
41 wdirrev = 0x7fffffff |
42 wdirrev = 0x7FFFFFFF |
42 # In hex, this is 'ffffffffffffffffffffffffffffffffffffffff' |
43 # In hex, this is 'ffffffffffffffffffffffffffffffffffffffff' |
43 wdirid = b"\xff" * 20 |
44 wdirid = b"\xff" * 20 |
44 wdirhex = hex(wdirid) |
45 wdirhex = hex(wdirid) |
45 |
46 |
|
47 |
46 def short(node): |
48 def short(node): |
47 return hex(node[:6]) |
49 return hex(node[:6]) |