When the simplest way (a new hg clone
) isn’t practical, I use hg strip
:
% hg outgoing -l 1
% hg strip $rev # replace $rev with the revision number from outgoing
Repeat until hg outgoing
stays quiet. Note that hg strip $rev
obliterates $rev
and all its descendants.
Note that you may have to first enable strip
in your Mercurial settings.
PS: an even smarter approach is to use the revset language, and do:
% hg strip 'roots(outgoing())'