There are lots of powerful SCMs, so why another one? Well, simply because they are too powerful and expensive to install (take lots of disk space, need a database and libraries you currently don't have installed), use (need to find a good GUI to access the repository, ...) and administrate (configuration of the database, ...). One has to do lots of things for features possibly never needed.
SiVeCo is only some things more than the poor man's method of copying a project to another place -- but it makes doing this job really easy, has no dependencies (except standard tools you have installed anyway) and can't be easier to use. There are benefits you really should consider.
- Easy to install and use
- Small size
- No dependencies
- Normal filesystem interface to the repository
- Every saved version is a fully working copy of your project without wasting disk space
- Changelog handling, execution of scripts before/after creating new versions and other useful things like that.
- Can be converted to other SCMs. Included is an example for mercurial (hg) which can be easily adapted to others which provide a command line interface (subversion, ...).
- You have a working directory in which your project is stored.
- Additionally there is a repository-directory where you save different versions of your project.
- Somewhere you create a tiny config-file for this project, which basically states where those directories are and which files and directories not to save (given by regular expressions).
- Using two simple commands you can save the current state of your project as a new version (command create) or get a certain version back to your working directory (command get) or any other directory.
That's it! How could it be easier?
When you create a new version, your project is not simply copied. When creating a new version, files, which are exactly like in the previous version, are not copied, but created as symbolic links. So you save some disk space while all versions in the repository are fully working copies! You don't need a special tool to explore your repository, use your favourite file manager. Use xxdiff or some other (visual) diff to compare different versions, do whatever you are used to.
So symbolic links are used to save disk space. But you can safely use symbolic links in your projects, too. With every new version a file is created in the repository which helps SiVeCo to recover unchanged files and symbolic links in your original project without mixing things up. There is no need to worry -- what you get back from the repository is exactly what you saved to it.
Symbolic links pointing to a target inside the repository are relative, those pointing to targets outside of the repository are absolute, so you can move the repository around without breaking links.
The additional file (xml) mentioned before does also hold information about when you saved this version, and, if you like, a list of which files have changed, are new and so on. There is place to add a label, version information, changelog, whatever you want. As it is xml, you have the power to use it as needed.
siveco command configfile [options]
siveco c configfile [-n number] [-d directory] [-l label]If number is not given, the current version is used as reference. This option is useful if you branch from an older version than the current. There is no need to care about it if you provide a place for tracking information in the config file.
siveco g configfile [-n number] [-d directory]If number is not given (or -1), the current version is fetched. Using directory you can override the working directory stated in the config file.
siveco d configfile [-n number] [-d directory] [-t type]If number is not given, the version stated by the tracking information or the current version is used as reference.
siveco r configfile -n numberRemoves as much of the given versions as possible -- files linked from later versions are not removed, therefore your repository stays consistent.
siveco r configfile -n numberStart-numberEnd
siveco i configfile [-n number] [-t type]Prints information about the name and/or label of a certain version (if number is not provided, the current version is used). Can be used for automation using shell scripts:
type | prints out |
---|---|
label | label |
nameLabel | name-label |
type | prints out |
---|---|
history | Text version. This is the default type. |
historyrev | Text version, reversed order |
historyhtm | html version |
historyhtmrev | html version, reversed order |
historyhtmNH | html version without surrounding <html><body></body></html> |
historyhtmNHrev | html version without surrounding <html><body></body></html>, reversed order |
siveco a configfile [-n number]If number is not given, the current version is used.
<siveco workingDirectory="/home/jens/projekte/SiVeCo/001/current/" repository ="/home/jens/projekte/SiVeCo/001/repository/" name ="siveco" changelog ="SiVeCo/changelog.htm" tracking ="SiVeCo/.siveco.xml" preCreateCmd ="SiVeCo/setVersion.sh" afterCreateCmd ="SiVeCo/createChangelog.sh" afterGetCmd ="SiVeCo/setDevelVersion.sh" archiveDirectory="/home/jens/projekte/SiVeCo/001/" archiveCmd ="SiVeCo/createArchive.sh" diff ="xxdiff" cmp_cmd ="cmp -s"> <verbosity> <new stdout="0" file="1" /> <changed stdout="0" file="1" /> <deleted stdout="0" file="1" /> <excluded stdout="0" file="1" /> </verbosity> <exclude directories="" files =".*~$|^jedfiles\.lst$|^out/os/.*$|^src/wav/.*\.wav$|^src/wav/encode$" /> </siveco>Entries explained:
Here is a short reminder about regular expressions (see man 7 regex):
| separates various regular expressions of which only one needs to match
atoms:
^ matches the beginning of a line
$ matches the end of a line
\ followed by one of the characters ^.[$()|*+?{\ matches that character taken as an ordinary character
. matches any single character
An atom followed by * matches any number of the atom.
- A filesystem which supports symbolic links. Therefore SiVeCo can't be used on Windows.
- The standart unix tool cmp to compare files. This surely is already installed on your machine.