Implement get_file_content APIs for git.

Review Request #13592 — Created March 1, 2024 and submitted

Information

RBTools
release-5.x

Reviewers

This change implements the necessary client APIs for uploading binary
files to diffs for the git client.

Posted a variety of changes including binary files against a git
repository.

Summary ID
Implement get_file_content APIs for git.
This change implements the necessary client APIs for uploading binary files to diffs for the git client. Testing Done: Posted a variety of changes including binary files against a git repository.
35ff7bc62c74d16c1fa2f9033710d3731bfbb623
Description From Last Updated

Can we sort these?

chipx86chipx86

This is fine, but just as a note, the format being used elsewhere for most of the run_process-based chains are: …

chipx86chipx86

local variable 'content' is assigned to but never used Column: 13 Error code: F841

reviewbotreviewbot

local variable 'size' is assigned to but never used Column: 13 Error code: F841

reviewbotreviewbot

This could use the chain pattern: return int( self._run_git(...) .stdout .read() )

chipx86chipx86
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. rbtools/clients/git.py (Diff revision 1)
     
     
     
     
     
     
     
    Show all issues

    Can we sort these?

  3. rbtools/clients/git.py (Diff revision 1)
     
     
     
    Show all issues

    This is fine, but just as a note, the format being used elsewhere for most of the run_process-based chains are:

    return (
        self._run_git(...)
        .stdout_bytes
        .read()
    )
    
  4. 
      
david
david
Review request changed
Change Summary:

Added some unit tests, fixed exception class.

Commits:
Summary ID
Implement get_file_content APIs for git.
This change implements the necessary client APIs for uploading binary files to diffs for the git client. Testing Done: Posted a variety of changes including binary files against a git repository.
fc3b60ee3221fc6270c99e3d14f15797034f7b2a
Implement get_file_content APIs for git.
This change implements the necessary client APIs for uploading binary files to diffs for the git client. Testing Done: Posted a variety of changes including binary files against a git repository.
50f75ad84375cafdeffcf3072beabcf8bec25cf8

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

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

    This could use the chain pattern:

    return int(
        self._run_git(...)
        .stdout
        .read()
    )
    
  3. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (a5a3fd5)