Show More
@@ -685,7 +685,7 b' ACTION_MASK = int("111" "00", 2)' | |||
|
685 | 685 | ADDED_FLAG = int("001" "00", 2) |
|
686 | 686 | MERGED_FLAG = int("010" "00", 2) |
|
687 | 687 | REMOVED_FLAG = int("011" "00", 2) |
|
688 | # `100` is reserved for future use | |
|
688 | SALVAGED_FLAG = int("100" "00", 2) | |
|
689 | 689 | TOUCHED_FLAG = int("101" "00", 2) |
|
690 | 690 | |
|
691 | 691 | COPIED_MASK = int("11", 2) |
@@ -698,7 +698,7 b' INDEX_ENTRY = struct.Struct(">bLL")' | |||
|
698 | 698 | |
|
699 | 699 | |
|
700 | 700 | def encode_files_sidedata(files): |
|
701 |
all_files = set(files.touched |
|
|
701 | all_files = set(files.touched) | |
|
702 | 702 | all_files.update(files.copied_from_p1.values()) |
|
703 | 703 | all_files.update(files.copied_from_p2.values()) |
|
704 | 704 | all_files = sorted(all_files) |
@@ -718,6 +718,8 b' def encode_files_sidedata(files):' | |||
|
718 | 718 | flag |= MERGED_FLAG |
|
719 | 719 | elif f in files.removed: |
|
720 | 720 | flag |= REMOVED_FLAG |
|
721 | elif f in files.salvaged: | |
|
722 | flag |= SALVAGED_FLAG | |
|
721 | 723 | elif f in files.touched: |
|
722 | 724 | flag |= TOUCHED_FLAG |
|
723 | 725 | |
@@ -768,6 +770,8 b' def decode_files_sidedata(sidedata):' | |||
|
768 | 770 | md.mark_merged(filename) |
|
769 | 771 | elif flag & ACTION_MASK == REMOVED_FLAG: |
|
770 | 772 | md.mark_removed(filename) |
|
773 | elif flag & ACTION_MASK == SALVAGED_FLAG: | |
|
774 | md.mark_salvaged(filename) | |
|
771 | 775 | elif flag & ACTION_MASK == TOUCHED_FLAG: |
|
772 | 776 | md.mark_touched(filename) |
|
773 | 777 |
@@ -1174,19 +1174,23 b' We upgrade a repository that is not usin' | |||
|
1174 | 1174 | merged : d, ; |
|
1175 | 1175 | ##### revision 30 ##### |
|
1176 | 1176 | 1 sidedata entries |
|
1177 | entry-0014 size 4 | |
|
1178 | '\x00\x00\x00\x00' | |
|
1177 | entry-0014 size 14 | |
|
1178 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
|
1179 | salvaged : d, ; | |
|
1179 | 1180 | ##### revision 31 ##### |
|
1180 | 1181 | 1 sidedata entries |
|
1181 | entry-0014 size 4 | |
|
1182 | '\x00\x00\x00\x00' | |
|
1182 | entry-0014 size 14 | |
|
1183 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
|
1184 | salvaged : d, ; | |
|
1183 | 1185 | ##### revision 32 ##### |
|
1184 | 1186 | 1 sidedata entries |
|
1185 | entry-0014 size 4 | |
|
1186 | '\x00\x00\x00\x00' | |
|
1187 | entry-0014 size 14 | |
|
1188 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
|
1189 | salvaged : d, ; | |
|
1187 | 1190 | ##### revision 33 ##### |
|
1188 | 1191 | 1 sidedata entries |
|
1189 | entry-0014 size 4 | |
|
1190 | '\x00\x00\x00\x00' | |
|
1192 | entry-0014 size 14 | |
|
1193 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
|
1194 | salvaged : d, ; | |
|
1191 | 1195 | |
|
1192 | 1196 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now