Is there a way to have transplant a single changeset without commiting? I'd like to be able to review the changes prior to doing a commit.
Transplant into workspace without commiting
2.7k Views Asked by Robert Jeppesen At
2
There are 2 best solutions below
1

Found this question when searching for "graft without commit".
I've found I can do what I want by updating to the changeset where I want the changes to be on top of, then using the "hg revert" command.
So if I have changeset "R1" then I commit a "R2" I can put the R2 changes back into the working directory by doing:
- hg update -r R1 <-- (this puts your working directory in exact state you want to start from)
- hg revert --all -r R2 <-- (this applies the changes in R2 to the working directory, without committing those changes)
You can then strip the R2 changeset if you want or do whatever you want.
hg transplant
always results in a new changeset in your repository.However, you could:
hg export
andhg import --no-commit
instead ORhg transplant
and thenhg strip
if you don't like the changeset