# HG changeset patch # User Gilles Moris # Date 2010-06-22 07:49:51 # Node ID 88fc876a483386d3570568447cd131474d35133d # Parent 9fa255c324065b673caf3ef6374eb8da8cb42341 mq: fix qpush --move for selected guarded patches In the case of guarded patch, the patch could not be found because the full_series list contains also the guard value appended to each patch name. As we already checked that the patch is pushable above in the code, we just have to use the series list (which doesn't contains guard value) to get the patch index. diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1046,10 +1046,12 @@ class queue(object): if move: try: - del self.full_series[self.full_series.index(patch, start)] + index = self.series.index(patch, start) + fullpatch = self.full_series[index] + del self.full_series[index] except ValueError: raise util.Abort(_("patch '%s' not found") % patch) - self.full_series.insert(start, patch) + self.full_series.insert(start, fullpatch) self.parse_series() self.series_dirty = 1