Add Mercurial binary file patching.

Review Request #14718 — Created Nov. 29, 2025 and submitted

Information

RBTools
master

Reviewers

This change adds support to the MercurialPatcher for applying binary
files as part of changes. This is relatively straightforward for
Mercurial, where we just have to let hg know about adds, moves, and
deletes.

  • Ran unit tests.
  • Used rbt patch with a bunch of changes that did various file
    operations on binary files.
Summary ID
Add Mercurial binary file patching.
This change adds support to the `MercurialPatcher` for applying binary files as part of changes. This is relatively straightforward for Mercurial, where we just have to let hg know about adds, moves, and deletes. Testing Done: - Ran unit tests. - Used `rbt patch` with a bunch of changes that did various file operations on binary files.
omnrmqxwlqtokvlznzlnpxymzulxuvpw
Description From Last Updated

line too long (83 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

Can you make this one line.

maubinmaubin

Let's list OSError here too since we call super().handle_add_file

maubinmaubin

We can remove this one I think since we don't call super() here.

maubinmaubin
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
david
david
maubin
  1. 
      
  2. rbtools/clients/mercurial.py (Diff revision 4)
     
     
     
    Show all issues

    Can you make this one line.

  3. rbtools/clients/mercurial.py (Diff revision 4)
     
     
    Show all issues

    Let's list OSError here too since we call super().handle_add_file

  4. rbtools/clients/mercurial.py (Diff revision 4)
     
     
     
    Show all issues

    We can remove this one I think since we don't call super() here.

    1. The makedirs() call can fail.

  5. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (430e08d)