| Date: | 2010-03-09 |
|---|---|
| Version: | 0.6 |
This document supposes that reader is familiar with developer documentation v1.
New design of scmproj intended to be simpler than previous one and closer to bzr nested trees emulation.
New design uses .bzrmeta/scmproj directory in each component to store config and snapshot data, eliminating need in separate .scmproj config branch as in design v1.
There is up to 3 files in meta directory:
Files project.cfg and snapshot available only in project (subproject) root branch.
File local must be present in each non-root component to indicate that those branches are part of project. (XXX [bialix 2010/03/09] really?)
In the root component local file can be used to store local settings, and therefore it's possible to override some settings in main project.cfg.
Content of all files in .bzrmeta/scmproj should be in UTF-8 encoding.
Config file .bzrmeta/scmproj/project.cfg can be in one of 2 formats: old v1 format or new v2 format (see below).
NOTE: [2010/03/09] support for config files in v2 format is not yet implemented.
[PRELIMINARY]
The config file stores information about each project component. The syntax used as following:
[component "name"] path = relpath/to/component/tree url = component/branch/origin
For every component there should be specified name in the section header. In the section body there should be specified relative path to component tree in local project workspace, and also url from where the component branch can be cloned.
Every component can be another project by itself. This is detected by presence of .bzrmeta/scmproj/project.cfg file without any special syntax in superproject config.
The snapshot file stores tip of every component, so next time project can be checked out in the same state as committed.
NOTE: This file is not supposed to be user-editable and user-readable, but instead it's more optimized for 3-way merge.
For every component there is stored simple line:
name = revision-id
Where "name" is the name of component, "revision-id" is the tip of component tree. Lines sorted by components names.
The main rule to resolve conflicts in snapshot file: THIS changes win unless OTHER deletes the component.
XXX [bialix 2010/03/09] provide special merge algorithm for snapshot file?
Snapshot provides the default value of REVISION settings for the component branches. So if there is no specified REVISION value for component branch in the project.cfg (v1) then will be used revision-id from snapshot. Otherwise always explicit REVISION settings used. Therefore for proper snapshots support you need to remove explicit REVISION settings from your project.cfg.
Also you can use {REVISION} template in project-command and such template variable will be expanded with value from snapshot file (or from project.cfg if there is explicit settings).