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