Hi,

I am having the same problem (diff failed after push to central repo).
I am using Mercurial instead of Git, using RB 1.6.3. Here's the error:

Traceback (most recent call last):
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
reviewboard/diffviewer/views.py", line 151, in view_diff
    interdiffset, highlighting, True)
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
reviewboard/diffviewer/diffutils.py", line 1071, in get_diff_files
    large_data=True)
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
djblets/util/misc.py", line 157, in cache_memoize
    data = lookup_callable()
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
reviewboard/diffviewer/diffutils.py", line 1070, in <lambda>
    enable_syntax_highlighting)),
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
reviewboard/diffviewer/diffutils.py", line 552, in get_chunks
    new = get_patched_file(old, filediff)
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
reviewboard/diffviewer/diffutils.py", line 374, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
  File "/opt/reviewboard_virtualenv/lib/python2.6/site-packages/
reviewboard/diffviewer/diffutils.py", line 242, in patch
    (filename, tempdir, patch_output))
Exception: The patch to '3rd_Party/PacsRuntime/3rdPartyRpms.txt'
didn't apply cleanly. The temporary files have been left in '/tmp/
reviewboard.IkSvOF' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.IkSvOF/tmpahHYOO
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file /tmp/
reviewboard.IkSvOF/tmpahHYOO-new.rej

One work-around I found is to immediately do another `post-review -r
review_id --revision-range tip` right after the push to fix the diff
on ReviewBoard.

I initially created the review by doing `post-review --guess-summary --
guess-description`.

Then subsequently updating it using `post-review -r review_id`

Did I do something wrong?

How can I prevent / debug this problem?

Long



On Dec 22 2010, 7:53 pm, David Birdsong <david.birds...@gmail.com>
wrote:
> On Wed, Dec 22, 2010 at 4:38 PM, Christian Hammond <chip...@chipx86.com> 
> wrote:
> > It's the SHA1 of the commit.
>
> but git log shows a different commit id for that commit.
>
> referring to that hash tag when performing a diff, does work though
> git diff 9455e4714fa626cbd8410a3d13abb3bbe7a79f8c <file_name>
> diff --git a/scripts/cr.py b/scripts/cr.py
> index 9455e47..ba58480 100755
> ....truncated
>
>
>
> > I think I saw a setup once before that required id= instead of id2=.
>
> i've tried id and id2. id is probably the correct param, because it
> triggers an error for a bad commit id when rb tries to fetch using the
> sha1 it has stored in the db.  this is why i'm trying to understand
> how rb/post-review decides to store that hash.
>
> > Maybe try that.
>
> now that i've put id instead of id2 in the raw url, when i do review
> diff on a new review that hasn't been pushed to the central repo, it
> gives an error.  why would that commit id(which is only exists in my
> local clone) be supplied to cgit which is running against the central
> repo?  (this question ignores the fact that this hash doesn't seem to
> be a local commit either, but some sort of diff tag?)
>
> btw, these are the commands i run for post-review--perhaps incorrect
> or incomplete?
> /usr/bin/post-review --guess-summary --guess-description --publish
> --target-people=user1,user2 --target-group=Everyone
>
>
>
>
>
>
>
> > Christian
>
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
>
> > On Wed, Dec 22, 2010 at 11:37 AM, David Birdsong
> > <david.birds...@gmail.com> wrote:
> >> On Tue, Dec 21, 2010 at 6:24 PM, Christian Hammond <chip...@chipx86.com> 
> >> wrote:
> >>> Can you plug in a filename and SHA1 into that raw URL mask and see if
> >>> it's actually fetching using the SHA1? If modifying the tip of origin
> >>> breaks things, I wonder if it's not actually making use of the SHA1 on
> >>> your copy of cgit. If things break with gtk+, maybe there is some
> >>> compatibility change.
>
> >> this is happening.  calls to that raw url return the plain file, but
> >> id2 is completely ignored.
>
> >>> What you can try doing is browsing your repository, going to a file
> >>> (on some older revision), and trying to view the raw file. See what
> >>> URL you get. There may be a couple versions of the raw URLs, so you
> >>> may have to find the one that uses /plain/.
>
> >> so going working backwards a little, can you tell me what this id
> >> represents?  this is from diffviewer_filediff table.
> >>   source_revision: 9455e4714fa626cbd8410a3d13abb3bbe7a79f8c
>
> >> i ask because this is what it's querying cgit for, but i can't find
> >> any reference to that id...either by browsing through cgit or on my
> >> local clone where i ran post-review.
>
> >>> Christian
>
> >>> --
> >>> Christian Hammond - chip...@chipx86.com
> >>> Review Board -http://www.reviewboard.org
> >>> VMware, Inc. -http://www.vmware.com
>
> >>> On Tue, Dec 21, 2010 at 12:31 PM, birdsong <david.birds...@gmail.com> 
> >>> wrote:
>
> >>>> I'm getting this error
> >>>>http://pastebin.com/uEwh1vjR
>
> >>>> Setup is:
> >>>> reviewboard on same servers as bare git repo and cgit server.
> >>>> path: /home/git/repositories/f.web.git
> >>>> mirror path: g...@repo.f.com:f.web.git
> >>>> raw file url 
> >>>> mask:http://localhost:7000/cgit/f.web/plain/<filename>?id2=<revision>
>
> >>>> (i know i'm missing the 'gtk+' path component that the docs mention,
> >>>> but this url works on my version of cgit to retrieve the plain file
> >>>> and adding gtk+ anywhere in the path broke that)
>
> >>>> I am able to view the diff after running git commit and then post-
> >>>> review.  Once Ipushmy commit to origin, the diff is no longer
> >>>> available and I get this traceback.
>
> >>>> Any ideas?
>
> >>>> --
> >>>> Want to help the Review Board project? Donate today 
> >>>> athttp://www.reviewboard.org/donate/
> >>>> Happy user? Let us know athttp://www.reviewboard.org/users/
> >>>> -~----------~----~----~----~------~----~------~--~---
> >>>> To unsubscribe from this group, send email to 
> >>>> reviewboard+unsubscr...@googlegroups.com
> >>>> For more options, visit this group 
> >>>> athttp://groups.google.com/group/reviewboard?hl=en
>
> >>> --
> >>> Want to help the Review Board project? Donate today 
> >>> athttp://www.reviewboard.org/donate/
> >>> Happy user? Let us know athttp://www.reviewboard.org/users/
> >>> -~----------~----~----~----~------~----~------~--~---
> >>> To unsubscribe from this group, send email to 
> >>> reviewboard+unsubscr...@googlegroups.com
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/reviewboard?hl=en
>
> >> --
> >> Want to help the Review Board project? Donate today 
> >> athttp://www.reviewboard.org/donate/
> >> Happy user? Let us know athttp://www.reviewboard.org/users/
> >> -~----------~----~----~----~------~----~------~--~---
> >> To unsubscribe from this group, send email to 
> >> reviewboard+unsubscr...@googlegroups.com
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/reviewboard?hl=en
>
> > --
> > Want to help the Review Board project? Donate today 
> > athttp://www.reviewboard.org/donate/
> > Happy user? Let us know athttp://www.reviewboard.org/users/
> > -~----------~----~----~----~------~----~------~--~---
> > To unsubscribe from this group, send email to 
> > reviewboard+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to