Show More
@@ -450,12 +450,13 b' def createdifferentialrevision(ctx, revi' | |||
|
450 | 450 | |
|
451 | 451 | def userphids(repo, names): |
|
452 | 452 | """convert user names to PHIDs""" |
|
453 | names = [name.lower() for name in names] | |
|
453 | 454 | query = {b'constraints': {b'usernames': names}} |
|
454 | 455 | result = callconduit(repo, b'user.search', query) |
|
455 | 456 | # username not found is not an error of the API. So check if we have missed |
|
456 | 457 | # some names here. |
|
457 | 458 | data = result[r'data'] |
|
458 | resolved = set(entry[r'fields'][r'username'] for entry in data) | |
|
459 | resolved = set(entry[r'fields'][r'username'].lower() for entry in data) | |
|
459 | 460 | unresolved = set(names) - resolved |
|
460 | 461 | if unresolved: |
|
461 | 462 | raise error.Abort(_(b'unknown username: %s') |
General Comments 0
You need to be logged in to leave comments.
Login now