Hi,
I'm looking for a way to land patches on release branches without checking out to that branch. Then I came accross git-cherry-pick-upload, which seemed like what I needed. So I started as follows, hoping that it would give the results equivalent to following the
instructions of the git-drover man page:
git cherry-pick-upload 1db473b2e3b66646a7470e543540a44e854cd8f7 -b 2490
Unfortunately, this tool seems not maintained, used or tested, because the script throws an error when run (this is caused by an incomplete refactor at
https://codereview.chromium.org/1075723002), which can be fixed by a small change to the cherry_pick function:
- auth_config = auth.extract_auth_config_from_options
+ auth_config = auth.extract_auth_config_from_options(options)
The next problem is that the project is set to "chromium@2490" instead of "chromium". Well, after the following change, the project was correctly set:
- ('project', '%s@%s' % (config('rietveld.project'), target_branch)),
+ ('project', config('rietveld.project')),
There are three more issues for which I haven't found a resolution yet, that's why I'm asking for some advice.
1. At this point, the CL created by the modified git_cherry_pick_upload.py script is identical to the result of the steps at the git-drover manual page (as seen at the codereview site), except for the "Target Ref". This should be refs/pending/branch-heads/2490, but it is not shown. The existing --target_ref logic in git_cl.py might be useful, but I didn't look into this.
3. After going through the hassle of uploading the CL, I found that there is no way to use git cl land to land the CL, unless you check out to the branch from where the CL was created. This defeats the point of my efforts: I want to be able to land trivial patches on release branches without switching local branches.