Show More
@@ -392,7 +392,7 b' class queue(object):' | |||||
392 | self.series.append(patch) |
|
392 | self.series.append(patch) | |
393 | self.seriesguards.append(self.guard_re.findall(comment)) |
|
393 | self.seriesguards.append(self.guard_re.findall(comment)) | |
394 |
|
394 | |||
395 |
def check |
|
395 | def checkguard(self, guard): | |
396 | if not guard: |
|
396 | if not guard: | |
397 | return _('guard cannot be an empty string') |
|
397 | return _('guard cannot be an empty string') | |
398 | bad_chars = '# \t\r\n\f' |
|
398 | bad_chars = '# \t\r\n\f' | |
@@ -406,7 +406,7 b' class queue(object):' | |||||
406 |
|
406 | |||
407 | def set_active(self, guards): |
|
407 | def set_active(self, guards): | |
408 | for guard in guards: |
|
408 | for guard in guards: | |
409 |
bad = self.check |
|
409 | bad = self.checkguard(guard) | |
410 | if bad: |
|
410 | if bad: | |
411 | raise util.Abort(bad) |
|
411 | raise util.Abort(bad) | |
412 | guards = sorted(set(guards)) |
|
412 | guards = sorted(set(guards)) | |
@@ -424,7 +424,7 b' class queue(object):' | |||||
424 | raise |
|
424 | raise | |
425 | guards = [] |
|
425 | guards = [] | |
426 | for i, guard in enumerate(guards): |
|
426 | for i, guard in enumerate(guards): | |
427 |
bad = self.check |
|
427 | bad = self.checkguard(guard) | |
428 | if bad: |
|
428 | if bad: | |
429 | self.ui.warn('%s:%d: %s\n' % |
|
429 | self.ui.warn('%s:%d: %s\n' % | |
430 | (self.join(self.guards_path), i + 1, bad)) |
|
430 | (self.join(self.guards_path), i + 1, bad)) | |
@@ -438,7 +438,7 b' class queue(object):' | |||||
438 | raise util.Abort(_('guard %r too short') % g) |
|
438 | raise util.Abort(_('guard %r too short') % g) | |
439 | if g[0] not in '-+': |
|
439 | if g[0] not in '-+': | |
440 | raise util.Abort(_('guard %r starts with invalid char') % g) |
|
440 | raise util.Abort(_('guard %r starts with invalid char') % g) | |
441 |
bad = self.check |
|
441 | bad = self.checkguard(g[1:]) | |
442 | if bad: |
|
442 | if bad: | |
443 | raise util.Abort(bad) |
|
443 | raise util.Abort(bad) | |
444 | drop = self.guard_re.sub('', self.fullseries[idx]) |
|
444 | drop = self.guard_re.sub('', self.fullseries[idx]) |
General Comments 0
You need to be logged in to leave comments.
Login now