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.

Reply via email to