##// END OF EJS Templates
mq: rename find_series to findseries
Adrian Buehlmann -
r14574:12fba7bc default
parent child Browse files
Show More
@@ -360,7 +360,7 b' class queue(object):'
360 def join(self, *p):
360 def join(self, *p):
361 return os.path.join(self.path, *p)
361 return os.path.join(self.path, *p)
362
362
363 def find_series(self, patch):
363 def findseries(self, patch):
364 def matchpatch(l):
364 def matchpatch(l):
365 l = l.split('#', 1)[0]
365 l = l.split('#', 1)[0]
366 return l.strip() == patch
366 return l.strip() == patch
@@ -746,7 +746,7 b' class queue(object):'
746
746
747 unknown = []
747 unknown = []
748
748
749 for (i, p) in sorted([(self.find_series(p), p) for p in patches],
749 for (i, p) in sorted([(self.findseries(p), p) for p in patches],
750 reverse=True):
750 reverse=True):
751 if i is not None:
751 if i is not None:
752 del self.fullseries[i]
752 del self.fullseries[i]
@@ -1696,7 +1696,7 b' class queue(object):'
1696 def full_series_end(self):
1696 def full_series_end(self):
1697 if self.applied:
1697 if self.applied:
1698 p = self.applied[-1].name
1698 p = self.applied[-1].name
1699 end = self.find_series(p)
1699 end = self.findseries(p)
1700 if end is None:
1700 if end is None:
1701 return len(self.fullseries)
1701 return len(self.fullseries)
1702 return end + 1
1702 return end + 1
@@ -2451,7 +2451,7 b' def guard(ui, repo, *args, **opts):'
2451 if patch is None:
2451 if patch is None:
2452 raise util.Abort(_('no patch to work with'))
2452 raise util.Abort(_('no patch to work with'))
2453 if args or opts.get('none'):
2453 if args or opts.get('none'):
2454 idx = q.find_series(patch)
2454 idx = q.findseries(patch)
2455 if idx is None:
2455 if idx is None:
2456 raise util.Abort(_('no patch named %s') % patch)
2456 raise util.Abort(_('no patch named %s') % patch)
2457 q.set_guards(idx, args)
2457 q.set_guards(idx, args)
@@ -2593,7 +2593,7 b' def rename(ui, repo, patch, name=None, *'
2593 q.checkpatchname(name)
2593 q.checkpatchname(name)
2594
2594
2595 ui.note(_('renaming %s to %s\n') % (patch, name))
2595 ui.note(_('renaming %s to %s\n') % (patch, name))
2596 i = q.find_series(patch)
2596 i = q.findseries(patch)
2597 guards = q.guard_re.findall(q.fullseries[i])
2597 guards = q.guard_re.findall(q.fullseries[i])
2598 q.fullseries[i] = name + ''.join([' #' + g for g in guards])
2598 q.fullseries[i] = name + ''.join([' #' + g for g in guards])
2599 q.parse_series()
2599 q.parse_series()
General Comments 0
You need to be logged in to leave comments. Login now