diff -r c23c62209cc4 -r 9c78ed396075 hgext/rebase.py --- a/hgext/rebase.py Mon Oct 14 16:49:54 2013 +0200 +++ b/hgext/rebase.py Mon Oct 14 16:12:29 2013 +0200 @@ -359,6 +359,13 @@ # this should probably be cleaned up targetnode = repo[target].node() + # restore original working directory + # (we do this before stripping) + newwd = state.get(originalwd, originalwd) + if newwd not in [c.rev() for c in repo[None].parents()]: + ui.note(_("update back to initial working directory parent\n")) + hg.updaterepo(repo, newwd, False) + if not keepf: collapsedas = None if collapsef: