Page MenuHomePhabricator

"Move changes endpoint is disabled"
Closed, ResolvedPublic

Description

performance/debs/xhgui has three branches:

  • upstream: which is a mirror an external Github repository
  • wmf: for local changes we hope will eventually be merged upstream
  • master: containing Debian packaging

This is set up this way to work with git-buildpackage, which requires a "pristine" upstream branch and all local modifications as Quilt patches in the debian/patches subdirectory. Without the wmf branch, code review would have to take place against the patch file and not the original source, which is sub-optimal from a UI perspective.

I submitted CL 611448, which is based off of the tip of the wmf branch, however Gerrit is showing it as being based on master. I tried to use the "Move change" menu option, and Gerrit responded:

An error occurred
Could not perform action: move changes endpoint is disabled

Is this functionality intentionally disabled? If not, can we enable it?

If it is intentionally disabled, perhaps we could re-enable it only for repository owners, or for members of Gerrit Managers, or for repositories under performance/debs?

And if there's a good reason we should never be able to move changes from one branch to another, does anyone know how to submit a change on a branch other than master?

Event Timeline

Is this functionality intentionally disabled?

At this point: Yes, it is intentionally disabled.

See https://gerrit.wikimedia.org/r/Documentation/config-gerrit.html#change.move for examples on which may happen there.

Also, Move change currently does not rebase on the new branch, it simply switches the targe branch (and keeps parents as they were on the old branch) which is a disaster waiting to happen.

Move change is currently very rough, and I assume if you haven't had some decent exposure to git before, it'll bite you one way or the other.

That said, we can of course enable it anytime. So convince a Gerrit maintainer that the benefits outweight the issues, and I'm sure you'll get it turned on promptly.

If not, can we enable it?

Sadly enough, one cannot enable it "for a project", or "for a user". One can enable/disable it only for the whole Gerrit server. Since from my point of view the problems with Move change currently outweigh the benefits, I've initially turned it off. At least until there was a discussion about whether it'd be useful for a wider audience.

[...] does anyone know how to submit a change on a branch other than master?

If you use git-review, you might be looking for https://www.mediawiki.org/wiki/Gerrit/Tutorial#Push_to_a_branch_different_than_master
If you use plain git, git push gerrit HEAD:refs/for/wmf would push HEAD for review on the wmf branch.

If that does not help, which tool (git, git-review, ...) and command do you use to bring your commits to Gerrit?

dpifke claimed this task.

If you use git-review, you might be looking for https://www.mediawiki.org/wiki/Gerrit/Tutorial#Push_to_a_branch_different_than_master
If you use plain git, git push gerrit HEAD:refs/for/wmf would push HEAD for review on the wmf branch.

If that does not help, which tool (git, git-review, ...) and command do you use to bring your commits to Gerrit?

Apparently my beef is with git-review, not Gerrit. Thanks for the pointer; I mistakenly assumed it would figure out the target branch by looking at descendant commits on my local tree (namely, that the preceding commit was the tip of gerrit/wmf, and gerrit/master appears nowhere in the history).

Trying to push the same commit again to the correct branch resulted in "no new changes," but editing the commit message and deleting the Change-Id allowed me to re-upload it, with the correct branch.

This accomplishes what I needed from Move Changes, so I'm marking this issue resolved. Appreciate the help.