Transplantation into the workspace without commission

Is there a way to transplant one set of changes without commits? I would like to be able to review the changes before committing.

+4
source share
2 answers

hg transplant always leads to the creation of a new set of changes in your repository.

However, you could:

+6
source

Found this question when searching for "graft without fixation."

I found that I can do what I want by updating the changeset where I want the changes to be on top, and then using the "hg revert" command.

So, if I have a change set of "R1", then I commit to "R2". I can revert the R2 changes to the working directory by doing:

  • hg update -r R1 <- (this puts your working directory in the exact state you want to start from)
  • hg revert --all -r R2 <- (this applies to changes to R2 in the working directory without making these changes)

You can then delete the R2 change set if you want, or do what you want.

+2
source

All Articles