comparison tests/simplestorerepo.py @ 43733:8ca92bcb3083

tests: byteify a few more things in simplestorerepo.py Differential Revision: https://phab.mercurial-scm.org/D7471
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 21 Nov 2019 15:46:35 -0500
parents 2372284d9457
children 9d2b2df2c2ba
comparison
equal deleted inserted replaced
43732:882e633ac92c 43733:8ca92bcb3083
46 46
47 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for 47 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
48 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should 48 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
49 # be specifying the version(s) of Mercurial they are tested with, or 49 # be specifying the version(s) of Mercurial they are tested with, or
50 # leave the attribute unspecified. 50 # leave the attribute unspecified.
51 testedwith = 'ships-with-hg-core' 51 testedwith = b'ships-with-hg-core'
52 52
53 REQUIREMENT = 'testonly-simplestore' 53 REQUIREMENT = b'testonly-simplestore'
54 54
55 55
56 def validatenode(node): 56 def validatenode(node):
57 if isinstance(node, int): 57 if isinstance(node, int):
58 raise ValueError('expected node; got int') 58 raise ValueError('expected node; got int')
202 202
203 for rev, entry in self._indexbyrev.items(): 203 for rev, entry in self._indexbyrev.items():
204 if entry[b'node'] == node: 204 if entry[b'node'] == node:
205 return rev 205 return rev
206 206
207 raise error.ProgrammingError('this should not occur') 207 raise error.ProgrammingError(b'this should not occur')
208 208
209 def node(self, rev): 209 def node(self, rev):
210 validaterev(rev) 210 validaterev(rev)
211 211
212 return self._indexbyrev[rev][b'node'] 212 return self._indexbyrev[rev][b'node']