Creating a pull request for each commit

Hi,

Wondering if it’s possible to create a pull request for each commit to do review before approving commit. We are using hg-evolve extensions but we don’t see any “topic” inside rhodecode.
In the rhodecode settings (VCS - Mercurial settings: Set repositories as publishing is Unchecked and Enable Evolve and Topic extension is checked)
Thanks for help.

It is possible to create a pull request from a specific Mercurial commit. On the commits page, select a single commit and use “Open new pull request for selected commit.”

However, RhodeCode does not currently expose Mercurial Topics as selectable pull-request references. Enabling “Evolve and Topic” enables the server-side extensions and evolution data exchange, but it does not add a Topics
section to the RhodeCode UI.

For an updatable review workflow, we recommend pushing a separate Mercurial bookmark for each change and creating the pull request from that bookmark. A PR created directly from a commit hash is static. Also note that the PR
contains the complete difference between the target and the selected commit, so stacked commits may include their unmerged predecessors.

RhodeCode approvals apply to pull requests rather than approving Mercurial commits individually. Automatic creation of one PR per pushed commit would require API/hook-based automation.

How managing amend with pull request and bookmarks ?
I’m getting this error:
Missing commits: This pull request cannot be displayed, because one or more commits no longer exist in the source repository. Please update this pull request, push the commits back into the source repository, or consider closing this pull request. Consider doing a force update commits in case you think this is an error.

Hi,

This happens because hg amend creates a new Mercurial changeset and makes the previous one obsolete/hidden. If the pull request still points to the old commit hash, RhodeCode can no longer display it and shows “Missing
commits”.

For an amendable review workflow, please create the pull request from a Mercurial bookmark, not directly from a commit hash. The bookmark acts as a movable reference, similar to a Git branch.

Example workflow:

  hg bookmark review/my-change
  hg push -B review/my-change

Then create the pull request in RhodeCode from bookmark review/my-change.

After amending locally:

  hg amend
  hg push -B review/my-change --force

Then open the pull request in RhodeCode and use “Update commits”. If the PR already shows “Missing commits”, use the dropdown option “Force update commits” to refresh it against the current bookmark target.

A few important notes:

  • RhodeCode currently supports Mercurial bookmarks as pull request references.
  • Mercurial Topics are enabled server-side by the Evolve/Topic option, but Topics are not currently exposed as selectable pull request references in the RhodeCode UI.
  • A pull request created from a raw commit hash is static. After amend, that old hash may disappear from the visible source history, which leads to the missing commits message.
  • For one-review-per-change workflows, we recommend one bookmark per review/change.