Show More
@@ -1040,11 +1040,11 b' def createdifferentialrevision(' | |||||
1040 | return revision, diff |
|
1040 | return revision, diff | |
1041 |
|
1041 | |||
1042 |
|
1042 | |||
1043 |
def userphids( |
|
1043 | def userphids(ui, names): | |
1044 | """convert user names to PHIDs""" |
|
1044 | """convert user names to PHIDs""" | |
1045 | names = [name.lower() for name in names] |
|
1045 | names = [name.lower() for name in names] | |
1046 | query = {b'constraints': {b'usernames': names}} |
|
1046 | query = {b'constraints': {b'usernames': names}} | |
1047 |
result = callconduit( |
|
1047 | result = callconduit(ui, b'user.search', query) | |
1048 | # username not found is not an error of the API. So check if we have missed |
|
1048 | # username not found is not an error of the API. So check if we have missed | |
1049 | # some names here. |
|
1049 | # some names here. | |
1050 | data = result[b'data'] |
|
1050 | data = result[b'data'] | |
@@ -1127,10 +1127,13 b' def phabsend(ui, repo, *revs, **opts):' | |||||
1127 | blockers = opts.get(b'blocker', []) |
|
1127 | blockers = opts.get(b'blocker', []) | |
1128 | phids = [] |
|
1128 | phids = [] | |
1129 | if reviewers: |
|
1129 | if reviewers: | |
1130 | phids.extend(userphids(repo, reviewers)) |
|
1130 | phids.extend(userphids(repo.ui, reviewers)) | |
1131 | if blockers: |
|
1131 | if blockers: | |
1132 | phids.extend( |
|
1132 | phids.extend( | |
1133 | map(lambda phid: b'blocking(%s)' % phid, userphids(repo, blockers)) |
|
1133 | map( | |
|
1134 | lambda phid: b'blocking(%s)' % phid, | |||
|
1135 | userphids(repo.ui, blockers), | |||
|
1136 | ) | |||
1134 | ) |
|
1137 | ) | |
1135 | if phids: |
|
1138 | if phids: | |
1136 | actions.append({b'type': b'reviewers.add', b'value': phids}) |
|
1139 | actions.append({b'type': b'reviewers.add', b'value': phids}) |
General Comments 0
You need to be logged in to leave comments.
Login now