comparison tests/test-help.t @ 27434:11150176a000

changegroups: add documentation for cg3
author Augie Fackler <augie@google.com>
date Fri, 18 Dec 2015 09:57:35 -0500
parents c2854c41f9ac
children 5df74b2f296d
comparison
equal deleted inserted replaced
27433:12f727a5b434 27434:11150176a000
883 ============ 883 ============
884 884
885 Changegroups are representations of repository revlog data, specifically 885 Changegroups are representations of repository revlog data, specifically
886 the changelog, manifest, and filelogs. 886 the changelog, manifest, and filelogs.
887 887
888 There are 2 versions of changegroups: "1" and "2". From a high-level, they 888 There are 3 versions of changegroups: "1", "2", and "3". From a high-
889 are almost exactly the same, with the only difference being a header on 889 level, versions "1" and "2" are almost exactly the same, with the only
890 entries in the changeset segment. 890 difference being a header on entries in the changeset segment. Version "3"
891 adds support for exchanging treemanifests and includes revlog flags in the
892 delta header.
891 893
892 Changegroups consists of 3 logical segments: 894 Changegroups consists of 3 logical segments:
893 895
894 +---------------------------------+ 896 +---------------------------------+
895 | | | | 897 | | | |
939 +-----------------------------------------+ 941 +-----------------------------------------+
940 942
941 The *length* field is the byte length of the remaining 3 logical pieces of 943 The *length* field is the byte length of the remaining 3 logical pieces of
942 data. The *delta* is a diff from an existing entry in the changelog. 944 data. The *delta* is a diff from an existing entry in the changelog.
943 945
944 The *delta header* is different between versions "1" and "2" of the 946 The *delta header* is different between versions "1", "2", and "3" of the
945 changegroup format. 947 changegroup format.
946 948
947 Version 1: 949 Version 1:
948 950
949 +------------------------------------------------------+ 951 +------------------------------------------------------+
960 | node | p1 node | p2 node | base node | link node | 962 | node | p1 node | p2 node | base node | link node |
961 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | 963 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
962 | | | | | | 964 | | | | | |
963 +------------------------------------------------------------------+ 965 +------------------------------------------------------------------+
964 966
967 Version 3:
968
969 +------------------------------------------------------------------------------+
970 | | | | | | |
971 | node | p1 node | p2 node | base node | link node | flags |
972 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
973 | | | | | | |
974 +------------------------------------------------------------------------------+
975
965 The *mdiff header* consists of 3 32-bit big-endian signed integers 976 The *mdiff header* consists of 3 32-bit big-endian signed integers
966 describing offsets at which to apply the following delta content: 977 describing offsets at which to apply the following delta content:
967 978
968 +-------------------------------------+ 979 +-------------------------------------+
969 | | | | 980 | | | |
1003 +--------------------------------------+ 1014 +--------------------------------------+
1004 | | | | | 1015 | | | | |
1005 | filelog0 | filelog1 | filelog2 | ... | 1016 | filelog0 | filelog1 | filelog2 | ... |
1006 | | | | | 1017 | | | | |
1007 +--------------------------------------+ 1018 +--------------------------------------+
1019
1020 In version "3" of the changegroup format, filelogs may include directory
1021 logs when treemanifests are in use. directory logs are identified by
1022 having a trailing '/' on their filename (see below).
1008 1023
1009 The final filelog sub-segment is followed by an *empty chunk* to denote 1024 The final filelog sub-segment is followed by an *empty chunk* to denote
1010 the end of the segment and the overall changegroup. 1025 the end of the segment and the overall changegroup.
1011 1026
1012 Each filelog sub-segment consists of the following: 1027 Each filelog sub-segment consists of the following: