##// END OF EJS Templates
store: rename `unencoded_path` to `entry_path` for StoreEntry...
marmoute -
r51388:ed8cda1c default
parent child Browse files
Show More
@@ -163,7 +163,7 b' def onetimesetup(ui):'
163 n = util.pconvert(fp[striplen:])
163 n = util.pconvert(fp[striplen:])
164 d = store.decodedir(n)
164 d = store.decodedir(n)
165 yield store.SimpleStoreEntry(
165 yield store.SimpleStoreEntry(
166 unencoded_path=d,
166 entry_path=d,
167 is_volatile=False,
167 is_volatile=False,
168 file_size=st.st_size,
168 file_size=st.st_size,
169 )
169 )
@@ -464,24 +464,24 b' class BaseStoreEntry:'
464
464
465 This is returned by `store.walk` and represent some data in the store."""
465 This is returned by `store.walk` and represent some data in the store."""
466
466
467 unencoded_path = attr.ib()
467 _entry_path = attr.ib()
468 _is_volatile = attr.ib(default=False)
468 _is_volatile = attr.ib(default=False)
469 _file_size = attr.ib(default=None)
469 _file_size = attr.ib(default=None)
470
470
471 def __init__(
471 def __init__(
472 self,
472 self,
473 unencoded_path,
473 entry_path,
474 is_volatile=False,
474 is_volatile=False,
475 file_size=None,
475 file_size=None,
476 ):
476 ):
477 self.unencoded_path = unencoded_path
477 self._entry_path = entry_path
478 self._is_volatile = is_volatile
478 self._is_volatile = is_volatile
479 self._file_size = file_size
479 self._file_size = file_size
480
480
481 def files(self):
481 def files(self):
482 return [
482 return [
483 StoreFile(
483 StoreFile(
484 unencoded_path=self.unencoded_path,
484 unencoded_path=self._entry_path,
485 file_size=self._file_size,
485 file_size=self._file_size,
486 is_volatile=self._is_volatile,
486 is_volatile=self._is_volatile,
487 )
487 )
@@ -506,7 +506,7 b' class RevlogStoreEntry(BaseStoreEntry):'
506
506
507 def __init__(
507 def __init__(
508 self,
508 self,
509 unencoded_path,
509 entry_path,
510 revlog_type,
510 revlog_type,
511 target_id,
511 target_id,
512 is_revlog_main=False,
512 is_revlog_main=False,
@@ -514,7 +514,7 b' class RevlogStoreEntry(BaseStoreEntry):'
514 file_size=None,
514 file_size=None,
515 ):
515 ):
516 super().__init__(
516 super().__init__(
517 unencoded_path=unencoded_path,
517 entry_path=entry_path,
518 is_volatile=is_volatile,
518 is_volatile=is_volatile,
519 file_size=file_size,
519 file_size=file_size,
520 )
520 )
@@ -524,7 +524,7 b' class RevlogStoreEntry(BaseStoreEntry):'
524
524
525 def main_file_path(self):
525 def main_file_path(self):
526 """unencoded path of the main revlog file"""
526 """unencoded path of the main revlog file"""
527 return self.unencoded_path
527 return self._entry_path
528
528
529
529
530 @attr.s(slots=True)
530 @attr.s(slots=True)
@@ -656,7 +656,7 b' class basicstore:'
656 u = revlog + ext
656 u = revlog + ext
657 revlog_target_id = revlog.split(b'/', 1)[1]
657 revlog_target_id = revlog.split(b'/', 1)[1]
658 yield RevlogStoreEntry(
658 yield RevlogStoreEntry(
659 unencoded_path=u,
659 entry_path=u,
660 revlog_type=rl_type,
660 revlog_type=rl_type,
661 target_id=revlog_target_id,
661 target_id=revlog_target_id,
662 is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN),
662 is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN),
@@ -679,7 +679,7 b' class basicstore:'
679 manifestlogs[name][ext] = (t, s)
679 manifestlogs[name][ext] = (t, s)
680 else:
680 else:
681 yield SimpleStoreEntry(
681 yield SimpleStoreEntry(
682 unencoded_path=u,
682 entry_path=u,
683 is_volatile=bool(t & FILEFLAGS_VOLATILE),
683 is_volatile=bool(t & FILEFLAGS_VOLATILE),
684 file_size=s,
684 file_size=s,
685 )
685 )
@@ -697,7 +697,7 b' class basicstore:'
697 for ext, (t, s) in sorted(details.items(), key=key):
697 for ext, (t, s) in sorted(details.items(), key=key):
698 u = revlog + ext
698 u = revlog + ext
699 yield RevlogStoreEntry(
699 yield RevlogStoreEntry(
700 unencoded_path=u,
700 entry_path=u,
701 revlog_type=revlog_type,
701 revlog_type=revlog_type,
702 target_id=b'',
702 target_id=b'',
703 is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN),
703 is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN),
@@ -995,7 +995,7 b' class fncachestore(basicstore):'
995 for ext, t in sorted(details.items()):
995 for ext, t in sorted(details.items()):
996 f = revlog + ext
996 f = revlog + ext
997 entry = RevlogStoreEntry(
997 entry = RevlogStoreEntry(
998 unencoded_path=f,
998 entry_path=f,
999 revlog_type=rl_type,
999 revlog_type=rl_type,
1000 target_id=revlog_target_id,
1000 target_id=revlog_target_id,
1001 is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN),
1001 is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN),
General Comments 0
You need to be logged in to leave comments. Login now