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