diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-05-18 13:46:04 +0100 |
---|---|---|
committer | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-05-29 21:07:15 +0100 |
commit | 7128d5995aa9b52422237e5c9c67900b4111dcc3 (patch) | |
tree | 6824df258413cc914918611719cb9817d83f108a /README | |
parent | 6c2ff9ff07c8fa4c4b4ecd0e40dbb9acc1c516c3 (diff) | |
download | lorry-7128d5995aa9b52422237e5c9c67900b4111dcc3.tar.gz |
README: Fix Markdown formatting of .lorry examples
* Preformatted sections need to be indented by at least 4 spaces, and
need a blank line separating them from word-wrapped paragraphs.
* Tabs seem to be used with an assumption that tab stops are every 8
spaces, but they may be every 4 spaces. Expand them to spaces, to
remove the ambiguity.
Diffstat (limited to 'README')
-rw-r--r-- | README | 207 |
1 files changed, 108 insertions, 99 deletions
@@ -36,61 +36,62 @@ values are dicts with the data required to mirror it. So a simple lorry that mirrors a git project looks like - { - "git": { - "type": "git", - "url": "git://github.com/gitster/git.git" - } - } + { + "git": { + "type": "git", + "url": "git://github.com/gitster/git.git" + } + } Multiple repositories can be specified in the same .lorry file, in which case all of them will be processed by lorry. The following shows two repositories. - { - "git": { - "type": "git", - "url": "git://github.com/gitster/git.git" - }, - "curl": { - "type": "git", - "url": "git://github.com/bagder/curl.git" - } - } + { + "git": { + "type": "git", + "url": "git://github.com/gitster/git.git" + }, + "curl": { + "type": "git", + "url": "git://github.com/bagder/curl.git" + } + } Lorry can import other version control systems into git. ### Mercurial Mercurial is very similar to git, just change the type field to "hg" - { - "sudo": { - "type": "hg", - "url": "http://www.sudo.ws/repos/sudo" - } - } + + { + "sudo": { + "type": "hg", + "url": "http://www.sudo.ws/repos/sudo" + } + } ### Bazaar Repositories and branches in Bazaar mean different things to Git. The practical difference for Lorry is that it is not possible to have a url for a repository, urls map directly to branches. - { - "libpipeline": { - "type": "bzr", - "branches": { - "trunk": "http://bzr.savannah.gnu.org/r/libpipeline/trunk" - } - } - } + { + "libpipeline": { + "type": "bzr", + "branches": { + "trunk": "http://bzr.savannah.gnu.org/r/libpipeline/trunk" + } + } + } For convenience if the project only needs one branch mirrored, the url is assumed to be the master branch. - { - "libpipeline": { - "type": "bzr", - "url": "http://bzr.savannah.gnu.org/r/libpipeline/trunk" - } - } + { + "libpipeline": { + "type": "bzr", + "url": "http://bzr.savannah.gnu.org/r/libpipeline/trunk" + } + } ### Subversion To support all the branches and tags a layout needs to be specified as svn is @@ -98,25 +99,29 @@ very flexible with the possible layouts, however the most common is to have the working branch in a directory called trunk, and the branches and tags in respectively named subdirectories. Because this is so common "standard" can be used as the layout - { - "mpc": { - "type": "svn", - "url": "svn://scm.gforge.inria.fr/svn/mpc", - "layout": "standard" - } - } + + { + "mpc": { + "type": "svn", + "url": "svn://scm.gforge.inria.fr/svn/mpc", + "layout": "standard" + } + } + This is equivalent to - { - "mpc": { - "type": "svn", - "url": "svn://scm.gforge.inria.fr/svn/mpc", - "layout": { - "trunk": "trunk", - "branches": "branches/*", - "tags": "tags/*" - } - } - } + + { + "mpc": { + "type": "svn", + "url": "svn://scm.gforge.inria.fr/svn/mpc", + "layout": { + "trunk": "trunk", + "branches": "branches/*", + "tags": "tags/*" + } + } + } + Trunk is the path to the directory where the main branch is located. Branches and Tags are glob expressions to allow finer control over which paths are used. @@ -124,58 +129,62 @@ Trunk is mandatory, but Branches and Tags are optional. Texlive keeps a lot of resources in their svn repository, we are only concerned with the source code, so this layout should select the correct subdirectory for each branch. - { - "texlive": { - "type": "svn", - "url": "svn://tug.org/texlive/", - "layout": { - "trunk": "trunk/Build/source", - "branches": "branches/*/Build/source", - "tags": "tags/*/Build/source" - } - } - } + + { + "texlive": { + "type": "svn", + "url": "svn://tug.org/texlive/", + "layout": { + "trunk": "trunk/Build/source", + "branches": "branches/*/Build/source", + "tags": "tags/*/Build/source" + } + } + } + Brace expansions can be used to specify subsets of paths. Netpbm for example, keeps all its branches in the root directory - { - "netpbm": { - "type": "svn", - "url": "https://netpbm.svn.sourceforge.net/svnroot/netpbm", - "layout": { - "trunk": "trunk", - "branches": "{advanced,stable,super_stable}", - "tags": "release_number/*" - } - } - } + + { + "netpbm": { + "type": "svn", + "url": "https://netpbm.svn.sourceforge.net/svnroot/netpbm", + "layout": { + "trunk": "trunk", + "branches": "{advanced,stable,super_stable}", + "tags": "release_number/*" + } + } + } Note that git-svn can provide better history tracking if the url is as close to the root of the repository as possible, so it may be more effective if the lorry was specified similar to this, assuming svnroot is the real root of the repo - { - "netpbm": { - "type": "svn", - "url": "https://netpbm.svn.sourceforge.net/svnroot/", - "layout": { - "trunk": "netpbm/trunk", - "branches": "netpbm/{advanced,stable,super_stable}", - "tags": "netpbm/release_number/*" - } - } - } + + { + "netpbm": { + "type": "svn", + "url": "https://netpbm.svn.sourceforge.net/svnroot/", + "layout": { + "trunk": "netpbm/trunk", + "branches": "netpbm/{advanced,stable,super_stable}", + "tags": "netpbm/release_number/*" + } + } + } ### CVS The url for CVS repositories is the CVSROOT string. The module is required as cvs repositories usually have multiple modules, the module is usually the same as the project name. - { - "openssl": { - "type": "cvs", - "url": "anonymous@cvs.openssl.org:/openssl-cvs", - "module": "openssl" - } - } + { + "openssl": { + "type": "cvs", + "url": "anonymous@cvs.openssl.org:/openssl-cvs", + "module": "openssl" + } + } ### Tarball @@ -191,12 +200,12 @@ and strip this out of the imported filenames. Tarball imports once required 'compression' and 'strip' to be specified. These are obsolete now and are ignored by Lorry. -{ - "bc": { - "type": "tarball", - "url": "http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz" + { + "bc": { + "type": "tarball", + "url": "http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz" + } } -} NOTE: tarball imports are unlikely to give the same commit SHA1 but the tree SHA1 inside (which is what is used for artifact cache IDs) should remain |