##// END OF EJS Templates
fsmonitor: normalize hostname to bytes...
Gregory Szorc -
r43710:8a9e53b9 stable
parent child Browse files
Show More
@@ -14,6 +14,7 b' import struct'
14
14
15 from mercurial.i18n import _
15 from mercurial.i18n import _
16 from mercurial import (
16 from mercurial import (
17 encoding,
17 pathutil,
18 pathutil,
18 util,
19 util,
19 )
20 )
@@ -81,7 +82,7 b' class state(object):'
81 self.invalidate()
82 self.invalidate()
82 return None, None, None
83 return None, None, None
83 diskhostname = state[0]
84 diskhostname = state[0]
84 hostname = socket.gethostname()
85 hostname = encoding.strtolocal(socket.gethostname())
85 if diskhostname != hostname:
86 if diskhostname != hostname:
86 # file got moved to a different host
87 # file got moved to a different host
87 self._ui.log(
88 self._ui.log(
@@ -127,7 +128,7 b' class state(object):'
127
128
128 with file:
129 with file:
129 file.write(struct.pack(_versionformat, _version))
130 file.write(struct.pack(_versionformat, _version))
130 file.write(socket.gethostname() + b'\0')
131 file.write(encoding.strtolocal(socket.gethostname()) + b'\0')
131 file.write(clock + b'\0')
132 file.write(clock + b'\0')
132 file.write(ignorehash + b'\0')
133 file.write(ignorehash + b'\0')
133 if notefiles:
134 if notefiles:
General Comments 0
You need to be logged in to leave comments. Login now