comparison 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
comparison
equal deleted inserted replaced
16316:0f1e621d3d3b 16318:73f4e05287b4
1195 hg.update(repo, target) 1195 hg.update(repo, target)
1196 1196
1197 if move: 1197 if move:
1198 if not patch: 1198 if not patch:
1199 raise util.Abort(_("please specify the patch to move")) 1199 raise util.Abort(_("please specify the patch to move"))
1200 for i, rpn in enumerate(self.fullseries[start:]): 1200 for fullstart, rpn in enumerate(self.fullseries):
1201 # strip markers for patch guards
1202 if self.guard_re.split(rpn, 1)[0] == self.series[start]:
1203 break
1204 for i, rpn in enumerate(self.fullseries[fullstart:]):
1201 # strip markers for patch guards 1205 # strip markers for patch guards
1202 if self.guard_re.split(rpn, 1)[0] == patch: 1206 if self.guard_re.split(rpn, 1)[0] == patch:
1203 break 1207 break
1204 index = start + i 1208 index = fullstart + i
1205 assert index < len(self.fullseries) 1209 assert index < len(self.fullseries)
1206 fullpatch = self.fullseries[index] 1210 fullpatch = self.fullseries[index]
1207 del self.fullseries[index] 1211 del self.fullseries[index]
1208 self.fullseries.insert(start, fullpatch) 1212 self.fullseries.insert(fullstart, fullpatch)
1209 self.parseseries() 1213 self.parseseries()
1210 self.seriesdirty = True 1214 self.seriesdirty = True
1211 1215
1212 self.applieddirty = True 1216 self.applieddirty = True
1213 if start > 0: 1217 if start > 0: