diff --git a/docs/fuse.rst b/docs/fuse.rst new file mode 100644 --- /dev/null +++ b/docs/fuse.rst @@ -0,0 +1,72 @@ +Software Heritage graph FUSE +============================ + +The Software Heritage :ref:`data model ` is represented in its +compressed form using the :ref:`swh.graph ` tools. In particular, the +CLI `mount` command allows to locally mount a compressed graph rooted at a given +`SWHID `. + +File system representation +-------------------------- + +Graph node types are represented as: + +- `cnt`: regular file +- `dir`, `rev`, `rel`, `snp`: directory + +By default, the file system only represents the compressed **graph structure**, +not its content. Thus, `cnt` files are empty and every file entry name is a +`SWHID `. + +Storage +^^^^^^^ + +TODO: local/remote storage explanations? + +When storage is available, information are added in the file system: + +- `cnt`: the file now contains the blob bytes stored in the object +- `dir`: directory entries are listed based on their real entry names +- `rev`: + + - `message`: commit message (regular file) + - `author`, `committer`: authorship information (regular files) + - `author_date`, `committer_date`: timestamps (regular files containing + textual ISO 8601 date and time timestamps) + - `root`: source tree at the time of this revision (directory) + - `type`: type of originating revisions (regular file containing strings + like: git, tar, dsc, svn, hg, etc.) + - `metadata.json`: revision metadata (regular file in JSON format) + - `synthetic`: whether the object has been synthetized by Software Heritage + or not (regular file, containing either 0 (false) or 1 (true)) + +- `rel`: + + - `name`: release name (regular file) + - `message`: release message (regular file) + - `author`: authorship information (regular file) + - `date`: release timestamp (regular file containing a textual ISO 8601 date + and time timestamp) + - `target`: source tree of the target object (directory) + - `metadata.json`: revision metadata (regular file in JSON format) + - `synthetic`: whether the object has been synthetized by Software Heritage + or not (regular file, containing either 0 (false) or 1 (true)) + +- `snp`: the branches entries are listed based on their real names (mangled to + account for UNIX naming conventions, e.g: no `/` character) + +Graph edge labels +^^^^^^^^^^^^^^^^^ + +During graph compression, optional edge labels are generated to store more +metadata about the graph structure (such as paths and file permissions). + +If graph labels are available (TODO: file extensions?), then all `cnt` and `dir` +real names and permissions are used in the file system. + +Examples +-------- + +TODO: show the swh/graph/tests/dataset/example graph image and corresponding +mounting points + examples of different level of information (storage, edge +labels, etc.)