1198 hg.update(repo, target) |
1198 hg.update(repo, target) |
1199 |
1199 |
1200 if move: |
1200 if move: |
1201 if not patch: |
1201 if not patch: |
1202 raise util.Abort(_("please specify the patch to move")) |
1202 raise util.Abort(_("please specify the patch to move")) |
1203 for i, rpn in enumerate(self.fullseries[start:]): |
1203 for fullstart, rpn in enumerate(self.fullseries): |
|
1204 # strip markers for patch guards |
|
1205 if self.guard_re.split(rpn, 1)[0] == self.series[start]: |
|
1206 break |
|
1207 for i, rpn in enumerate(self.fullseries[fullstart:]): |
1204 # strip markers for patch guards |
1208 # strip markers for patch guards |
1205 if self.guard_re.split(rpn, 1)[0] == patch: |
1209 if self.guard_re.split(rpn, 1)[0] == patch: |
1206 break |
1210 break |
1207 index = start + i |
1211 index = fullstart + i |
1208 assert index < len(self.fullseries) |
1212 assert index < len(self.fullseries) |
1209 fullpatch = self.fullseries[index] |
1213 fullpatch = self.fullseries[index] |
1210 del self.fullseries[index] |
1214 del self.fullseries[index] |
1211 self.fullseries.insert(start, fullpatch) |
1215 self.fullseries.insert(fullstart, fullpatch) |
1212 self.parseseries() |
1216 self.parseseries() |
1213 self.seriesdirty = True |
1217 self.seriesdirty = True |
1214 |
1218 |
1215 self.applieddirty = True |
1219 self.applieddirty = True |
1216 if start > 0: |
1220 if start > 0: |