Re: 'rbt patch', git diffs and default --px value

2014-06-19 Thread Christian Hammond
This seems fixable. We just need to update the MercurialClient code to have an apply_patch function that does the right thing. Do you know off-hand if ‘hg patch’ will accept a git diff and apply it without requiring a -p parameter? If so, we just need to invoke that. Christian --  Christian

Re: 'rbt patch', git diffs and default --px value

2014-06-19 Thread Bruce Cran
Yes, 'hg patch --no-commit' works with the diffs 'rbt patch' fetches, because as with 'git apply' the default -p value is 1. -- Bruce On Thu, Jun 19, 2014 at 1:51 AM, Christian Hammond christ...@beanbaginc.com wrote: This seems fixable. We just need to update the MercurialClient code to

Re: 'rbt patch', git diffs and default --px value

2014-06-19 Thread Christian Hammond
Cool. Should be easy to get better support into 0.6.2. Christian --  Christian Hammond - christ...@beanbaginc.com Review Board - http://www.reviewboard.org Beanbag, Inc. - http://www.beanbaginc.com On June 19, 2014 at 7:28:37 AM, Bruce Cran (bruce.c...@gmail.com) wrote: Yes, 'hg patch

'rbt patch', git diffs and default --px value

2014-06-18 Thread Bruce Cran
I've been trying to use the 'rbt patch' command, and it seems that _get_p_number() is only for subversion repositories. Since diffs are commonly created with a prefix, and git defaults to adding a/ and b/, should we automatically try, or retry, using 'patch -p1' without the user needing to

Re: 'rbt patch', git diffs and default --px value

2014-06-18 Thread David Trowbridge
Bruce, I use 'rbt patch' with git all the time without specifying --px. What in particular are you seeing? -David On Wed, Jun 18, 2014 at 7:58 AM, Bruce Cran bruce.c...@gmail.com wrote: I've been trying to use the 'rbt patch' command, and it seems that _get_p_number() is only for subversion

Re: 'rbt patch', git diffs and default --px value

2014-06-18 Thread Bruce Cran
Sorry, it's not actually git but mercurial I'm having trouble with. After running 'rbt post' I run 'rbt patch reviewid' and get the error: Patch is being applied from request 41123 with diff revision 1. Failed to execute command: ['patch', '-i', '/tmp/tmps2NVdI'] can't find file to patch at