From 1f6067554edebe32d429c1f1a5f7c2bb40ed792c Mon Sep 17 00:00:00 2001 From: crouzet Date: Fri, 1 Dec 2017 11:44:01 +0100 Subject: [PATCH] add prepare command --- doc/src/commands/log.rst | 21 +++++++++-- doc/src/commands/prepare.rst | 72 ++++++++++++++++++++++++++++++++++++ doc/src/index.rst | 1 + 3 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 doc/src/commands/prepare.rst diff --git a/doc/src/commands/log.rst b/doc/src/commands/log.rst index fe86306..97e7454 100644 --- a/doc/src/commands/log.rst +++ b/doc/src/commands/log.rst @@ -4,22 +4,35 @@ log Description =========== -The **log** command gives information on sat logs. +The **log** command displays sat log in a web browser or in a terminal. Usage ===== -* Show the logs for an application: :: +* Show (in a web browser) the log of the commands corresponding to an application: :: sat log -* Show the logs for commands that do not use any application: :: +* Show the log for commands that do not use any application: :: sat log -* The --terminal (or -t) option gives access to the terminal mode: :: +* The --terminal (or -t) display the log directly in the terminal, through a interactive menu: :: sat log () --terminal +* The --last option displays only the last command: :: + + sat log () --last + +* To access the last compilation log in terminal mode, use --last_terminal option: :: + + sat log () --last_terminal + +* The --clean (int) option erases the n older log files and print the number of remaining log files: :: + + sat log () --clean 50 + + Configuration ============= diff --git a/doc/src/commands/prepare.rst b/doc/src/commands/prepare.rst new file mode 100644 index 0000000..29d7ac3 --- /dev/null +++ b/doc/src/commands/prepare.rst @@ -0,0 +1,72 @@ +******* +prepare +******* + +Description +=========== +The **prepare** command brings the sources of an application in the SOURCES application directory, in order to compile them with the compile command. + +The sources can be prepared from VCS software (*cvs*,*svn*, *git*), an archive or a directory. + +.. warning:: When sat prepares a product, it first removes the existing directory, except if the developement mode is activated. + When you are working on a product,, you need to declare in the application configuration this product in **dev** mode. + +Remarks +======= + +VCS bases (git, svn, cvs) +------------------------- + +The *prepare* command does not manage authentication on the cvs server. +For example, to prepare modules from a cvs server, you first need to login once. + +To avoid typing a password for each product, you may use a ssh key with passphrase, or store your password (in .cvspass or .gitconfig). +If you have security concerns, it is also possible to use a bash agent and type your password only once. + + + +Dev mode +-------- + +By default *prepare* uses *export* mode: it creates an image of the sources, corresponding to the tag or branch specified, without any link to the VCS base. +To perform a *checkout* (svn, cvs) or a *git clone* (git), you need to declare the product in dev mode in your application configuration. +For that, edit the application configuration and modify the product declaration: :: + + sat config -e + # edit the product section : + : {tag : "my_tag", dev : "yes", debug : "yes"} + +The first time you will execute the *sat prepare* command, your module will be downloaded in *checkout* mode (inside the SOURCES directory of the application. +Then, you can develop in this repository. And push them in the base when they are ready. +If you type during the development process by mistake a *sat prepare* command, the sources in dev mode will not be altered/removed (Unless you use -f option) + + +Usage +===== +* Prepare the sources of a complete application in SOURCES directory (all products): :: + + sat prepare + +* Prepare only some modules: :: + + sat prepare --products , ... + +* Use --force to force to prepare the products in development mode (this will remove the sources and do a new clone/checkout): :: + + sat prepare --force + +* Use --force_patch to force to apply patch to the products in development mode (otherwise they are not applied): :: + + sat prepare --force_patch + + +Configuration +============= +* sat prepare uses the pyconf configuration of each product to know how to get the sources. + + * **get_method**: the method to use to prepare the module, possible values are cvs, git, archive, dir. + * **git_info**: (used if get_method = git) information to prepare sources from git. + * **svn_info**: (used if get_method = svn) information to prepare sources from cvs. + * **cvs_info**: (used if get_method = cvs) information to prepare sources from cvs. + * **archive_info**: (used if get_method = archive) the path to the archive. + * **dir_info**: (used if get_method = dir) the directory with the sources. diff --git a/doc/src/index.rst b/doc/src/index.rst index bf1054a..802b7b7 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -27,6 +27,7 @@ List of Commands :maxdepth: 1 config + prepare log Code documentation -- 2.39.2