Shallow Clone Status

ShallowClonePlan

The work done on shallow clones as part of GSoC is available as a mq. It implements shallow clones at a given shallow root, with the complete changelog but only the manifest and file nodes that correspond to the shallow root and its descendants. It essentially clones the subgraph of the shallow root and its descendants. When a revlog is shallow, it contains normal index entries for nodes that are needed and punched entries for their parents. The revlog can be identified as shallow by the header flag REVLOGSHALLOW and a punched entry in the index can be identified by the index flag REVIDX_PUNCHED_FLAG. Punched shallow entries have null parents and no data.

Overview of changes:

* revlog - generate groups starting with a full revision instead of diff against parent, when the parent is not available at the reciever. for nodes with missing parents, add the punched entries for the parents. The index created is truncated and contains only nodes (except punched missing parents) that are needed for the shallow clone.

* changegroupsubset - add shallowroot parameter, to calculate nodes needed in changegroup

* changelog - create a list of shallow revs and update on addition of new revisions.

* discovery - determine shallowroot for push & pull operations

* add shallowroot parameters to the various functions to enable local shallow cloning, push and pull

TBD

* determine network protocol interface for shallow clones (client side)

* add commands to retrieve shallowroot of remote repo & new changegroupsubset in wireproto

* creating shallow clones from bundled shallow repo

* deepening of shallow clone, i.e. get history to complete subgraph for a new shallowroot which is an ancestor of the current.