Show More
@@ -503,12 +503,14 b' class RevlogStoreEntry(BaseStoreEntry):' | |||||
503 |
|
503 | |||
504 | is_revlog = True |
|
504 | is_revlog = True | |
505 | revlog_type = attr.ib(default=None) |
|
505 | revlog_type = attr.ib(default=None) | |
|
506 | target_id = attr.ib(default=None) | |||
506 | is_revlog_main = attr.ib(default=None) |
|
507 | is_revlog_main = attr.ib(default=None) | |
507 |
|
508 | |||
508 | def __init__( |
|
509 | def __init__( | |
509 | self, |
|
510 | self, | |
510 | unencoded_path, |
|
511 | unencoded_path, | |
511 | revlog_type, |
|
512 | revlog_type, | |
|
513 | target_id, | |||
512 | is_revlog_main=False, |
|
514 | is_revlog_main=False, | |
513 | is_volatile=False, |
|
515 | is_volatile=False, | |
514 | file_size=None, |
|
516 | file_size=None, | |
@@ -519,6 +521,7 b' class RevlogStoreEntry(BaseStoreEntry):' | |||||
519 | file_size=file_size, |
|
521 | file_size=file_size, | |
520 | ) |
|
522 | ) | |
521 | self.revlog_type = revlog_type |
|
523 | self.revlog_type = revlog_type | |
|
524 | self.target_id = target_id | |||
522 | self.is_revlog_main = is_revlog_main |
|
525 | self.is_revlog_main = is_revlog_main | |
523 |
|
526 | |||
524 |
|
527 | |||
@@ -649,9 +652,11 b' class basicstore:' | |||||
649 | for revlog, details in _gather_revlog(files): |
|
652 | for revlog, details in _gather_revlog(files): | |
650 | for ext, (t, s) in sorted(details.items()): |
|
653 | for ext, (t, s) in sorted(details.items()): | |
651 | u = revlog + ext |
|
654 | u = revlog + ext | |
|
655 | revlog_target_id = revlog.split(b'/', 1)[1] | |||
652 | yield RevlogStoreEntry( |
|
656 | yield RevlogStoreEntry( | |
653 | unencoded_path=u, |
|
657 | unencoded_path=u, | |
654 | revlog_type=rl_type, |
|
658 | revlog_type=rl_type, | |
|
659 | target_id=revlog_target_id, | |||
655 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), |
|
660 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), | |
656 | is_volatile=bool(t & FILEFLAGS_VOLATILE), |
|
661 | is_volatile=bool(t & FILEFLAGS_VOLATILE), | |
657 | file_size=s, |
|
662 | file_size=s, | |
@@ -692,6 +697,7 b' class basicstore:' | |||||
692 | yield RevlogStoreEntry( |
|
697 | yield RevlogStoreEntry( | |
693 | unencoded_path=u, |
|
698 | unencoded_path=u, | |
694 | revlog_type=revlog_type, |
|
699 | revlog_type=revlog_type, | |
|
700 | target_id=b'', | |||
695 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), |
|
701 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), | |
696 | is_volatile=bool(t & FILEFLAGS_VOLATILE), |
|
702 | is_volatile=bool(t & FILEFLAGS_VOLATILE), | |
697 | file_size=s, |
|
703 | file_size=s, | |
@@ -975,8 +981,12 b' class fncachestore(basicstore):' | |||||
975 | for revlog, details in by_revlog: |
|
981 | for revlog, details in by_revlog: | |
976 | if revlog.startswith(b'data/'): |
|
982 | if revlog.startswith(b'data/'): | |
977 | rl_type = FILEFLAGS_FILELOG |
|
983 | rl_type = FILEFLAGS_FILELOG | |
|
984 | revlog_target_id = revlog.split(b'/', 1)[1] | |||
978 | elif revlog.startswith(b'meta/'): |
|
985 | elif revlog.startswith(b'meta/'): | |
979 | rl_type = FILEFLAGS_MANIFESTLOG |
|
986 | rl_type = FILEFLAGS_MANIFESTLOG | |
|
987 | # drop the initial directory and the `00manifest` file part | |||
|
988 | tmp = revlog.split(b'/', 1)[1] | |||
|
989 | revlog_target_id = tmp.rsplit(b'/', 1)[0] + b'/' | |||
980 | else: |
|
990 | else: | |
981 | # unreachable |
|
991 | # unreachable | |
982 | assert False, revlog |
|
992 | assert False, revlog | |
@@ -987,6 +997,7 b' class fncachestore(basicstore):' | |||||
987 | yield RevlogStoreEntry( |
|
997 | yield RevlogStoreEntry( | |
988 | unencoded_path=f, |
|
998 | unencoded_path=f, | |
989 | revlog_type=rl_type, |
|
999 | revlog_type=rl_type, | |
|
1000 | target_id=revlog_target_id, | |||
990 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), |
|
1001 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), | |
991 | is_volatile=bool(t & FILEFLAGS_VOLATILE), |
|
1002 | is_volatile=bool(t & FILEFLAGS_VOLATILE), | |
992 | ) |
|
1003 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now