##// END OF EJS Templates
store: refactor space delimited list to proper data structure...
Pulkit Goyal -
r45911:909dafff default
parent child Browse files
Show More
@@ -373,10 +373,18 b' def _calcmode(vfs):'
373 return mode
373 return mode
374
374
375
375
376 _data = (
376 _data = [
377 b'bookmarks narrowspec data meta 00manifest.d 00manifest.i'
377 b'bookmarks',
378 b' 00changelog.d 00changelog.i phaseroots obsstore'
378 b'narrowspec',
379 )
379 b'data',
380 b'meta',
381 b'00manifest.d',
382 b'00manifest.i',
383 b'00changelog.d',
384 b'00changelog.i',
385 b'phaseroots',
386 b'obsstore',
387 ]
380
388
381
389
382 def isrevlog(f, kind, st):
390 def isrevlog(f, kind, st):
@@ -447,7 +455,7 b' class basicstore(object):'
447 yield x
455 yield x
448
456
449 def copylist(self):
457 def copylist(self):
450 return [b'requires'] + _data.split()
458 return [b'requires'] + _data
451
459
452 def write(self, tr):
460 def write(self, tr):
453 pass
461 pass
@@ -494,9 +502,7 b' class encodedstore(basicstore):'
494 return self.path + b'/' + encodefilename(f)
502 return self.path + b'/' + encodefilename(f)
495
503
496 def copylist(self):
504 def copylist(self):
497 return [b'requires', b'00changelog.i'] + [
505 return [b'requires', b'00changelog.i'] + [b'store/' + f for f in _data]
498 b'store/' + f for f in _data.split()
499 ]
500
506
501
507
502 class fncache(object):
508 class fncache(object):
@@ -686,12 +692,20 b' class fncachestore(basicstore):'
686
692
687 def copylist(self):
693 def copylist(self):
688 d = (
694 d = (
689 b'bookmarks narrowspec data meta dh fncache phaseroots obsstore'
695 b'bookmarks',
690 b' 00manifest.d 00manifest.i 00changelog.d 00changelog.i'
696 b'narrowspec',
697 b'data',
698 b'meta',
699 b'dh',
700 b'fncache',
701 b'phaseroots',
702 b'obsstore',
703 b'00manifest.d',
704 b'00manifest.i',
705 b'00changelog.d',
706 b'00changelog.i',
691 )
707 )
692 return [b'requires', b'00changelog.i'] + [
708 return [b'requires', b'00changelog.i'] + [b'store/' + f for f in d]
693 b'store/' + f for f in d.split()
694 ]
695
709
696 def write(self, tr):
710 def write(self, tr):
697 self.fncache.write(tr)
711 self.fncache.write(tr)
General Comments 0
You need to be logged in to leave comments. Login now