RB Patch

Review Request #3440 — Created Oct. 21, 2012 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

RB Patch will download a patch based off a specific review request ID and apply the patch on the local machine.

TODO:
- I keep getting an error when post-review'ing my mercurial changes (after a hg commit). http://pastie.org/5455551 which prevents me from fully testing Mercurial, though it should work.
- All testing performed on dev server for controlled experiments.

- Tested when user uses a specific revision id (--diff-revision)
- Tested when user specifices own pX argument (--px)

** GIT **
Steps performed:
1. Made a new review request (with commit A)
2. Made some changes to local files
3. Git commit those changes (commit B) and updated the request to create a diff (between B and A)
4. On local drive, reverted to commit A
5. Ran 'rb patch <r>' and viewed the results and affected files.

I did this for a positive and negative test.

** Mercurial **
Similar to Git. I am assuming there's no need for pX logic here, just like Git's apply patch.

** SVN **
Steps performed:
1. Made a new review request (with commit A)
2. Made some changes to local file(s)*
3. post-review a request to create a diff (between B and A)
4. On local drive, reverted to commit A
5. Ran 'rb patch <r>' and viewed the results and affected files.

One or more file changes:
- one file change (/trunk/file1.txt)
- multiple file changes (/trunk/file1.txt and /trunk/file2.txt) and files in different subdirectories (e.g. /trunk/file1.txt, /trunk/a/file2.txt, /trunk/a/b/file3.txt)

Sample directory cases #1:
server: /trunk/a/b/c/file.txt
local checked out: /../b (I just checked out from /trunk/a/b)
patch applied from /b/, /b/c/ <-- all succeeded


Sample directory cases #2:
server: /trunk/a/b/c/file.txt
local checked out: /trunk (I just checked out from /trunk)
patch applied from trunk, /trunk/a/, trunk/a/b/, trunk/a/b/c/ <-- all succeeded

-- 

Tested again with new changes made in rb-general branch (removal of extra options).
    Loading...