Fix a bug with author information for rbt land.
Review Request #14770 — Created Jan. 9, 2026 and submitted
Our
BaseSCMClient.mergeandBaseSCMClient.create_commitmethods
type theauthorargument asPatchAuthor. However, in our land
command, we actually pass aUserItemResourcewhich we get from
review_request.get_submitter(). This was made evident in a bug where
rbt landwould emit a warning about the author's profile being private
even though it wasn't. This happened because we try to access
author.full_name, which doesn't exist on the user resource.This change addresses that bug and improves our handling of the case
where author information isn't available. Now theauthorargument
for these methods can beNone, indicating that the author information
isn't available. All the SCM clients have been updated to handle this
accordingly.The Git and Mercurial clients actually already had a unit test for this
case, and one has been added for Jujutsu.This change also adds typing to the land command.
- Ran unit tests.
- Saw that the bug I was hitting with
rbt landwent away.
I don't have Jujutsu or Mercurial set up on my system so I
actually don't know if their unit tests for this pass. If possible
could someone apply this patch and confirm that the unit tests pass.
| Summary | ID |
|---|---|
| 28825c6e2f561e12fd395b6685ed9f92dbac7127 |
| Description | From | Last Updated |
|---|---|---|
|
Can you update this to be rbtools.diffs.patches.PatchAuthor? |
|
|
|
We don't need the parens around the type here. |
|
|
|
Shouldn't this be passing author=None? |
|
|
|
By default create_commit will call jj new at the end. I think instead of assertSpyLastCalledWith we should just use assertSpyCalledWith |
|
|
|
Same on this one. |
|
- Commits:
-
Summary ID 42cfa07f8e8156d6868caa390ebc7741c8c0ed84 ffc7cda82ab85bdee5b97d6f33a4b173cb102b5d