Show More
@@ -103,6 +103,7 from .utils import ( | |||
|
103 | 103 | ) |
|
104 | 104 | |
|
105 | 105 | from .revlogutils import ( |
|
106 | constants as revlog_constants, | |
|
106 | 107 | deltas as deltautil, |
|
107 | 108 | nodemap, |
|
108 | 109 | rewrite, |
@@ -796,25 +797,29 def debugdeltachain(ui, repo, file_=None | |||
|
796 | 797 | |
|
797 | 798 | def revinfo(rev): |
|
798 | 799 | e = index[rev] |
|
799 | compsize = e[1] | |
|
800 | uncompsize = e[2] | |
|
800 | compsize = e[revlog_constants.ENTRY_DATA_COMPRESSED_LENGTH] | |
|
801 | uncompsize = e[revlog_constants.ENTRY_DATA_UNCOMPRESSED_LENGTH] | |
|
801 | 802 | chainsize = 0 |
|
802 | 803 | |
|
804 | base = e[revlog_constants.ENTRY_DELTA_BASE] | |
|
805 | p1 = e[revlog_constants.ENTRY_PARENT_1] | |
|
806 | p2 = e[revlog_constants.ENTRY_PARENT_2] | |
|
807 | ||
|
803 | 808 | if generaldelta: |
|
804 |
if e |
|
|
809 | if base == p1: | |
|
805 | 810 | deltatype = b'p1' |
|
806 |
elif e |
|
|
811 | elif base == p2: | |
|
807 | 812 | deltatype = b'p2' |
|
808 |
elif e |
|
|
813 | elif base == rev: | |
|
809 | 814 | deltatype = b'base' |
|
810 | 815 | elif r.issnapshot(rev): |
|
811 | 816 | deltatype = b'snap' |
|
812 |
elif e |
|
|
817 | elif base == rev - 1: | |
|
813 | 818 | deltatype = b'prev' |
|
814 | 819 | else: |
|
815 | 820 | deltatype = b'other' |
|
816 | 821 | else: |
|
817 |
if e |
|
|
822 | if base == rev: | |
|
818 | 823 | deltatype = b'base' |
|
819 | 824 | else: |
|
820 | 825 | deltatype = b'prev' |
@@ -822,7 +827,7 def debugdeltachain(ui, repo, file_=None | |||
|
822 | 827 | chain = r._deltachain(rev)[0] |
|
823 | 828 | for iterrev in chain: |
|
824 | 829 | e = index[iterrev] |
|
825 | chainsize += e[1] | |
|
830 | chainsize += e[revlog_constants.ENTRY_DATA_COMPRESSED_LENGTH] | |
|
826 | 831 | |
|
827 | 832 | return compsize, uncompsize, deltatype, chain, chainsize |
|
828 | 833 |
General Comments 0
You need to be logged in to leave comments.
Login now