Mercurial > hg > mercurial-source
comparison mercurial/chgserver.py @ 43605:0cbe17335857
py3: use pycompat.maplist() in chgserver
test-chg.t almost passes on py3 after this patch.
Differential Revision: https://phab.mercurial-scm.org/D6771
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 28 Aug 2019 17:36:53 -0700 |
parents | 49998d5ba66a |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
43604:69506e1b3214 | 43605:0cbe17335857 |
---|---|
170 st = os.stat(path) | 170 st = os.stat(path) |
171 return (st[stat.ST_MTIME], st.st_size) | 171 return (st[stat.ST_MTIME], st.st_size) |
172 except OSError: | 172 except OSError: |
173 # could be ENOENT, EPERM etc. not fatal in any case | 173 # could be ENOENT, EPERM etc. not fatal in any case |
174 pass | 174 pass |
175 return _hashlist(map(trystat, paths))[:12] | 175 return _hashlist(pycompat.maplist(trystat, paths))[:12] |
176 | 176 |
177 class hashstate(object): | 177 class hashstate(object): |
178 """a structure storing confighash, mtimehash, paths used for mtimehash""" | 178 """a structure storing confighash, mtimehash, paths used for mtimehash""" |
179 def __init__(self, confighash, mtimehash, mtimepaths): | 179 def __init__(self, confighash, mtimehash, mtimepaths): |
180 self.confighash = confighash | 180 self.confighash = confighash |