Using Mercurial, is it possible to see multiple commits in a PR (Pull Request)?

115 views Asked by At

Using git and GitHub, I was able to work on one feature, using a branch, and commit and push, let's say 12 commits to a PR (Pull Request) on GitHub, and then reviewers can see the final diff with all 12 commits, or see each commit, so as to see how I made it barely working, and then each refinement one after another. (or maybe bug fix or refactoring).

However, at my company now, we are using Mercurial, and it seems I have to use hg amend to do it. But this way, the intermediate commits cannot be viewed independently.

If I commit one after another, the diff would show up as 2 or more Diffs, instead of one big diff for the PR. I cannot really ask team members to review my PR by going through 12 Diffs so I have to use hg amend and make it one Diff without the ability to see intermediate Diffs. Is this how Mercurial works, or is it just how the PR is set up for the Mercurial? That is, it really can work like how GitHub works too? (I think the diffs are shown by Phabricator but I am not entirely sure).

1

There are 1 answers

1
Lazy Badger On
  1. PRs (and MRs) are just fully GitHub additions, didn't existed as separate entities in pure Git before, and have to be supported by git-clients due to "git is github", a common but completely erroneous notion today
  2. hg commit --amend or hg amend from evolve aren't and can't be hg-equivalent of PRs by concept (squashing instead of adding external history)
  3. In pure Mercurial-way you can use hg in --bundle FILE FORK for getting changes from FORK-URL and inspecting changes in form of set of changesets or as one changeset with relevant hg diff in GUI or console and pull (or drop bundle) into repo after review