comparison contrib/dumprevlog @ 43025:3518da504303

vfs: give all vfs an options attribute by default Multiple code path assume vfs have an options attribute, including the vfs module itself. So for consistency we explicitly add one to all vfs. This will prevent various crash in the next changesets. Differential Revision: https://phab.mercurial-scm.org/D6935
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 27 Sep 2019 05:17:30 +0200
parents a063b84ce064
children 99e231afc29c
comparison
equal deleted inserted replaced
43024:188476e48f51 43025:3518da504303
20 20
21 def binopen(path, mode=b'rb'): 21 def binopen(path, mode=b'rb'):
22 if b'b' not in mode: 22 if b'b' not in mode:
23 mode = mode + b'b' 23 mode = mode + b'b'
24 return open(path, pycompat.sysstr(mode)) 24 return open(path, pycompat.sysstr(mode))
25 binopen.options = {}
25 26
26 def printb(data, end=b'\n'): 27 def printb(data, end=b'\n'):
27 sys.stdout.flush() 28 sys.stdout.flush()
28 pycompat.stdout.write(data + end) 29 pycompat.stdout.write(data + end)
29 30