2

is there an easy way to export last n commits into a new mq queue and strip the commits from the real repository?

I do often start out developing a new feature, later realising I did something wrong/would want to use MQ to fold patches.

I am currently doing:

  1. Export last n commits as single patches
  2. Strip last n commits
  3. create new mq
  4. import all patches in reverse order
Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
Johannes Rudolph
  • 35,298
  • 14
  • 114
  • 172

1 Answers1

8

It's simple (as long as there are no merges):

hg qimport -r base:tip

And voilà.

tonfa
  • 24,151
  • 2
  • 35
  • 41
  • Your tip has served me well up until now. However I just hit the caveat you mentioned (as long as there are no merges). What can I do in this case? – Johannes Rudolph Jan 28 '10 at 11:07