Mercurial > hg
diff hgext/mq.py @ 16318:73f4e05287b4
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 30 Mar 2012 14:35:06 -0500 |
parents | 9952ac7e0968 7ee8aa662937 |
children | 5d61e007d957 |
line wrap: on
line diff
--- a/hgext/mq.py Thu Mar 29 22:42:03 2012 +0200 +++ b/hgext/mq.py Fri Mar 30 14:35:06 2012 -0500 @@ -1197,15 +1197,19 @@ if move: if not patch: raise util.Abort(_("please specify the patch to move")) - for i, rpn in enumerate(self.fullseries[start:]): + for fullstart, rpn in enumerate(self.fullseries): + # strip markers for patch guards + if self.guard_re.split(rpn, 1)[0] == self.series[start]: + break + for i, rpn in enumerate(self.fullseries[fullstart:]): # strip markers for patch guards if self.guard_re.split(rpn, 1)[0] == patch: break - index = start + i + index = fullstart + i assert index < len(self.fullseries) fullpatch = self.fullseries[index] del self.fullseries[index] - self.fullseries.insert(start, fullpatch) + self.fullseries.insert(fullstart, fullpatch) self.parseseries() self.seriesdirty = True