##// END OF EJS Templates
storageutil: allow modern hash sizes for fileids...
Joerg Sonnenberger -
r45963:c4a4a495 default
parent child Browse files
Show More
@@ -180,9 +180,9 b' def fileidlookup(store, fileid, identifi'
180
180
181 ``fileid`` can be:
181 ``fileid`` can be:
182
182
183 * A 20 byte binary node.
183 * A 20 or 32 byte binary node.
184 * An integer revision number
184 * An integer revision number
185 * A 40 byte hex node.
185 * A 40 or 64 byte hex node.
186 * A bytes that can be parsed as an integer representing a revision number.
186 * A bytes that can be parsed as an integer representing a revision number.
187
187
188 ``identifier`` is used to populate ``error.LookupError`` with an identifier
188 ``identifier`` is used to populate ``error.LookupError`` with an identifier
@@ -198,14 +198,14 b' def fileidlookup(store, fileid, identifi'
198 b'%d' % fileid, identifier, _(b'no match found')
198 b'%d' % fileid, identifier, _(b'no match found')
199 )
199 )
200
200
201 if len(fileid) == 20:
201 if len(fileid) in (20, 32):
202 try:
202 try:
203 store.rev(fileid)
203 store.rev(fileid)
204 return fileid
204 return fileid
205 except error.LookupError:
205 except error.LookupError:
206 pass
206 pass
207
207
208 if len(fileid) == 40:
208 if len(fileid) in (40, 64):
209 try:
209 try:
210 rawnode = bin(fileid)
210 rawnode = bin(fileid)
211 store.rev(rawnode)
211 store.rev(rawnode)
General Comments 0
You need to be logged in to leave comments. Login now