equal
deleted
inserted
replaced
268 self.opener = scmutil.opener(self.path) |
268 self.opener = scmutil.opener(self.path) |
269 self.ui = ui |
269 self.ui = ui |
270 self.applied_dirty = 0 |
270 self.applied_dirty = 0 |
271 self.series_dirty = 0 |
271 self.series_dirty = 0 |
272 self.added = [] |
272 self.added = [] |
273 self.series_path = "series" |
273 self.seriespath = "series" |
274 self.status_path = "status" |
274 self.status_path = "status" |
275 self.guards_path = "guards" |
275 self.guards_path = "guards" |
276 self.active_guards = None |
276 self.active_guards = 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 |
301 return list(parselines(lines)) |
301 return list(parselines(lines)) |
302 return [] |
302 return [] |
303 |
303 |
304 @util.propertycache |
304 @util.propertycache |
305 def fullseries(self): |
305 def fullseries(self): |
306 if os.path.exists(self.join(self.series_path)): |
306 if os.path.exists(self.join(self.seriespath)): |
307 return self.opener.read(self.series_path).splitlines() |
307 return self.opener.read(self.seriespath).splitlines() |
308 return [] |
308 return [] |
309 |
309 |
310 @util.propertycache |
310 @util.propertycache |
311 def series(self): |
311 def series(self): |
312 self.parseseries() |
312 self.parseseries() |
386 comment = l[h:] |
386 comment = l[h:] |
387 patch = patch.strip() |
387 patch = patch.strip() |
388 if patch: |
388 if patch: |
389 if patch in self.series: |
389 if patch in self.series: |
390 raise util.Abort(_('%s appears more than once in %s') % |
390 raise util.Abort(_('%s appears more than once in %s') % |
391 (patch, self.join(self.series_path))) |
391 (patch, self.join(self.seriespath))) |
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 checkguard(self, guard): |
395 def checkguard(self, guard): |
396 if not guard: |
396 if not guard: |
496 fp.write("%s\n" % i) |
496 fp.write("%s\n" % i) |
497 fp.close() |
497 fp.close() |
498 if self.applied_dirty: |
498 if self.applied_dirty: |
499 write_list(map(str, self.applied), self.status_path) |
499 write_list(map(str, self.applied), self.status_path) |
500 if self.series_dirty: |
500 if self.series_dirty: |
501 write_list(self.fullseries, self.series_path) |
501 write_list(self.fullseries, self.seriespath) |
502 if self.guards_dirty: |
502 if self.guards_dirty: |
503 write_list(self.active_guards, self.guards_path) |
503 write_list(self.active_guards, self.guards_path) |
504 if self.added: |
504 if self.added: |
505 qrepo = self.qrepo() |
505 qrepo = self.qrepo() |
506 if qrepo: |
506 if qrepo: |
1591 for root, dirs, files in os.walk(self.path): |
1591 for root, dirs, files in os.walk(self.path): |
1592 d = root[len(self.path) + 1:] |
1592 d = root[len(self.path) + 1:] |
1593 for f in files: |
1593 for f in files: |
1594 fl = os.path.join(d, f) |
1594 fl = os.path.join(d, f) |
1595 if (fl not in self.series and |
1595 if (fl not in self.series and |
1596 fl not in (self.status_path, self.series_path, |
1596 fl not in (self.status_path, self.seriespath, |
1597 self.guards_path) |
1597 self.guards_path) |
1598 and not fl.startswith('.')): |
1598 and not fl.startswith('.')): |
1599 msng_list.append(fl) |
1599 msng_list.append(fl) |
1600 for x in sorted(msng_list): |
1600 for x in sorted(msng_list): |
1601 pfx = self.ui.verbose and ('D ') or '' |
1601 pfx = self.ui.verbose and ('D ') or '' |