Reviewboard Git binary support

34 views
Skip to first unread message

kevin fortinet

unread,
Apr 20, 2020, 6:14:11 PM4/20/20
to Review Board Community
Hi,

I'm using Reviewboard 2.5.18 and rbtools 1.0.3. I've noticed rbt patch/land would always fail if there's a binary in the diff.

Steps:
  1. Create a commit with binary and text change. then post it to reviewboard
  2. On a clean clone, rbt patch <review request id>.
I am wondering whether reviewboard supports git binary, and if it doesn't, is there a way to avoid skip patching the binaries but to finish with the text changes?

kevin@kevin-OptiPlex-7020:~/repo/fac$ rbt patch --debug 60122 
>>> RBTools 1.0.3
>>> Python 2.7.12 (default, Oct  8 2019, 14:14:10) 
[GCC 5.4.0 20160609]
>>> Running on Linux-4.15.0-91-generic-x86_64-with-Ubuntu-16.04-xenial
>>> Home = /home/kevin
>>> Current directory = /home/kevin/repo/fac
>>> Command line: rbt patch --debug 60122
>>> Running: tf vc help
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info
>>> Command exited with rc 1: [u'svn', u'--non-interactive', u'info']
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.master.merge
>>> Running: git config --get branch.master.remote
>>> Running: git config --get remote.origin.url
>>> Repository info: Path: g...@git.corp.abc.com:fac/fortiauthenticator.git, Base path: , Supports changesets: False
>>> Checking for a Mercurial repository...
>>> Unable to execute "hg --help": skipping Mercurial
>>> Checking for a CVS repository...
>>> Unable to execute "cvs": skipping CVS
>>> Checking for a Perforce repository...
>>> Unable to execute "p4 help": skipping Perforce
>>> Checking for a Plastic repository...
>>> Unable to execute "cm version": skipping Plastic
>>> Checking for a ClearCase repository...
>>> Unable to execute "cleartool help": skipping ClearCase
>>> Checking for a Bazaar repository...
>>> Unable to execute "bzr help": skipping Bazaar
>>> Checking for a Team Foundation Server repository...
>>> Unable to execute "tf help": skipping TFS
>>> Making HTTP GET request to http://reviewboard-test.corp.abc.com/api/
>>> Making HTTP GET request to https://reviewboard-test.corp.abc.com/api/review-requests/60122/diffs/
>>> Cached response for HTTP GET https://reviewboard-test.corp.abc.com/api/review-requests/60122/diffs/ expired and was modified
>>> Making HTTP GET request to https://reviewboard-test.corp.abc.com/api/review-requests/60122/diffs/2/
>>> Cached response for HTTP GET https://reviewboard-test.corp.abc.com/api/review-requests/60122/diffs/2/ expired and was not modified
>>> Making HTTP GET request to https://reviewboard-test.corp.abc.com/api/review-requests/60122/diffs/2/
>>> Cached response for HTTP GET https://reviewboard-test.corp.abc.com/api/review-requests/60122/diffs/2/ expired and was not modified
>>> Running: git status --porcelain --untracked-files=no --ignore-submodules=dirty
Patch is being applied from request 60122 with diff revision 2.
>>> Running: git apply -3 /tmp/rbtools.qYiOC7
>>> Command exited with rc 1: [u'git', u'apply', u'-3', u'/tmp/rbtools.qYiOC7']
error: missing binary patch data for 'cp'
error: binary patch does not apply to 'cp'
Falling back to three-way merge...
error: missing binary patch data for 'cp'
error: binary patch does not apply to 'cp'
error: cp: patch does not apply
---

error: missing binary patch data for 'cp'
error: binary patch does not apply to 'cp'
Falling back to three-way merge...
error: missing binary patch data for 'cp'
error: binary patch does not apply to 'cp'
error: cp: patch does not apply

Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/main.py", line 120, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/__init__.py", line 725, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/patch.py", line 203, in main
    revert=self.options.revert_patch)
  File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/patch.py", line 119, in apply_patch
    'Unable to apply the patch. The patch may be invalid, or '
rbtools.commands.CommandError: Unable to apply the patch. The patch may be invalid, or there may be conflicts that could not be resolved.



Christian Hammond

unread,
May 6, 2020, 7:51:31 PM5/6/20
to revie...@googlegroups.com
Hi Kevin,

Sorry for the very late reply. We've been pretty busy over the past couple of months and haven't been able to give community support the attention we'd like.

I'm a bit surprised to see that this is broken. I'd be curious to know what that part of the uploaded diff looks like. It's clearly seeing that it's there and is trying to apply it, but it sounds more like the binary that the diff was uploaded from and the binary it's trying to apply to are different. We're just calling out to git to apply the diff that it generated, so you should see the same results if you were to try to hand-apply. It could be that the uploaded diff is being mangled, but I can't say without seeing it.

Christian


--
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 "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/0562a50b-7c86-4a10-839a-df0589071803%40googlegroups.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

André Klitzing

unread,
May 7, 2020, 3:26:36 AM5/7/20
to Review Board Community
Hi there,

looks like the corrupted binary fix.


Best regards
  André
Reply all
Reply to author
Forward
0 new messages