[PATCH 2 of 3] repair: remove undo files after strip

Idan Kamara idankk86 at gmail.com
Mon Mar 5 18:29:54 CST 2012


On Tue, Mar 6, 2012 at 1:09 AM, Matt Mackall <mpm at selenic.com> wrote:

> On Mon, 2012-03-05 at 23:47 +0200, Idan Kamara wrote:
> > # HG changeset patch
> > # User Idan Kamara <idankk86 at gmail.com>
> > # Date 1330984038 -7200
> > # Node ID 19f96222a187fa9f61b550f21c17a3218b6bf076
> > # Parent  a0be2a126eee7535674f541518c198e598ed852e
> > repair: remove undo files after strip
> >
> > diff --git a/mercurial/repair.py b/mercurial/repair.py
> > --- a/mercurial/repair.py
> > +++ b/mercurial/repair.py
> > @@ -56,7 +56,7 @@
> >
> >  def strip(ui, repo, node, backup="all"):
> >      cl = repo.changelog
> > -    # TODO delete the undo files, and handle undo of merge sets
> > +    # TODO handle undo of merge sets
> >      striprev = cl.rev(node)
> >
> >      keeppartialbundle = backup == 'strip'
> > @@ -154,6 +154,14 @@
> >                      % chgrpfile)
> >          raise
>
> Can we successfully undo if we reach this point? If not, we want to move
> the undo removal block up.


Tried moving it after the transaction closes, but then took me a while to
notice
that a few lines below repo.addchangegroup creates a transaction as well.

I familiarized myself with transactions just today so not sure if there's a
better
way to handle this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120306/4ec6e5aa/attachment.html>


More information about the Mercurial-devel mailing list