Mercurial > hg
comparison hgext/mq.py @ 14578:28a2646f3b81
mq: rename set_active to setactive
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Mon, 13 Jun 2011 11:59:35 +0200 |
parents | 76357276662e |
children | f7b25764d974 |
comparison
equal
deleted
inserted
replaced
14577:76357276662e | 14578:28a2646f3b81 |
---|---|
402 (guard, first)) | 402 (guard, first)) |
403 for c in bad_chars: | 403 for c in bad_chars: |
404 if c in guard: | 404 if c in guard: |
405 return _('invalid character in guard %r: %r') % (guard, c) | 405 return _('invalid character in guard %r: %r') % (guard, c) |
406 | 406 |
407 def set_active(self, guards): | 407 def setactive(self, guards): |
408 for guard in guards: | 408 for guard in guards: |
409 bad = self.checkguard(guard) | 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)) |
2817 guards = q.active() | 2817 guards = q.active() |
2818 if args or opts.get('none'): | 2818 if args or opts.get('none'): |
2819 old_unapplied = q.unapplied(repo) | 2819 old_unapplied = q.unapplied(repo) |
2820 old_guarded = [i for i in xrange(len(q.applied)) if | 2820 old_guarded = [i for i in xrange(len(q.applied)) if |
2821 not q.pushable(i)[0]] | 2821 not q.pushable(i)[0]] |
2822 q.set_active(args) | 2822 q.setactive(args) |
2823 q.save_dirty() | 2823 q.save_dirty() |
2824 if not args: | 2824 if not args: |
2825 ui.status(_('guards deactivated\n')) | 2825 ui.status(_('guards deactivated\n')) |
2826 if not opts.get('pop') and not opts.get('reapply'): | 2826 if not opts.get('pop') and not opts.get('reapply'): |
2827 unapplied = q.unapplied(repo) | 2827 unapplied = q.unapplied(repo) |