I am working on a lightweight smoke test script for a Gerrit 3.6 POC installation. At a high level I would like for it to work like this:
- git init
git remote add origin blah # for some server/project supplied as parameter
git fetch +refs/meta/config:refs/meta/config- also tried +refs/meta/config:refs/remotes/origin/meta/config
- scp -p -P 29418 server:hooks/commit-msg .git/hooks/
- git checkout meta/config # succeeds up to this point in all cases so far
- date >date.txt; git add date.txt # or something equally trivial
- git commit -m "some message" # still OK so far
- git push origin HEAD:refs/for/meta/config
- Expected: change is pushed successfully and new code review is generated
- Actual: ! [remote rejected] HEAD -> refs/for/meta/config (branch meta/config not found)
- Also tried git push origin HEAD:refs/for/refs/heads/meta/config
- This is my current point of failure (discussed below)
- (never get this far) use ssh -p 29418 server gerrit review commands to progress the review, then abandon and delete the review
This is based on constraints as follows:
- I want to be able to introduce code reviews into any project and observe the replication behaviour (partly because I am trying to troubleshoot some high replication latency issues and looking for roadblocks).
- I want to introduce the code review in meta/config since it is lightweight and all projects have this branch.
- I want to use ssh for simplest authentication (public keys).
- I want to be able to abandon and delete the review so that it does not clutter up the code history (but I haven't got that far yet) anyway that is why I want to push for review on meta/config
- pushing directly to refs/meta/config works as expected, but I would prefer not to actually push the change to the branch (ie pollute the history with a trivial test)
- Is there some special permission that is required to push to meta/config for code review?
Is there a method to push a change to meta/config for code review using ssh that I have not properly considered? Or maybe I am off my rocker and this is simply not supported?
I hope someone can let me know.
Regards,
Robert Gregory