4409: rbt patch deletes folder even though the folder deletion is not in the diff!

samsun387

What version are you running?

0.75

What steps will reproduce the problem?

  1. Have a folder with a few files
  2. svn rm all the files in the folder. Now this folder is empty
  3. rbt post
  4. now have a clean checkout and then rbt patch --debug <review-id>
  5. rbt diff will show the folder has been deleted together with files inside

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

folder should not be deleted even though it's empty

What operating system are you using?

Ubuntu 15.04

Attach the debug out from the command.

$ rbt <command> --debug <args>
<debug output>

Please provide any additional information below.

brennie
#1 brennie

Can you attach a patch that exhibits this behaviour? The contents can be censored.

Also, the debug output you gave is not useful. Please include actual debug output.

  • -New
    +NeedInfo
#2 samsun387

Hi Brennie,

I can't seem to update the original ticket so here's my update.

All I did was svn rm test.1 test.2 in the folder and then rbt post to reviewboard. Then I do a fresh checkout of the project and run this:

kevin@kevin-OptiPlex-7020:~/repo/TestProject/Test$ rbt patch --debug 501

RBTools 0.7.6
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010]
Running on Linux-4.2.0-34-generic-x86_64-with-Ubuntu-15.10-wily
Home = /home/kevin
Current directory = /home/kevin/repo/TestProject/Test
Checking for a Subversion repository...
Running: svn --non-interactive info
Running: diff --version
Running: svn --non-interactive --version -q
repository info: Path: http://scm-yvr.fortinet.com/svn/svntest, Base path: /TestProject/trunk/Test, Supports changesets: False
Making HTTP GET request to http://172.18.25.196/api/
Making HTTP GET request to http://172.18.25.196/api/repositories/?tool=Subversion
Cached response for HTTP GET http://172.18.25.196/api/repositories/?tool=Subversion expired and was modified
Making HTTP GET request to http://172.18.25.196/api/review-requests/501/diffs/
Added cache entry for HTTP GET request to http://172.18.25.196/api/review-requests/501/diffs/
Making HTTP GET request to http://172.18.25.196/api/review-requests/501/diffs/1/
Added cache entry for HTTP GET request to http://172.18.25.196/api/review-requests/501/diffs/1/
Making HTTP GET request to http://172.18.25.196/api/review-requests/501/diffs/1/
Added cache entry for HTTP GET request to http://172.18.25.196/api/review-requests/501/diffs/1/
Patch is being applied from request 501 with diff revision 1.
Running: svn --non-interactive patch --strip=4 /tmp/tmpPhv4Is

D folder/test.1
D folder/test.2
D folder

Successfully applied patch.

Just to highlight, as you can see in the patch file, there's no deletion of the folder. However, then rbt patch is done, folder is removed and staged for svn commit.

  • +
    Index: /TestProject/trunk/Test/folder/test.1
    ===================================================================
    --- /TestProject/trunk/Test/folder/test.1	(revision 8906)
    +++ /TestProject/trunk/Test/folder/test.1	(working copy)
    @@ -1 +0,0 @@
    -hello
    Index: /TestProject/trunk/Test/folder/test.2
    ===================================================================
    --- /TestProject/trunk/Test/folder/test.2	(revision 8906)
    +++ /TestProject/trunk/Test/folder/test.2	(working copy)
    @@ -1 +0,0 @@
    -hello
#3 samsun387

Any update on this ? thanks

#4 samsun387
  • -rbt patch deletes folder even though the folder deletion is not in the diff
    +rbt patch deletes folder even though the folder deletion is not in the diff!
#5 samsun387

This ticket should not be NeedInfo anymore but i couldn't update that...