Mercurial > hg
changeset 11438:88fc876a4833 stable
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.
author | Gilles Moris <gilles.moris@free.fr> |
---|---|
date | Tue, 22 Jun 2010 09:49:51 +0200 |
parents | 9fa255c32406 |
children | 778377be3662 |
files | hgext/mq.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Wed Jun 23 17:50:27 2010 -0300 +++ b/hgext/mq.py Tue Jun 22 09:49:51 2010 +0200 @@ -1046,10 +1046,12 @@ 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