Steve Borho wrote: > > > On Sun, Oct 4, 2009 at 2:41 AM, Henrik Stuart <h...@hstuart.dk > <mailto:h...@hstuart.dk>> wrote: > > # HG changeset patch > # User Henrik Stuart <h...@hstuart.dk <mailto:h...@hstuart.dk>> > # Date 1254566131 -7200 > # Node ID f396663a7c57d5cb0e40431c0528e5b638cedf05 > # Parent 79e07253b8223e18bf694c48956c92a816f4d13c > history: disable strip and qimport on mq and mq ancestor changesets > > Previously repositories with mq changesets applied could have them > stripped > causing mq to go into a "bad" state that would require manual update > of the mq > state file to reflect the modified layout of the repository. This > fix makes it > impossible to strip or qimport an ancestor to an applied mq changeset. > > diff -r 79e07253b822 -r f396663a7c57 tortoisehg/hgtk/history.py > --- a/tortoisehg/hgtk/history.py Sat Oct 03 20:31:23 2009 -0500 > +++ b/tortoisehg/hgtk/history.py Sat Oct 03 12:35:31 2009 +0200 > @@ -609,8 +609,23 @@ > > # need mq extension for strip command > if 'mq' in self.exs: > - m.append(create_menu(_('qimport'), self.qimport_rev)) > - m.append(create_menu(_('strip revision'), self.strip_rev)) > + cmenu_qimport = create_menu(_('qimport'), self.qimport_rev) > + cmenu_strip = create_menu(_('strip revision'), > self.strip_rev) > + > + try: > + ctx = self.repo[self.currevid] > + qbase = self.repo['qbase'] > + actx = ctx.ancestor(qbase) > + if actx == qbase or actx == ctx: > + # we're in the mq revision range or the mq > + # is a descendant of us > + cmenu_qimport.set_sensitive(False) > + cmenu_strip.set_sensitive(False) > + except: > + pass > + > + m.append(cmenu_qimport) > + m.append(cmenu_strip) > > > I'll push this, since the strip protection is pretty important. But > don't you want to be able to qimport qparent and below?
Well, I suppose one could argue that it should be OK to qimport qparent (it's the only one that can be imported as the code is now, iirc). I can submit a patch that only sets qimport inactive, if you prefer (or you can just incorporate it). -- Kind regards, Henrik Stuart ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop