Morpheus / Mbed OS mbed-Client-Morpheus-hg

Dependencies:   mbed-os

Revision:
79:7be8ab60beec
Parent:
77:46124d75dae7
--- a/neo.py	Fri Apr 01 15:11:36 2016 +0000
+++ b/neo.py	Thu Mar 31 03:20:59 2016 -0500
@@ -145,7 +145,8 @@
         popen([hg_cmd, 'status'])
 
     def hash():
-        return pquery([hg_cmd, 'id', '-i']).strip().strip('+')
+        with open('.hg/dirstate') as f:
+            return ''.join('%02x'%ord(i) for i in f.read(6))
 
     def dirty():
         return pquery([hg_cmd, 'status', '-q'])