Show More
@@ -273,7 +273,7 b' class queue(object):' | |||||
273 | self.seriespath = "series" |
|
273 | self.seriespath = "series" | |
274 | self.statuspath = "status" |
|
274 | self.statuspath = "status" | |
275 | self.guardspath = "guards" |
|
275 | self.guardspath = "guards" | |
276 |
self.active |
|
276 | self.activeguards = None | |
277 | self.guards_dirty = False |
|
277 | self.guards_dirty = False | |
278 | # Handle mq.git as a bool with extended values |
|
278 | # Handle mq.git as a bool with extended values | |
279 | try: |
|
279 | try: | |
@@ -324,7 +324,7 b' class queue(object):' | |||||
324 | self.applied_dirty = 0 |
|
324 | self.applied_dirty = 0 | |
325 | self.series_dirty = 0 |
|
325 | self.series_dirty = 0 | |
326 | self.guards_dirty = False |
|
326 | self.guards_dirty = False | |
327 |
self.active |
|
327 | self.activeguards = None | |
328 |
|
328 | |||
329 | def diffopts(self, opts={}, patchfn=None): |
|
329 | def diffopts(self, opts={}, patchfn=None): | |
330 | diffopts = patchmod.diffopts(self.ui, opts) |
|
330 | diffopts = patchmod.diffopts(self.ui, opts) | |
@@ -411,12 +411,12 b' class queue(object):' | |||||
411 | raise util.Abort(bad) |
|
411 | raise util.Abort(bad) | |
412 | guards = sorted(set(guards)) |
|
412 | guards = sorted(set(guards)) | |
413 | self.ui.debug('active guards: %s\n' % ' '.join(guards)) |
|
413 | self.ui.debug('active guards: %s\n' % ' '.join(guards)) | |
414 |
self.active |
|
414 | self.activeguards = guards | |
415 | self.guards_dirty = True |
|
415 | self.guards_dirty = True | |
416 |
|
416 | |||
417 | def active(self): |
|
417 | def active(self): | |
418 |
if self.active |
|
418 | if self.activeguards is None: | |
419 |
self.active |
|
419 | self.activeguards = [] | |
420 | try: |
|
420 | try: | |
421 | guards = self.opener.read(self.guardspath).split() |
|
421 | guards = self.opener.read(self.guardspath).split() | |
422 | except IOError, err: |
|
422 | except IOError, err: | |
@@ -429,8 +429,8 b' class queue(object):' | |||||
429 | self.ui.warn('%s:%d: %s\n' % |
|
429 | self.ui.warn('%s:%d: %s\n' % | |
430 | (self.join(self.guardspath), i + 1, bad)) |
|
430 | (self.join(self.guardspath), i + 1, bad)) | |
431 | else: |
|
431 | else: | |
432 |
self.active |
|
432 | self.activeguards.append(guard) | |
433 |
return self.active |
|
433 | return self.activeguards | |
434 |
|
434 | |||
435 | def setguards(self, idx, guards): |
|
435 | def setguards(self, idx, guards): | |
436 | for g in guards: |
|
436 | for g in guards: | |
@@ -500,7 +500,7 b' class queue(object):' | |||||
500 | if self.series_dirty: |
|
500 | if self.series_dirty: | |
501 | write_list(self.fullseries, self.seriespath) |
|
501 | write_list(self.fullseries, self.seriespath) | |
502 | if self.guards_dirty: |
|
502 | if self.guards_dirty: | |
503 |
write_list(self.active |
|
503 | write_list(self.activeguards, self.guardspath) | |
504 | if self.added: |
|
504 | if self.added: | |
505 | qrepo = self.qrepo() |
|
505 | qrepo = self.qrepo() | |
506 | if qrepo: |
|
506 | if qrepo: |
General Comments 0
You need to be logged in to leave comments.
Login now