4672: rbt patch is unable to add a folder containing an empty file

totoroliu

What version are you running?

RBTools 0.7.11
svn, version 1.9.7 (r1800392)
Ubuntu 16.04.4 LTS

What steps will reproduce the problem?

$ cd into a svn repo
$ mkdir folder
$ touch folder/empty.file
$ svn add folder
$ svn status
A         folder
A         folder/empty.file

$ rbt post
...
...
...

$ # (revert all the change)
$ svn revert -R . && rm -rf folder
$ rbt patch --debug <request_id>

What is the expected output? What do you see instead?

"svn status" should be:

$ svn status
A         folder
A         folder/empty.file

But it's:

$ svn status
?       folder

And rbt patch output shows error but exit code is still 0:

ERROR: Unable to execute "svn add" on: folder/empty.file

What operating system are you using?

Ubuntu 16.04.4 LTS

Attach the debug out from the command.

$ rbt patch --debug 25893
>>> RBTools 0.7.11
>>> Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609]
>>> Running on Linux-4.4.0-112-generic-x86_64-with-Ubuntu-16.04-xenial
>>> Home = /home/rickliu
>>> Current directory = /home/rickliu/scrach/TestProject_trunk
>>> Command line: rbt patch --debug 25893
>>> Running: tf vc help
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info
>>> Running: diff --version
>>> Running: svn --non-interactive --version -q
>>> repository info: Path: https://svn.com/svn/svntest, Base path: /TestProject/trunk, Supports changesets: False
>>> Making HTTP GET request to https://reviewboard.com/api/
>>> Making HTTP GET request to https://reviewboard.com/api/repositories/?tool=Subversion
>>> Cached response for HTTP GET https://reviewboard.com/api/repositories/?tool=Subversion expired and was modified
>>> Making HTTP GET request to https://reviewboard.com/api/repositories/1/info/
>>> Cached response for HTTP GET https://reviewboard.com/api/repositories/1/info/ expired and was modified
>>> repository info: Path: https://svn.com/svn/svntest, Base path: /TestProject/trunk, Supports changesets: False
>>> Making HTTP GET request to https://reviewboard.com/api/review-requests/25893/diffs/
>>> Cached response for HTTP GET https://reviewboard.com/api/review-requests/25893/diffs/ expired and was modified
>>> Making HTTP GET request to https://reviewboard.com/api/review-requests/25893/diffs/7/
>>> Added cache entry for HTTP GET request to https://reviewboard.com/api/review-requests/25893/diffs/7/
>>> Making HTTP GET request to https://reviewboard.com/api/review-requests/25893/diffs/7/
>>> Added cache entry for HTTP GET request to https://reviewboard.com/api/review-requests/25893/diffs/7/
Patch is being applied from request 25893 with diff revision 7.
>>> Running: svn --non-interactive patch --strip=3 /tmp/tmpdb0zdr
>>> Running: svn --non-interactive add --force folder/empty.file
>>> Command exited with rc 1: ['svn', '--non-interactive', u'add', u'--force', u'folder/empty.file']
svn: E150000: Can't find parent directory's node while trying to add '/home/rickliu/scrach/TestProject_trunk/folder/empty.file'
svn: E155010: The node '/home/rickliu/scrach/TestProject_trunk/folder' was not found.
---
ERROR: Unable to execute "svn add" on: folder/empty.file

Skipped missing target: 'folder/empty.file'
Summary of conflicts:
  Skipped paths: 1

Successfully applied patch.


$ echo $?
0

$ svn status
?       folder

$ ls -l folder
total 0
-rw-rw-r-- 1 rickliu rickliu 0 Mar 16 13:01 empty.file

$ svn add folder
A         folder
A         folder/empty.file

Please provide any additional information below.