##// END OF EJS Templates
storageutil: match node length with repository
Joerg Sonnenberger -
r50862:5698c5ee default
parent child Browse files
Show More
@@ -190,9 +190,9 b' def fileidlookup(store, fileid, identifi'
190 190
191 191 ``fileid`` can be:
192 192
193 * A 20 or 32 byte binary node.
193 * A binary node of appropiate size (e.g. 20/32 Bytes).
194 194 * An integer revision number
195 * A 40 or 64 byte hex node.
195 * A hex node of appropiate size (e.g. 40/64 Bytes).
196 196 * A bytes that can be parsed as an integer representing a revision number.
197 197
198 198 ``identifier`` is used to populate ``error.LookupError`` with an identifier
@@ -208,14 +208,14 b' def fileidlookup(store, fileid, identifi'
208 208 b'%d' % fileid, identifier, _(b'no match found')
209 209 )
210 210
211 if len(fileid) in (20, 32):
211 if len(fileid) == len(store.nullid):
212 212 try:
213 213 store.rev(fileid)
214 214 return fileid
215 215 except error.LookupError:
216 216 pass
217 217
218 if len(fileid) in (40, 64):
218 if len(fileid) == 2 * len(store.nullid):
219 219 try:
220 220 rawnode = bin(fileid)
221 221 store.rev(rawnode)
General Comments 0
You need to be logged in to leave comments. Login now