Concatenating multiple changesets into one

(See also [:EditingHistory])

Problem

Suppose you want to concatenate the last k changesets of a [:Repository:repository]

into a single, combined changeset

Solution

Execute the following steps:

1: hg update R

2: hg revert -r tip --all

3: hg ci -m "Combine changesets R+1..R+k"

4: hg clone -r tip oldrepo newrepo


CategoryTipsAndTricks