Implement binary files support for Mercurial.

Review Request #13610 — Created March 4, 2024 and submitted

Information

RBTools
release-5.x

Reviewers

This change implements the get_file_content and get_file_size methods
for the Mercurial client backend.

Additionally, this changes the log methods to always use {node}
instead of {node|short}. We had a mix (individual commits were using
the full node SHA, while the cumulative diff was using the short form),
which was causing issues with file uploads--we'd upload a file for the
commit version with the full SHA revision, and then not find it because
the cumulative diff was using the short SHA.

  • Ran unit tests.
  • Uploaded a variety of revisions including binary files. Saw that
    everything worked correctly.
Summary ID
Implement binary files support for Mercurial.
This change implements the get_file_content and get_file_size methods for the Mercurial client backend. Additionally, this changes the log methods to always use `{node}` instead of `{node|short}`. We had a mix (individual commits were using the full node SHA, while the cumulative diff was using the short form), which was causing issues with file uploads--we'd upload a file for the commit version with the full SHA revision, and then not find it because the cumulative diff was using the short SHA. Testing Done: - Ran unit tests. - Uploaded a variety of revisions including binary files. Saw that everything worked correctly.
fbae529dfe7465670ffc226b658d0092d8828468
Description From Last Updated

Can we add unit tests for this?

chipx86chipx86

This comment probably doesn't make sense here.

chipx86chipx86

This can be one statement.

chipx86chipx86

This doesn't make sense here.

chipx86chipx86

This can be one statement.

chipx86chipx86

Swap these.

chipx86chipx86
chipx86
  1. 
      
  2. rbtools/clients/mercurial.py (Diff revision 1)
     
     
     

    This comment probably doesn't make sense here.

  3. rbtools/clients/mercurial.py (Diff revision 1)
     
     
     
     
     
     
     
     

    This can be one statement.

  4. rbtools/clients/mercurial.py (Diff revision 1)
     
     
     

    This doesn't make sense here.

  5. rbtools/clients/mercurial.py (Diff revision 1)
     
     
     
     
     
     
     
     

    This can be one statement.

    1. I think I'd prefer to keep it separate for now because otherwise the int() kind of gets visually lost.

  6. 
      
david
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Can we add unit tests for this?

  3. 
      
david
chipx86
  1. 
      
  2. rbtools/clients/tests/test_mercurial.py (Diff revision 3)
     
     
     

    Swap these.

  3. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-5.x (dea0af9)
Loading...