Re: Trouble posting diff to RB from git
So I ran into the same exact issue, except in OS X. The error was exactly the same, I couldn't figure it out. Ran rbt post -d on one of my Linux boxes, worked the first time. I have no idea why it didn't work in OS X, but that's just my two cents. On Thursday, 13 March 2014 07:53:18 UTC-6, Steve Steele wrote: I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.TTBLAH.merge DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.merge'] --- DEBUG:root:Running: git config --get branch.TTBLAH.remote DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.remote'] --- DEBUG:root:Running: git config --get remote.origin.url DEBUG:root:repository info: Path: providerpoint, Base path: , Supports changesets: False DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/info/ DEBUG:root:Running: git rev-parse refs/heads/TTBLAH DEBUG:root:Running: git merge-base 4810fb1f51e15e912eade66829558e0d00d40cfb origin/release-6.0 DEBUG:root:Running: git rev-parse 5402e6a5d333d8012b0278d5b158f95df45269c1 DEBUG:root:Running: git rev-parse release-6.0 DEBUG:root:Running: git status --porcelain --untracked-files=no WARNING:root:Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request. DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..4810fb1f51e15e912eade66829558e0d00d40cfb -M DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..5402e6a5d333d8012b0278d5b158f95df45269c1 -M DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Got API Error 105 (HTTP code 400): One or more fields had errors DEBUG:root:Error data: {u'fields': {u'path': [u'error: unable to find 955231e6e237f85a89db874fbc0fecb90fb9fa35\nfatal: git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35: bad file\n']}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}} Traceback (most recent call last): File /usr/bin/rbt, line 9, in module load_entry_point('RBTools==0.5.7', 'console_scripts', 'rbt')() File /usr/local/lib/python2.6/site-packages/rbtools/commands/main.py, line 127, in main command.run_from_argv([RB_MAIN] + args) File /usr/local/lib/python2.6/site-packages/rbtools/commands/__init__.py, line 158, in run_from_argv exit_code = self.main(*args) or 0 File /usr/local/lib/python2.6/site-packages/rbtools/commands/post.py, line 659, in main submit_as=self.options.submit_as) File /usr/local/lib/python2.6/site-packages/rbtools/commands/post.py, line 534, in post_request raise CommandError('\n'.join(error_msg)) rbtools.commands.CommandError: Error uploading diff One or more fields had errors (HTTP 400, API Error 105) path: error: unable to find 955231e6e237f85a89db874fbc0fecb90fb9fa35 fatal: git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35: bad file Your review request still exists, but the diff is not attached. I have gone to the local repository that ReviewBoard uses and am able to do: git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 blob I notice that the error message doesn't use any options, but if I don't specify an option, I get an error: $ git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35 usage: git cat-file (-t|-s|-e|-p|type) object or: git cat-file (--batch|--batch-check) list_of_objects type can be one of: blob, tree, commit, tag -tshow object type -sshow object size -eexit with zero when there's no error -ppretty-print object's content --batch show info and content of objects fed from the standard
Re: Trouble posting diff to RB from git
Hi, Steve Could you please let me know how you exactly solve the problem? I think I have the same issue with you. You are talking about the repo permissions on some directories, is it the permission on the file system or something else? On Tuesday, March 18, 2014 10:14:33 AM UTC-7, Steve Steele wrote: Walt, After much head-scratching, I think I have finally discovered the problem: the repository permissions weren't set up properly on a few directories/files so that RB couldn't read them. Now your workflow seems to work for me (and others). Thank for all of your help! Steve On Fri, Mar 14, 2014 at 4:20 PM, Javins, Walt walt@isilon.com javascript: wrote: The critical step relevant to your earlier error is: 3) Pull from the mirror that RB uses Review Board can be configured to know how to discuss directly with git remotes (read up on the “Raw file URL mask” parameter). But if you aren’t set up with a raw file mast or one of the natively integrated hosting services (Github, Gitlab, etc), then it is your responsibility to keep Review Board repo (the value in the “Path:” field) in sync with the repo you want to diff against. Many users use a pull style work flow with a ‘*/5 * * * * git fetch’ cron job to do this. Others choose for a push style workflow, and have a post-receive hook that will make sure Review Board’s copy of info is in sync with the code in the origin repository. When I’m working in git my workflow looks like: git checkout -b new_branch origin/upstream_branch hack hack hack git commit rbt post -g -tracking-branch origin/upstream_branch --parent HEAD^ (parent syntax changes slightly in the most recent rbt release) Because origin and the repo Review Board looks at are kept in sync (via one of the above methods), I don’t have to worry about git cat not being able to find any git objects, so long as the diff I’m creating is against a known point in origin. Walt *From:* Steve Steele [mailto:stevew...@gmail.com javascript:] *Sent:* Friday, March 14, 2014 1:57 PM *To:* revie...@googlegroups.com javascript: *Cc:* Javins, Walt *Subject:* Re: Trouble posting diff to RB from git Some follow-up: I was able to do the following: 1) Create a release_feature_branch off of release_branch 2) Push the empty release_feature_branch to the remote host 3) Pull from the mirror that RB uses 4) Make my changes in the release_feature_branch 5) Check in my changes 6) Run rbt post --tracking-branch=release_branch Is this a normal process flow for git development using ReviewBoard? Thanks again, Steve On Friday, March 14, 2014 11:12:10 AM UTC-5, Steve Steele wrote: Walt, Thanks for your response. I was able to go to the mirror and run git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 So it seems as though it is up-to-date. I have my tracking-branch set, but tried unsetting it to see what would happen, and I got a very large diff. I'm not sure I understand tracking branches (I'm actually fairly sure I don't understand them), but here's my branch structure: master-develop-release_branch-release_feature_branch where master, develop, and release_branch are pushed to the origin and release_feature_branch is local. If I use origin/master I get a massive diff. If I use origin/release_branch or release_branch, I get a diff that fails to get pushed to RB. I know this isn't a git support group, but if anything sticks out, I'd appreciate any info you have. Thanks again, Steve On Thursday, March 13, 2014 2:58:23 PM UTC-5, Javins, Walt wrote: Hi Steve, This is error is typically a sign that: 1) Review Board is set up with a local mirror for this git repo, and that mirror is out of date (i.e. it doesn’t contain all the commits that your ‘authoratative’ git repo has) 2) The ‘tracking branch’ is otherwise invalid/not present outside of your local git repo. If these hints aren’t enough to point you in the right direction, could you please provide further information on how you have this git repo configured in the Review Board admin UI. Make sure to anonymize any sensitive data. Walt *From:* revie...@googlegroups.com [mailto:revie...@googlegroups.com] *On Behalf Of *Steve Steele *Sent:* Thursday, March 13, 2014 6:53 AM *To:* revie...@googlegroups.com *Subject:* Trouble posting diff to RB from git I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic
Re: Trouble posting diff to RB from git
Walt, After much head-scratching, I think I have finally discovered the problem: the repository permissions weren't set up properly on a few directories/files so that RB couldn't read them. Now your workflow seems to work for me (and others). Thank for all of your help! Steve On Fri, Mar 14, 2014 at 4:20 PM, Javins, Walt walt.jav...@isilon.comwrote: The critical step relevant to your earlier error is: 3) Pull from the mirror that RB uses Review Board can be configured to know how to discuss directly with git remotes (read up on the Raw file URL mask parameter). But if you aren't set up with a raw file mast or one of the natively integrated hosting services (Github, Gitlab, etc), then it is your responsibility to keep Review Board repo (the value in the Path: field) in sync with the repo you want to diff against. Many users use a pull style work flow with a '*/5 * * * * git fetch' cron job to do this. Others choose for a push style workflow, and have a post-receive hook that will make sure Review Board's copy of info is in sync with the code in the origin repository. When I'm working in git my workflow looks like: git checkout -b new_branch origin/upstream_branch hack hack hack git commit rbt post -g -tracking-branch origin/upstream_branch --parent HEAD^ (parent syntax changes slightly in the most recent rbt release) Because origin and the repo Review Board looks at are kept in sync (via one of the above methods), I don't have to worry about git cat not being able to find any git objects, so long as the diff I'm creating is against a known point in origin. Walt *From:* Steve Steele [mailto:stevewste...@gmail.com] *Sent:* Friday, March 14, 2014 1:57 PM *To:* reviewboard@googlegroups.com *Cc:* Javins, Walt *Subject:* Re: Trouble posting diff to RB from git Some follow-up: I was able to do the following: 1) Create a release_feature_branch off of release_branch 2) Push the empty release_feature_branch to the remote host 3) Pull from the mirror that RB uses 4) Make my changes in the release_feature_branch 5) Check in my changes 6) Run rbt post --tracking-branch=release_branch Is this a normal process flow for git development using ReviewBoard? Thanks again, Steve On Friday, March 14, 2014 11:12:10 AM UTC-5, Steve Steele wrote: Walt, Thanks for your response. I was able to go to the mirror and run git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 So it seems as though it is up-to-date. I have my tracking-branch set, but tried unsetting it to see what would happen, and I got a very large diff. I'm not sure I understand tracking branches (I'm actually fairly sure I don't understand them), but here's my branch structure: master-develop-release_branch-release_feature_branch where master, develop, and release_branch are pushed to the origin and release_feature_branch is local. If I use origin/master I get a massive diff. If I use origin/release_branch or release_branch, I get a diff that fails to get pushed to RB. I know this isn't a git support group, but if anything sticks out, I'd appreciate any info you have. Thanks again, Steve On Thursday, March 13, 2014 2:58:23 PM UTC-5, Javins, Walt wrote: Hi Steve, This is error is typically a sign that: 1) Review Board is set up with a local mirror for this git repo, and that mirror is out of date (i.e. it doesn't contain all the commits that your 'authoratative' git repo has) 2) The 'tracking branch' is otherwise invalid/not present outside of your local git repo. If these hints aren't enough to point you in the right direction, could you please provide further information on how you have this git repo configured in the Review Board admin UI. Make sure to anonymize any sensitive data. Walt *From:* revie...@googlegroups.com [mailto:revie...@googlegroups.comrevie...@googlegroups.com] *On Behalf Of *Steve Steele *Sent:* Thursday, March 13, 2014 6:53 AM *To:* revie...@googlegroups.com *Subject:* Trouble posting diff to RB from git I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.TTBLAH.merge DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.merge'] --- DEBUG:root:Running: git config --get branch.TTBLAH.remote DEBUG:root:Command exited
Re: Trouble posting diff to RB from git
Walt, Thanks for your response. I was able to go to the mirror and run git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 So it seems as though it is up-to-date. I have my tracking-branch set, but tried unsetting it to see what would happen, and I got a very large diff. I'm not sure I understand tracking branches (I'm actually fairly sure I don't understand them), but here's my branch structure: master-develop-release_branch-release_feature_branch where master, develop, and release_branch are pushed to the origin and release_feature_branch is local. If I use origin/master I get a massive diff. If I use origin/release_branch or release_branch, I get a diff that fails to get pushed to RB. I know this isn't a git support group, but if anything sticks out, I'd appreciate any info you have. Thanks again, Steve On Thursday, March 13, 2014 2:58:23 PM UTC-5, Javins, Walt wrote: Hi Steve, This is error is typically a sign that: 1) Review Board is set up with a local mirror for this git repo, and that mirror is out of date (i.e. it doesn’t contain all the commits that your ‘authoratative’ git repo has) 2) The ‘tracking branch’ is otherwise invalid/not present outside of your local git repo. If these hints aren’t enough to point you in the right direction, could you please provide further information on how you have this git repo configured in the Review Board admin UI. Make sure to anonymize any sensitive data. Walt *From:* revie...@googlegroups.com javascript: [mailto: revie...@googlegroups.com javascript:] *On Behalf Of *Steve Steele *Sent:* Thursday, March 13, 2014 6:53 AM *To:* revie...@googlegroups.com javascript: *Subject:* Trouble posting diff to RB from git I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.TTBLAH.merge DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.merge'] --- DEBUG:root:Running: git config --get branch.TTBLAH.remote DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.remote'] --- DEBUG:root:Running: git config --get remote.origin.url DEBUG:root:repository info: Path: providerpoint, Base path: , Supports changesets: False DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/info/ DEBUG:root:Running: git rev-parse refs/heads/TTBLAH DEBUG:root:Running: git merge-base 4810fb1f51e15e912eade66829558e0d00d40cfb origin/release-6.0 DEBUG:root:Running: git rev-parse 5402e6a5d333d8012b0278d5b158f95df45269c1 DEBUG:root:Running: git rev-parse release-6.0 DEBUG:root:Running: git status --porcelain --untracked-files=no WARNING:root:Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request. DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..4810fb1f51e15e912eade66829558e0d00d40cfb -M DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..5402e6a5d333d8012b0278d5b158f95df45269c1 -M DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Got API Error 105 (HTTP code 400): One or more fields had errors DEBUG:root:Error data: {u'fields': {u'path': [u'error: unable to find 955231e6e237f85a89db874fbc0fecb90fb9fa35\nfatal: git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35: bad file\n']}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}} Traceback (most recent call last): File /usr/bin/rbt, line 9, in module load_entry_point('RBTools==0.5.7', 'console_scripts', 'rbt')() File /usr/local/lib/python2.6/site-packages/rbtools/commands/main.py, line 127, in main command.run_from_argv([RB_MAIN] + args) File
Re: Trouble posting diff to RB from git
Some follow-up: I was able to do the following: 1) Create a release_feature_branch off of release_branch 2) Push the empty release_feature_branch to the remote host 3) Pull from the mirror that RB uses 4) Make my changes in the release_feature_branch 5) Check in my changes 6) Run rbt post --tracking-branch=release_branch Is this a normal process flow for git development using ReviewBoard? Thanks again, Steve On Friday, March 14, 2014 11:12:10 AM UTC-5, Steve Steele wrote: Walt, Thanks for your response. I was able to go to the mirror and run git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 So it seems as though it is up-to-date. I have my tracking-branch set, but tried unsetting it to see what would happen, and I got a very large diff. I'm not sure I understand tracking branches (I'm actually fairly sure I don't understand them), but here's my branch structure: master-develop-release_branch-release_feature_branch where master, develop, and release_branch are pushed to the origin and release_feature_branch is local. If I use origin/master I get a massive diff. If I use origin/release_branch or release_branch, I get a diff that fails to get pushed to RB. I know this isn't a git support group, but if anything sticks out, I'd appreciate any info you have. Thanks again, Steve On Thursday, March 13, 2014 2:58:23 PM UTC-5, Javins, Walt wrote: Hi Steve, This is error is typically a sign that: 1) Review Board is set up with a local mirror for this git repo, and that mirror is out of date (i.e. it doesn’t contain all the commits that your ‘authoratative’ git repo has) 2) The ‘tracking branch’ is otherwise invalid/not present outside of your local git repo. If these hints aren’t enough to point you in the right direction, could you please provide further information on how you have this git repo configured in the Review Board admin UI. Make sure to anonymize any sensitive data. Walt *From:* revie...@googlegroups.com [mailto:revie...@googlegroups.com] *On Behalf Of *Steve Steele *Sent:* Thursday, March 13, 2014 6:53 AM *To:* revie...@googlegroups.com *Subject:* Trouble posting diff to RB from git I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.TTBLAH.merge DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.merge'] --- DEBUG:root:Running: git config --get branch.TTBLAH.remote DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.remote'] --- DEBUG:root:Running: git config --get remote.origin.url DEBUG:root:repository info: Path: providerpoint, Base path: , Supports changesets: False DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/info/ DEBUG:root:Running: git rev-parse refs/heads/TTBLAH DEBUG:root:Running: git merge-base 4810fb1f51e15e912eade66829558e0d00d40cfb origin/release-6.0 DEBUG:root:Running: git rev-parse 5402e6a5d333d8012b0278d5b158f95df45269c1 DEBUG:root:Running: git rev-parse release-6.0 DEBUG:root:Running: git status --porcelain --untracked-files=no WARNING:root:Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request. DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..4810fb1f51e15e912eade66829558e0d00d40cfb -M DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..5402e6a5d333d8012b0278d5b158f95df45269c1 -M DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Got API Error 105 (HTTP code 400): One or more fields had errors DEBUG:root:Error data: {u'fields': {u'path': [u'error: unable to find 955231e6e237f85a89db874fbc0fecb90fb9fa35\nfatal: git cat-file
RE: Trouble posting diff to RB from git
The critical step relevant to your earlier error is: 3) Pull from the mirror that RB uses Review Board can be configured to know how to discuss directly with git remotes (read up on the “Raw file URL mask” parameter). But if you aren’t set up with a raw file mast or one of the natively integrated hosting services (Github, Gitlab, etc), then it is your responsibility to keep Review Board repo (the value in the “Path:” field) in sync with the repo you want to diff against. Many users use a pull style work flow with a ‘*/5 * * * * git fetch’ cron job to do this. Others choose for a push style workflow, and have a post-receive hook that will make sure Review Board’s copy of info is in sync with the code in the origin repository. When I’m working in git my workflow looks like: git checkout -b new_branch origin/upstream_branch hack hack hack git commit rbt post -g -tracking-branch origin/upstream_branch --parent HEAD^ (parent syntax changes slightly in the most recent rbt release) Because origin and the repo Review Board looks at are kept in sync (via one of the above methods), I don’t have to worry about git cat not being able to find any git objects, so long as the diff I’m creating is against a known point in origin. Walt From: Steve Steele [mailto:stevewste...@gmail.com] Sent: Friday, March 14, 2014 1:57 PM To: reviewboard@googlegroups.com Cc: Javins, Walt Subject: Re: Trouble posting diff to RB from git Some follow-up: I was able to do the following: 1) Create a release_feature_branch off of release_branch 2) Push the empty release_feature_branch to the remote host 3) Pull from the mirror that RB uses 4) Make my changes in the release_feature_branch 5) Check in my changes 6) Run rbt post --tracking-branch=release_branch Is this a normal process flow for git development using ReviewBoard? Thanks again, Steve On Friday, March 14, 2014 11:12:10 AM UTC-5, Steve Steele wrote: Walt, Thanks for your response. I was able to go to the mirror and run git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 So it seems as though it is up-to-date. I have my tracking-branch set, but tried unsetting it to see what would happen, and I got a very large diff. I'm not sure I understand tracking branches (I'm actually fairly sure I don't understand them), but here's my branch structure: master-develop-release_branch-release_feature_branch where master, develop, and release_branch are pushed to the origin and release_feature_branch is local. If I use origin/master I get a massive diff. If I use origin/release_branch or release_branch, I get a diff that fails to get pushed to RB. I know this isn't a git support group, but if anything sticks out, I'd appreciate any info you have. Thanks again, Steve On Thursday, March 13, 2014 2:58:23 PM UTC-5, Javins, Walt wrote: Hi Steve, This is error is typically a sign that: 1) Review Board is set up with a local mirror for this git repo, and that mirror is out of date (i.e. it doesn’t contain all the commits that your ‘authoratative’ git repo has) 2) The ‘tracking branch’ is otherwise invalid/not present outside of your local git repo. If these hints aren’t enough to point you in the right direction, could you please provide further information on how you have this git repo configured in the Review Board admin UI. Make sure to anonymize any sensitive data. Walt From: revie...@googlegroups.commailto:revie...@googlegroups.com [mailto:revie...@googlegroups.com] On Behalf Of Steve Steele Sent: Thursday, March 13, 2014 6:53 AM To: revie...@googlegroups.commailto:revie...@googlegroups.com Subject: Trouble posting diff to RB from git I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.TTBLAH.merge DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.merge'] --- DEBUG:root:Running: git config --get branch.TTBLAH.remote DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.remote'] --- DEBUG:root:Running: git config --get remote.origin.url DEBUG:root:repository info: Path: providerpoint, Base path: , Supports changesets: False DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/info/ DEBUG:root:Running: git rev-parse refs/heads/TTBLAH DEBUG:root:Running: git merge
RE: Trouble posting diff to RB from git
Hi Steve, This is error is typically a sign that: 1) Review Board is set up with a local mirror for this git repo, and that mirror is out of date (i.e. it doesn’t contain all the commits that your ‘authoratative’ git repo has) 2) The ‘tracking branch’ is otherwise invalid/not present outside of your local git repo. If these hints aren’t enough to point you in the right direction, could you please provide further information on how you have this git repo configured in the Review Board admin UI. Make sure to anonymize any sensitive data. Walt From: reviewboard@googlegroups.com [mailto:reviewboard@googlegroups.com] On Behalf Of Steve Steele Sent: Thursday, March 13, 2014 6:53 AM To: reviewboard@googlegroups.com Subject: Trouble posting diff to RB from git I'm having trouble getting my diffs to be uploaded to ReviewBoard: $ rbt post -d DEBUG:root:Checking for a Subversion repository... DEBUG:root:Running: svn info --non-interactive DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: '.' is not a working copy --- DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.TTBLAH.merge DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.merge'] --- DEBUG:root:Running: git config --get branch.TTBLAH.remote DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'branch.TTBLAH.remote'] --- DEBUG:root:Running: git config --get remote.origin.url DEBUG:root:repository info: Path: providerpoint, Base path: , Supports changesets: False DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/info/ DEBUG:root:Running: git rev-parse refs/heads/TTBLAH DEBUG:root:Running: git merge-base 4810fb1f51e15e912eade66829558e0d00d40cfb origin/release-6.0 DEBUG:root:Running: git rev-parse 5402e6a5d333d8012b0278d5b158f95df45269c1 DEBUG:root:Running: git rev-parse release-6.0 DEBUG:root:Running: git status --porcelain --untracked-files=no WARNING:root:Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request. DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..4810fb1f51e15e912eade66829558e0d00d40cfb -M DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 5402e6a5d333d8012b0278d5b158f95df45269c1..5402e6a5d333d8012b0278d5b158f95df45269c1 -M DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/ DEBUG:root:Making HTTP GET request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Making HTTP POST request to http://blade-66/reviewboard/api/review-requests/34/diffs/ DEBUG:root:Got API Error 105 (HTTP code 400): One or more fields had errors DEBUG:root:Error data: {u'fields': {u'path': [u'error: unable to find 955231e6e237f85a89db874fbc0fecb90fb9fa35\nfatal: git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35: bad file\n']}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}} Traceback (most recent call last): File /usr/bin/rbt, line 9, in module load_entry_point('RBTools==0.5.7', 'console_scripts', 'rbt')() File /usr/local/lib/python2.6/site-packages/rbtools/commands/main.py, line 127, in main command.run_from_argv([RB_MAIN] + args) File /usr/local/lib/python2.6/site-packages/rbtools/commands/__init__.py, line 158, in run_from_argv exit_code = self.main(*args) or 0 File /usr/local/lib/python2.6/site-packages/rbtools/commands/post.py, line 659, in main submit_as=self.options.submit_as) File /usr/local/lib/python2.6/site-packages/rbtools/commands/post.py, line 534, in post_request raise CommandError('\n'.join(error_msg)) rbtools.commands.CommandError: Error uploading diff One or more fields had errors (HTTP 400, API Error 105) path: error: unable to find 955231e6e237f85a89db874fbc0fecb90fb9fa35 fatal: git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35: bad file Your review request still exists, but the diff is not attached. I have gone to the local repository that ReviewBoard uses and am able to do: git cat-file -t 955231e6e237f85a89db874fbc0fecb90fb9fa35 blob I notice that the error message doesn't use any options, but if I don't specify an option, I get an error: $ git cat-file 955231e6e237f85a89db874fbc0fecb90fb9fa35 usage: git cat-file (-t|-s|-e|-p|type) object or: git cat-file