I just notice that the reverse function in patch.applydiff used by hgshelve has been removed: changeset: 9393:23c4e772c172 user: Nicolas Dumazet <nicdumz.commits at gmail.com> date: Sun Aug 23 14:32:58 2009 +0200 summary: patch: remove the unused, broken reverse() function Any suggestion on how to fix this before 1.4?