Fix type of 'p' argument in SVN patching implementation.

Review Request #14217 — Created Oct. 29, 2024 and submitted

Information

RBTools
release-5.x

Reviewers

The SVN implementation for apply_patch was trying to do an integer
comparison on the --px value, which was typed as a string. This change
fixes it so when a p-number is user supplied, we convert it to an int as
necessary.

Ran unit tests (including fixed unit test for the p argument).

Summary ID
Fix type of 'p' argument in SVN patching implementation.
The SVN implementation for `apply_patch` was trying to do an integer comparison on the `--px` value, which was typed as a string. This change fixes it so when a p-number is user supplied, we convert it to an int as necessary. Testing Done: Ran unit tests (including fixed unit test for the `p` argument).
f1a316a0fab1ce4c0c89aefa9c6d3bb827388169
Description From Last Updated

Let's wrap this in a try/except and gracefully handle any non-int p.

chipx86chipx86

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

reviewbotreviewbot
chipx86
  1. 
      
  2. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues

    Let's wrap this in a try/except and gracefully handle any non-int p.

  3. 
      
david
Review request changed
Change Summary:

Handle ValueError on converting p value

Commits:
Summary ID
Fix type of 'p' argument in SVN patching implementation.
The SVN implementation for `apply_patch` was trying to do an integer comparison on the `--px` value, which was typed as a string. This change fixes it so when a p-number is user supplied, we convert it to an int as necessary. Testing Done: Ran unit tests (including fixed unit test for the `p` argument).
0a1b7fd325e0997b2d8b408b7baa01c88c6d831c
Fix type of 'p' argument in SVN patching implementation.
The SVN implementation for `apply_patch` was trying to do an integer comparison on the `--px` value, which was typed as a string. This change fixes it so when a p-number is user supplied, we convert it to an int as necessary. Testing Done: Ran unit tests (including fixed unit test for the `p` argument).
f1a316a0fab1ce4c0c89aefa9c6d3bb827388169

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (c73c942)