##// END OF EJS Templates
merge with stable
Matt Mackall -
r16761:07741a5d merge default
parent child Browse files
Show More
@@ -27,6 +27,8 b' class changectx(object):'
27 self._rev = changeid
27 self._rev = changeid
28 self._node = repo.changelog.node(changeid)
28 self._node = repo.changelog.node(changeid)
29 return
29 return
30 if isinstance(changeid, long):
31 changeid = str(changeid)
30 if changeid == '.':
32 if changeid == '.':
31 self._node = repo.dirstate.p1()
33 self._node = repo.dirstate.p1()
32 self._rev = repo.changelog.rev(self._node)
34 self._rev = repo.changelog.rev(self._node)
@@ -5,7 +5,6 b''
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 encoding
9 import ctypes, errno, os, struct, subprocess, random
8 import ctypes, errno, os, struct, subprocess, random
10
9
11 _kernel32 = ctypes.windll.kernel32
10 _kernel32 = ctypes.windll.kernel32
@@ -290,8 +289,8 b' def lookupreg(key, valname=None, scope=N'
290 if res != _ERROR_SUCCESS:
289 if res != _ERROR_SUCCESS:
291 continue
290 continue
292 if type.value == _REG_SZ:
291 if type.value == _REG_SZ:
293 # never let a Unicode string escape into the wild
292 # string is in ANSI code page, aka local encoding
294 return encoding.tolocal(buf.value.encode('UTF-8'))
293 return buf.value
295 elif type.value == _REG_DWORD:
294 elif type.value == _REG_DWORD:
296 fmt = '<L'
295 fmt = '<L'
297 s = ctypes.string_at(byref(buf), struct.calcsize(fmt))
296 s = ctypes.string_at(byref(buf), struct.calcsize(fmt))
General Comments 0
You need to be logged in to leave comments. Login now