hgext/mq.py
changeset 11717 a286a4ecbfeb
parent 11714 aae1dd12fce6
parent 11715 4f9dfb54c8b5
child 11730 7469ff872122
equal deleted inserted replaced
11714:aae1dd12fce6 11717:a286a4ecbfeb
  1049                 return 1
  1049                 return 1
  1050             if not force:
  1050             if not force:
  1051                 self.check_localchanges(repo)
  1051                 self.check_localchanges(repo)
  1052 
  1052 
  1053             if move:
  1053             if move:
  1054                 try:
  1054                 if not patch:
  1055                     index = self.series.index(patch, start)
  1055                     raise  util.Abort(_("please specify the patch to move"))
  1056                     fullpatch = self.full_series[index]
  1056                 for i, rpn in enumerate(self.full_series[start:]):
  1057                     del self.full_series[index]
  1057                     # strip markers for patch guards
  1058                 except ValueError:
  1058                     if self.guard_re.split(rpn, 1)[0] == patch:
  1059                     raise util.Abort(_("patch '%s' not found") % patch)
  1059                         break
       
  1060                 index = start + i
       
  1061                 assert index < len(self.full_series)
       
  1062                 fullpatch = self.full_series[index]
       
  1063                 del self.full_series[index]
  1060                 self.full_series.insert(start, fullpatch)
  1064                 self.full_series.insert(start, fullpatch)
  1061                 self.parse_series()
  1065                 self.parse_series()
  1062                 self.series_dirty = 1
  1066                 self.series_dirty = 1
  1063 
  1067 
  1064             self.applied_dirty = 1
  1068             self.applied_dirty = 1