When I make a pull request, an issue is found with it that I need to fix before it can be merged, and I fix the issue by amending a commit of the pull request (rather than adding another commit on top), then I am unable to update the pull request to include the new commit.
Steps to reproduce:
- Create repository “prupdate” on Bitbucket
~$ hg init prupdate ~$ cd prupdate ~/prupdate$ echo "Hello" > hello.txt ~/prupdate$ hg add hello.txt ~/prupdate$ hg ci -m "Initial" ~/prupdate$ hg push https://email@example.com/cwalther/prupdate
Fork prupdate as “prupdatefork” on Bitbucket
Create a flawed feature branch:
~/prupdate$ echo "Hello Wold" > hello.txt ~/prupdate$ hg branch feature ~/prupdate$ hg ci -m "Greet the world" ~/prupdate$ hg push --new-branch -r 1 https://firstname.lastname@example.org/cwalther/prupdatefork
Create a pull request asking to merge prupdatefork:feature into prupdate:default
Fix the typo discovered in the pull request review by creating an amended version of the flawed commit:
~/prupdate$ hg up 0 ~/prupdate$ echo "Hello World" > hello.txt ~/prupdate$ hg branch --force feature ~/prupdate$ hg ci -m "Greet the world" ~/prupdate$ hg push --force -r 2 https://email@example.com/cwalther/prupdatefork
Strip the replaced revision 1 from Bitbucket
- Attempt to edit the pull request to switch it from the flawed to the fixed revision
There should be an “Edit” button on the pull request page.
There is no “Edit” button, the pull request cannot be updated.
1. – 6. as above
7. Do not strip the superseded revision, but leave it on Bitbucket (branch “feature” has two heads now)
8. Push the “Edit” button on the pull request page (which is still there this time, good)
9. Open the source branch popup to attempt to switch from the flawed to the fixed head
There should be two entries for the two heads of branch “feature” in the popup.
There is only one “feature” entry, and it seems to still refer to the old head, as when I choose it and save the pull request, nothing happens.