Hi Terry,

Review Board is basically going to do:

    patch tmpxuYDZ4 file.cpp.diff -o tmpxuYDZ4-new -r tmpxuYDZ4-new.rej

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Thu, Aug 13, 2015 at 9:14 AM, Dunnigan, Terrence J <
terrence.j.dunni...@boeing.com> wrote:

> Well I’m stumped. I downloaded rbtools 0.7.4 and ran rbt diff and then rbt
> post.  The diff is almost identical to the diff that I produce. The rbt
> diff had 3 extra blank lines. I got rbt post to successfully post the diff
> to our server.
>
>
>
> Unfortunately the same error is still occurring.
>
>
>
> Diff currently unavailable.
>
> *Error*: The patch to ‘filename.cpp’ didn’t apply cleanly. The temporary
> files have been left in ….
>
>
>
> Is it possible to manually apply the patch myself? What is Review Board
> trying to do? Any other troubleshooting thoughts?
>
>
>
> Thanks,
>
>
>
> Terry
>
>
>
> *From:* reviewboard@googlegroups.com [mailto:reviewboard@googlegroups.com]
> *On Behalf Of *Christian Hammond
> *Sent:* Thursday, August 13, 2015 3:49 AM
>
> *To:* reviewboard@googlegroups.com
> *Subject:* Re: Diff currently unavailable
>
>
>
> That diff command line will only generate a diff of the staged changes,
> relative to the commit on HEAD. In order for that diff to work in Review
> Board, the commit on HEAD must be pushed upstream. if it's not, you'll
> definitely get these sorts of errors.
>
>
>
> RBTools goes several steps further here. It'll generate a diff, by
> default, from origin/master..HEAD. If you specify a revision or range (like
> `rbt post HEAD`), it'll determine if the parent of HEAD is pushed or not.
> If not, it'll generate a parent diff from origin/master (or whatever
> tracking branch is used) to HEAD^, and post that along with the diff to
> Review Board.
>
>
>
> Christian
>
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - https://www.reviewboard.org
>
> Beanbag, Inc. - https://www.beanbaginc.com
>
>
>
> On Wed, Aug 12, 2015 at 2:15 PM, Dunnigan, Terrence J <
> terrence.j.dunni...@boeing.com> wrote:
>
> Yes we are on my-branch when we generate our own diff. It sounds like
> that’s what ‘rbt post’ would do as well. There’s a number of these
> reviewboard.xyz folders in the temp directory, suggesting the problem is
> somewhat common.
>
>
>
> From my-branch, our diff command is simply:
>
>
>
> git diff --full-index --cached > output_file.diff
>
>
>
> I don’t know why we have our own diff code, instead of using your toolset.
> We started using rbtools with version 0.3, so maybe there were some bugs
> that we had to work around with that version.
>
>
>
> Terry
>
>
>
> *From:* reviewboard@googlegroups.com [mailto:reviewboard@googlegroups.com]
> *On Behalf Of *Christian Hammond
> *Sent:* Wednesday, August 12, 2015 3:20 PM
>
>
> *To:* reviewboard@googlegroups.com
> *Subject:* Re: Diff currently unavailable
>
>
>
> With custom-generated git diffs, the biggest problem people run into is
> the revision range not quite being correct. For instance, in this case:
>
>
>
>
>
>   o [master]
>
>   |
>
>   |
>
>   | o [my-branch] [HEAD]
>
>   |/
>
>   ...
>
>
>
> If you're on HEAD and you generate a diff from master..HEAD, you can end
> up with a diff that won't properly apply. Worth checking into that, seeing
> what the state of the tree looks like when the diff is generated.
>
>
>
> Why does the script generate its own diff rather than letting RBTools do
> that? We're frequently updating the diff logic to work around various
> corner cases.
>
>
>
> Christian
>
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - https://www.reviewboard.org
>
> Beanbag, Inc. - https://www.beanbaginc.com
>
>
>
> On Wed, Aug 12, 2015 at 1:16 PM, Dunnigan, Terrence J <
> terrence.j.dunni...@boeing.com> wrote:
>
> Yes, this is with git. We have a script that generates the diff file using
> git and then uses rbtools to post the diff. It runs on Windows with git
> 1.8.3.
>
>
>
> The .rej file is 21 lines. Every line (but the last) ends with a LF
> character. It’s mostly showing deleted lines (starting with a -), with one
> new line.  I don’t see any odd characters.
>
>
>
> Thanks,
>
>
>
> Terry
>
>
>
> *From:* reviewboard@googlegroups.com [mailto:reviewboard@googlegroups.com]
> *On Behalf Of *Christian Hammond
> *Sent:* Wednesday, August 12, 2015 2:58 PM
> *To:* reviewboard@googlegroups.com
> *Subject:* Re: Diff currently unavailable
>
>
>
> Hi Terry,
>
>
>
> Is this with Git, or something else? How is the diff being generated?
>
>
>
> What's in the .rej file? Any chance there's some whitespace
> inconsistencies, form feed characters, etc.?
>
>
>
>
>
> Christian
>
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - https://www.reviewboard.org
>
> Beanbag, Inc. - https://www.beanbaginc.com
>
>
>
> On Wed, Aug 12, 2015 at 12:57 PM, Dunnigan, Terrence J <
> terrence.j.dunni...@boeing.com> wrote:
>
> Every now and then we encounter an error where the diff is not available.
> For example, today one of my coworkers created a review request with 22
> changed files. 21 of them display properly in ReviewBoard 1.7.27 but one
> does not.
>
>
>
> The error is:
>
>
>
> Exception: The patch to ‘file.cpp' didn't apply cleanly. The temporary
> files have been left in '/tmp/reviewboard.uTif4F' for debugging purposes.
>
> `patch` returned: patching file /tmp/reviewboard.uTif4F/tmpxuYDZ4
>
> Hunk #5 FAILED at 116.
>
> 1 out of 5 hunks FAILED -- saving rejects to file
> /tmp/reviewboard.uTif4F/tmpxuYDZ4-new.rej
>
> patching file /tmp/reviewboard.uTif4F/tmpxuYDZ4
>
>
>
> The /tmp/reviewboard.uTif4F directory has four files.
>
>
>
> file.cpp.diff
>
> tmpxuYDZ4
>
> tmpxuYDZ4-new
>
> tmpxuYDZ4-new.rej
>
>
>
> I’ve looked at the files and nothing strikes me as particular odd. Any
> thoughts on what might be going on?
>
>
>
> Terry
>
>
>
>
>
> --
> 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.
>
>
>
> --
> 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.
>
> --
> 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.
>
>
>
> --
> 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.
>
> --
> 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.
>
>
>
> --
> 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.
>
> --
> 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.
>

-- 
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