changeset 27434:11150176a000

changegroups: add documentation for cg3
author Augie Fackler <augie@google.com>
date Fri, 18 Dec 2015 09:57:35 -0500
parents 12f727a5b434
children 21d2585fbfcb
files mercurial/help/internals/changegroups.txt tests/test-help.t
diffstat 2 files changed, 39 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help/internals/changegroups.txt	Mon Dec 14 15:55:12 2015 -0500
+++ b/mercurial/help/internals/changegroups.txt	Fri Dec 18 09:57:35 2015 -0500
@@ -4,9 +4,11 @@
 Changegroups are representations of repository revlog data, specifically
 the changelog, manifest, and filelogs.
 
-There are 2 versions of changegroups: ``1`` and ``2``. From a
-high-level, they are almost exactly the same, with the only difference
-being a header on entries in the changeset segment.
+There are 3 versions of changegroups: ``1``, ``2``, and ``3``. From a
+high-level, versions ``1`` and ``2`` are almost exactly the same, with
+the only difference being a header on entries in the changeset
+segment. Version ``3`` adds support for exchanging treemanifests and
+includes revlog flags in the delta header.
 
 Changegroups consists of 3 logical segments::
 
@@ -60,8 +62,8 @@
 The *length* field is the byte length of the remaining 3 logical pieces
 of data. The *delta* is a diff from an existing entry in the changelog.
 
-The *delta header* is different between versions ``1`` and ``2`` of the
-changegroup format.
+The *delta header* is different between versions ``1``, ``2``, and
+``3`` of the changegroup format.
 
 Version 1::
 
@@ -81,6 +83,15 @@
    |            |             |             |            |            |
    +------------------------------------------------------------------+
 
+Version 3::
+
+   +------------------------------------------------------------------------------+
+   |            |             |             |            |            |           |
+   |    node    |   p1 node   |   p2 node   | base node  | link node  | flags     |
+   | (20 bytes) |  (20 bytes) |  (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
+   |            |             |             |            |            |           |
+   +------------------------------------------------------------------------------+
+
 The *mdiff header* consists of 3 32-bit big-endian signed integers
 describing offsets at which to apply the following delta content::
 
@@ -125,6 +136,10 @@
    |          |          |          |     |
    +--------------------------------------+
 
+In version ``3`` of the changegroup format, filelogs may include
+directory logs when treemanifests are in use. directory logs are
+identified by having a trailing '/' on their filename (see below).
+
 The final filelog sub-segment is followed by an *empty chunk* to denote
 the end of the segment and the overall changegroup.
 
--- a/tests/test-help.t	Mon Dec 14 15:55:12 2015 -0500
+++ b/tests/test-help.t	Fri Dec 18 09:57:35 2015 -0500
@@ -885,9 +885,11 @@
       Changegroups are representations of repository revlog data, specifically
       the changelog, manifest, and filelogs.
   
-      There are 2 versions of changegroups: "1" and "2". From a high-level, they
-      are almost exactly the same, with the only difference being a header on
-      entries in the changeset segment.
+      There are 3 versions of changegroups: "1", "2", and "3". From a high-
+      level, versions "1" and "2" are almost exactly the same, with the only
+      difference being a header on entries in the changeset segment. Version "3"
+      adds support for exchanging treemanifests and includes revlog flags in the
+      delta header.
   
       Changegroups consists of 3 logical segments:
   
@@ -941,7 +943,7 @@
       The *length* field is the byte length of the remaining 3 logical pieces of
       data. The *delta* is a diff from an existing entry in the changelog.
   
-      The *delta header* is different between versions "1" and "2" of the
+      The *delta header* is different between versions "1", "2", and "3" of the
       changegroup format.
   
       Version 1:
@@ -962,6 +964,15 @@
         |            |             |             |            |            |
         +------------------------------------------------------------------+
   
+      Version 3:
+  
+        +------------------------------------------------------------------------------+
+        |            |             |             |            |            |           |
+        |    node    |   p1 node   |   p2 node   | base node  | link node  | flags     |
+        | (20 bytes) |  (20 bytes) |  (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
+        |            |             |             |            |            |           |
+        +------------------------------------------------------------------------------+
+  
       The *mdiff header* consists of 3 32-bit big-endian signed integers
       describing offsets at which to apply the following delta content:
   
@@ -1006,6 +1017,10 @@
         |          |          |          |     |
         +--------------------------------------+
   
+      In version "3" of the changegroup format, filelogs may include directory
+      logs when treemanifests are in use. directory logs are identified by
+      having a trailing '/' on their filename (see below).
+  
       The final filelog sub-segment is followed by an *empty chunk* to denote
       the end of the segment and the overall changegroup.