Re: RBTools Ticket #4973: rbt patch - SVN - failing with "a bytes-like object is required, not 'str'"

2 views
Skip to first unread message

D J

unread,
Aug 8, 2022, 11:57:24 PM8/8/22
to Robert Powell, D J, reviewboa...@googlegroups.com
To reply, visit https://hellosplat.com/s/beanbag/tickets/4973/

New update by dushara

For Beanbag, Inc. RBTools Ticket #4973

I suggest the following patch as a fix. This mirrors the implementation of the git client:

diff --git a/rbtools/clients/svn.py b/rbtools/clients/svn.py index e6c6e02..5dae3ec 100644 --- a/rbtools/clients/svn.py +++ b/rbtools/clients/svn.py @@ -1114,7 +1114,9 @@ class SVNClient(SCMClient):

     cmd.append(six.text_type(patch_file))

  • rc, patch_output = self._run_svn(cmd, return_error_code=True)
  • rc, patch_output = self._run_svn(cmd,
  • return_error_code=True,
  • results_unicode=False)

     if self.supports_empty_files():
         try:
    

D J

unread,
Aug 8, 2022, 11:58:31 PM8/8/22
to Robert Powell, D J, reviewboa...@googlegroups.com

New update by dushara

For Beanbag, Inc. RBTools Ticket #4973

Trying again:

diff --git a/rbtools/clients/svn.py b/rbtools/clients/svn.py
index e6c6e02..5dae3ec 100644
--- a/rbtools/clients/svn.py
+++ b/rbtools/clients/svn.py
@@ -1114,7 +1114,9 @@ class SVNClient(SCMClient):

         cmd.append(six.text_type(patch_file))

-        rc, patch_output = self._run_svn(cmd, return_error_code=True)
+        rc, patch_output = self._run_svn(cmd,
+                                         return_error_code=True,
+                                         results_unicode=False)

         if self.supports_empty_files():
             try:

Robert Powell

unread,
Aug 11, 2022, 9:50:11 PM8/11/22
to Robert Powell, reviewboa...@googlegroups.com

New update by rpowell

I can confirm that works.

$ rbt --version RBTools 3.1.1 (Python 3.8.10)

before:

$ rbt patch 269521
Applying 1 patch from review request 269521 (diff revision 17)

CRITICAL: a bytes-like object is required, not 'str'

With change:

$ diff /home/bpowell/.local/lib/python3.8/site-packages/rbtools/clients/svn.py /home/bpowell/.local/lib/python3.8/site-packages/rbtools/clients/svn.py_orig
1117,1119c1117
<         rc, patch_output = self._run_svn(cmd,
<                                          return_error_code=True,
<                                          results_unicode=False)
---
>         rc, patch_output = self._run_svn(cmd, return_error_code=True)

patch applies without error

Christian Hammond

unread,
Aug 15, 2022, 5:31:13 PM8/15/22
to Christian Hammond, Robert Powell, reviewboa...@googlegroups.com

New update by chipx86

We'll get this into 3.1.2. Thanks!

Status:
- New
+ Confirmed
Assigned to:
+ chipx86

Christian Hammond

unread,
Aug 15, 2022, 10:12:20 PM8/15/22
to Christian Hammond, Robert Powell, reviewboa...@googlegroups.com

New update by chipx86

For Beanbag, Inc. RBTools Ticket #4973

Fixed in 14b3b248cc9c079453fde5df43db755f2cd90b3a. This will go into 3.1.2 and 4.0.

Status:
- Confirmed
+ Fixed
Reply all
Reply to author
Forward
0 new messages