Fix posting jujutsu changes that include deleted files.

Review Request #14563 — Created Aug. 19, 2025 and submitted

Information

RBTools
master

Reviewers

The jujutsu backend for rbtools gets the git diff and then processes it
in order to turn short blob hashes into full hashes. This was broken for
deleted files in two ways:

  • The regex that parsed index lines didn't catch deleted lines, because
    they didn't have any mode information.
  • Trying to turn '00000000' into a full hash would fail because that
    hash doesn't actually exist in the repo.

This change fixes those two issues and adds a test to verify it.

This also fixes a test for an updated message in jj.

  • Ran unit tests.
  • Posted a change that included a deleted file.
Summary ID
Fix posting jujutsu changes that include deleted files.
The jujutsu backend for rbtools gets the git diff and then processes it in order to turn short blob hashes into full hashes. This was broken for deleted files in two ways: - The regex that parsed index lines didn't catch deleted lines, because they didn't have any mode information. - Trying to turn '00000000' into a full hash would fail because that hash doesn't actually exist in the repo. This change fixes those two issues and adds a test to verify it. Testing Done: - Ran unit tests. - Posted a change that included a deleted file.
pupqoxklzltwskylnzulvspvtpyzprlk
Description From Last Updated

Actually, before you commit, can you update the description to use the formal names: "rbtools" -> "RBTools" "git" -> "Git" …

chipx86chipx86
chipx86
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    Actually, before you commit, can you update the description to use the formal names:

    "rbtools" -> "RBTools"
    "git" -> "Git"
    "jujutsu" -> "Jujutsu"

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (69be61f)