Mercurial > hg
comparison tests/test-help.t @ 27379:2278870bb997
help: support loading sub-topics
If a sub-topic/section is requested and the main topic corresponds to
a topic with sub-topics, we now look for and return content for a
sub-topic if found.
With this patch, `hg help internals.X` now works. hgweb does not yet
render sub-topics, however.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 13 Dec 2015 11:19:55 -0800 |
parents | fc810d950278 |
children | 55ac8006880f |
comparison
equal
deleted
inserted
replaced
27378:c709b515218e | 27379:2278870bb997 |
---|---|
872 """"""""""""""""""""""""""""""" | 872 """"""""""""""""""""""""""""""" |
873 | 873 |
874 bundles container for exchange of repository data | 874 bundles container for exchange of repository data |
875 changegroups representation of revlog data | 875 changegroups representation of revlog data |
876 | 876 |
877 sub-topics can be accessed | |
878 | |
879 $ hg help internals.changegroups | |
880 Changegroups | |
881 ============ | |
882 | |
883 Changegroups are representations of repository revlog data, specifically | |
884 the changelog, manifest, and filelogs. | |
885 | |
886 There are 2 versions of changegroups: "1" and "2". From a high-level, they | |
887 are almost exactly the same, with the only difference being a header on | |
888 entries in the changeset segment. | |
889 | |
890 Changegroups consists of 3 logical segments: | |
891 | |
892 +---------------------------------+ | |
893 | | | | | |
894 | changeset | manifest | filelogs | | |
895 | | | | | |
896 +---------------------------------+ | |
897 | |
898 The principle building block of each segment is a *chunk*. A *chunk* is a | |
899 framed piece of data: | |
900 | |
901 +---------------------------------------+ | |
902 | | | | |
903 | length | data | | |
904 | (32 bits) | <length> bytes | | |
905 | | | | |
906 +---------------------------------------+ | |
907 | |
908 Each chunk starts with a 32-bit big-endian signed integer indicating the | |
909 length of the raw data that follows. | |
910 | |
911 There is a special case chunk that has 0 length ("0x00000000"). We call | |
912 this an *empty chunk*. | |
913 | |
914 Delta Groups | |
915 ------------ | |
916 | |
917 A *delta group* expresses the content of a revlog as a series of deltas, | |
918 or patches against previous revisions. | |
919 | |
920 Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
921 to signal the end of the delta group: | |
922 | |
923 +------------------------------------------------------------------------+ | |
924 | | | | | | | |
925 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
926 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) | | |
927 | | | | | | | |
928 +------------------------------------------------------------+-----------+ | |
929 | |
930 Each *chunk*'s data consists of the following: | |
931 | |
932 +-----------------------------------------+ | |
933 | | | | | |
934 | delta header | mdiff header | delta | | |
935 | (various) | (12 bytes) | (various) | | |
936 | | | | | |
937 +-----------------------------------------+ | |
938 | |
939 The *length* field is the byte length of the remaining 3 logical pieces of | |
940 data. The *delta* is a diff from an existing entry in the changelog. | |
941 | |
942 The *delta header* is different between versions "1" and "2" of the | |
943 changegroup format. | |
944 | |
945 Version 1: | |
946 | |
947 +------------------------------------------------------+ | |
948 | | | | | | |
949 | node | p1 node | p2 node | link node | | |
950 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
951 | | | | | | |
952 +------------------------------------------------------+ | |
953 | |
954 Version 2: | |
955 | |
956 +------------------------------------------------------------------+ | |
957 | | | | | | | |
958 | node | p1 node | p2 node | base node | link node | | |
959 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
960 | | | | | | | |
961 +------------------------------------------------------------------+ | |
962 | |
963 The *mdiff header* consists of 3 32-bit big-endian signed integers | |
964 describing offsets at which to apply the following delta content: | |
965 | |
966 +-------------------------------------+ | |
967 | | | | | |
968 | offset | old length | new length | | |
969 | (32 bits) | (32 bits) | (32 bits) | | |
970 | | | | | |
971 +-------------------------------------+ | |
972 | |
973 In version 1, the delta is always applied against the previous node from | |
974 the changegroup or the first parent if this is the first entry in the | |
975 changegroup. | |
976 | |
977 In version 2, the delta base node is encoded in the entry in the | |
978 changegroup. This allows the delta to be expressed against any parent, | |
979 which can result in smaller deltas and more efficient encoding of data. | |
980 | |
981 Changeset Segment | |
982 ----------------- | |
983 | |
984 The *changeset segment* consists of a single *delta group* holding | |
985 changelog data. It is followed by an *empty chunk* to denote the boundary | |
986 to the *manifests segment*. | |
987 | |
988 Manifest Segment | |
989 ---------------- | |
990 | |
991 The *manifest segment* consists of a single *delta group* holding manifest | |
992 data. It is followed by an *empty chunk* to denote the boundary to the | |
993 *filelogs segment*. | |
994 | |
995 Filelogs Segment | |
996 ---------------- | |
997 | |
998 The *filelogs* segment consists of multiple sub-segments, each | |
999 corresponding to an individual file whose data is being described: | |
1000 | |
1001 +--------------------------------------+ | |
1002 | | | | | | |
1003 | filelog0 | filelog1 | filelog2 | ... | | |
1004 | | | | | | |
1005 +--------------------------------------+ | |
1006 | |
1007 The final filelog sub-segment is followed by an *empty chunk* to denote | |
1008 the end of the segment and the overall changegroup. | |
1009 | |
1010 Each filelog sub-segment consists of the following: | |
1011 | |
1012 +------------------------------------------+ | |
1013 | | | | | |
1014 | filename size | filename | delta group | | |
1015 | (32 bits) | (various) | (various) | | |
1016 | | | | | |
1017 +------------------------------------------+ | |
1018 | |
1019 That is, a *chunk* consisting of the filename (not terminated or padded) | |
1020 followed by N chunks constituting the *delta group* for this file. | |
1021 | |
877 Test list of commands with command with no help text | 1022 Test list of commands with command with no help text |
878 | 1023 |
879 $ hg help helpext | 1024 $ hg help helpext |
880 helpext extension - no help text available | 1025 helpext extension - no help text available |
881 | 1026 |