This page describes the second iteration of the bundle format, tentatively called HG19 (since we hope to include it with Mercurial 1.9).

Bundles consist of the following sections:

Sections

The bundle header has the following format:

Offset

Size

Type

Description

0

4

string

Bundle format version. Always contains "HG19".

4

2

string

Compression type. Either "BZ", "GZ" or "UN".

6

a

string

Bundle features (or requirements). A list of comma separated words (lowercase ASCII) describing features present in the bundle. The string is terminated by a newline character.

Changegroup sections

The changegroup sections has the following format:

Offset

Size

Type

Description

0

4

uint

Number of changelog entries.

4

b

group

Changegroup containing changelog entries.

b + 4

4

uint

Number of manifest entries.

b + 8

c

group

Changegroup containing manifest entries.

b + c + 8

4

uint

Number of filelog changegroups (note: not the number of entries).

Then, for each filelog, the following:

Offset

Size

Type

Description

0

4

uint

Number of filelog entries.

4

4

uint

Length of filename.

8

d

string

Filename (unterminated).

d + 8

e

group

Changroup containing filelog entries.

Changegroups

...