Transplant into workspace without commiting
hg transplant
always results in a new changeset in your repository.
However, you could:
- Use
hg export
andhg import --no-commit
instead OR - Use
hg transplant
and thenhg strip
if you don't like the changeset
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.