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