Show More
@@ -190,9 +190,9 b' def fileidlookup(store, fileid, identifi' | |||||
190 |
|
190 | |||
191 | ``fileid`` can be: |
|
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 | * An integer revision number |
|
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 | * A bytes that can be parsed as an integer representing a revision number. |
|
196 | * A bytes that can be parsed as an integer representing a revision number. | |
197 |
|
197 | |||
198 | ``identifier`` is used to populate ``error.LookupError`` with an identifier |
|
198 | ``identifier`` is used to populate ``error.LookupError`` with an identifier | |
@@ -208,14 +208,14 b' def fileidlookup(store, fileid, identifi' | |||||
208 | b'%d' % fileid, identifier, _(b'no match found') |
|
208 | b'%d' % fileid, identifier, _(b'no match found') | |
209 | ) |
|
209 | ) | |
210 |
|
210 | |||
211 |
if len(fileid) |
|
211 | if len(fileid) == len(store.nullid): | |
212 | try: |
|
212 | try: | |
213 | store.rev(fileid) |
|
213 | store.rev(fileid) | |
214 | return fileid |
|
214 | return fileid | |
215 | except error.LookupError: |
|
215 | except error.LookupError: | |
216 | pass |
|
216 | pass | |
217 |
|
217 | |||
218 | if len(fileid) in (40, 64): |
|
218 | if len(fileid) == 2 * len(store.nullid): | |
219 | try: |
|
219 | try: | |
220 | rawnode = bin(fileid) |
|
220 | rawnode = bin(fileid) | |
221 | store.rev(rawnode) |
|
221 | store.rev(rawnode) |
General Comments 0
You need to be logged in to leave comments.
Login now