in my understanding, the setup in my company is, after the review in 
reviewboard finish, a Jenkins job will be kicked, and in that job, it does 
a 'rbt patch <id>', where the <id> points to the reviewed job which is 
essentially the diff file, where the base path is missing (as it is 
included in the API if my understanding is correct).

so the failure happens in the rbt patch in the Jenkins job in the server 
side, and the root cause in my understanding is the missing base path in 
the diff file. 

This is because I did the same thing for an svn repo. and the only 
difference is that the diff generated by 'rbt diff' contains the base path. 
 
for you comment
"If you upload the generated diff manually on Review Board, you'll see that 
Base Path field, where you can supply the prefix by hand."
I think you mean  rbt post --diff-filename <file> --basedir <path>. I tried 
to change BASEDIR in .reviewboardrc and it has syntax error, maybe I just 
did it wrong. 

But anyway, thanks for your help, at least I have some approaches to try.

Dave 

On Tuesday, August 9, 2016 at 4:15:11 PM UTC-7, Christian Hammond wrote:
>
> Hi Dave,
>
> Subversion diffs don't include the full absolute path of the file in the 
> repository, but rather use a path relative to the directory in which `svn 
> diff` was ran. It's a very weird Subversion-specific quirk, which has been 
> there since the beginning. To compensate for this, Review Board takes a 
> "base path" for Subversion repositories, which is essentially that missing 
> prefix. It concatenates the relative path to that, resulting in an absolute 
> path it can use for lookups.
>
> If you post using RBTools, this base path should be supplied automatically 
> during the diff upload (it will compute it and then include it in the API 
> request), but you definitely won't see it during `rbt diff` because that's 
> not part of the diff file.
>
> If you upload the generated diff manually on Review Board, you'll see that 
> Base Path field, where you can supply the prefix by hand.
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>
> On Tue, Aug 9, 2016 at 3:35 PM, <dave...@gmail.com <javascript:>> wrote:
>
>> yes, it sort of figured out.
>> part of the output is shown as follows
>>
>> rbt diff --debug
>>
>> >>> Running: git -c core.quotepath=false diff --no-color --no-prefix -r 
>> -u --no-ext-diff 
>> ad717acd80c3467c29301325cb2ba15881053bab..d398d171c3f51206aa82f6c3a2d884f0cb603560
>> >>> Running: git svn find-rev ad717acd80c3467c29301325cb2ba15881053bab
>> Index: src/kernel_patches/CVEs/CVE-2016-0723.patch
>> ===================================================================
>> --- src/kernel_patches/CVEs/CVE-2016-0723.patch (revision 0)
>> +++ src/kernel_patches/CVEs/CVE-2016-0723.patch (revision 0)
>>
>> but unfortunately, I guess it is because of the setup, in the review 
>> board side, it needs the following type of diff
>>
>> Index:  /<project>/trunk/src/kernel_patches/CVEs/CVE-2016-0723.patch
>> ===================================================================
>> --- /<project>/trunk/src/kernel_patches/CVEs/CVE-2016-0723.patch (revision 
>> 0)
>> +++ /<project>/trunk/src/kernel_patches/CVEs/CVE-2016-0723.patch (revision 
>> 0)
>>
>> note that there is a prefix is needed in the path.
>>
>> I suspect it is a config error but not sure. Basically I am a newbie to 
>> git-svn and reviewboard, usually I am using git/gerrit. (this is why I try 
>> to use git-svn...)
>>
>> btw, I use the following cmd to init the git-svn local repo
>> git svn init --username="username" --trunk='trunk' 
>> http://abc.com:8080/svn/svnroot/<project>/
>>
>> any suggestions?
>>
>>
>> On Monday, August 8, 2016 at 7:46:04 PM UTC-7, David Trowbridge wrote:
>>>
>>> Hi,
>>>
>>> rbt should be figuring out that it's a git-svn clone and doing the right 
>>> thing. Can you run with --debug and send us the output?
>>>
>>> -David
>>>
>>> On Mon, Aug 8, 2016 at 7:45 PM <dave...@gmail.com> wrote:
>>>
>>>> In my setup, I have a local git which is accessing the remote svn 
>>>> through git svn.
>>>> if I use rbt diff, the diff is git format, does not have 
>>>> /<project>/trunk/ prefix, which results that the remote server cannot 
>>>> apply 
>>>> the patch by rbt patch.
>>>>
>>>> I suspect I am using it wrong, but anyone can shield some lights on it?
>>>>
>>>> -- 
>>>> Supercharge your Review Board with Power Pack: 
>>>> https://www.reviewboard.org/powerpack/
>>>> Want us to host Review Board for you? Check out RBCommons: 
>>>> https://rbcommons.com/
>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "reviewboard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to reviewboard...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to