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