
Hello, my inquisitive
% username% !
A few months ago, I accidentally stumbled upon another promising version control system -
Veracity , which I would like to tell you today, so that you have something to dig into on the weekend. Despite the fact that the development of Veracity has been going on for over a year, on Habré her name was only a couple of times casually mentioned in the comments. Under the cat you will find a brief description of Veracity and links where you can get more detailed information about it.
So,
Veracity (English “truthfulness”, “reliability”, “accuracy”) is a distributed version control system, similar to Git, developed under the Apache 2.0 license from SourceGear.
')
Main differences from Git
- Availability of local revision numbers. Veracity, like Git, uses cryptographic hash functions for version control of individual files. However, in the local repository, each commit receives a unique revision number, as it happens in Subversion. The revision number and hash can be used interchangeably and are often indicated by a colon.
- Support multiple hash functions. Everyone knows that Git uses the SHA-1 function in its work. Veracity allows you to choose between SHA-1 , SHA-2 or Skein .
- Formal file renaming. Git, when renaming files, actually deletes the file, and then creates a file with the same content and new name. Veracity does exactly rename the existing file.
- Support file locks. Centralized version control systems like Subversion support 2 work schemes: file locking (svn lock \ svn unlock) and merging changes (svn merge). Although Git and other distributed version control systems often use a central repository in their work, they lack a file locking mechanism. Veracity corrects this flaw. It is clear that to block files, you need access to remote repositories through the network.
- Stamp support. Veracity includes a completely new functionality, called stamps. A stamp is a stamp from arbitrary text that a developer can attach to any commit. Unlike tags, which associate a unique name for each commit, the same stamp can mark an arbitrary number of commits. For example, when using a continuous integration system, you can put a “Tests passed” stamp on commits that have passed a series of tests without errors, just like the manufacturers of equipment put a “qc pass” stamp (quality controll passed) on each sample produced.
- Decentralized repository database. Many version control systems store repository data within the working directory. For example, Git has a .git folder in which binary objects, trees, commit objects, an index, a configuration, hooks, etc. are stored. Veracity stores most of the service information on the repository outside the working directory in a special database. This, for example, allows you to have several working directories for one repository at once.
- Built-in Javascript interpreter. Veracity uses Javascript as the main scripting language. For example, you can write hooks in the form of Javascript functions. There is also a built-in Javascript API that can be used to write server-side web applications using Veracity. It is logical that JSON is used to store the serialized data.
- Embedded web application for repository review. With one command, you can start the embedded web server with an application that allows you to view the contents of the repository, the change history, the project build status, or the bug tracker.
Installation
The installation procedure is the most common and has 2 possible alternatives:
- Build from source codes. The system is written in C, like some other version control systems (for example, Git, Subversion or Fossil), so we will have to deal with installing source dependencies and utilities like cmake and make. For those who like these things, here are build instructions for Linux and for Windows .
- Install from binary package. To start picking Veracity faster, it will be much easier to use binary packages that can be downloaded on the download page . There are binary packages for Debian-compatible systems (* .deb: x86, x64) and for Windows (* .msi: x86, x64).
Basic commands
To work with Veracity used short command
vv . Below is a list of the basic operations of Veracity and examples of commands:
Team | Description | Example |
---|
vv add | Place file under version control. Unlike Git, Veracity surprisingly has no concept of staging. All changes in the file fall into commit. | $vv add filename1 filename2 ~/thisdir
|
vv addremove | Add new files to version control and remove no longer existing files from version control. | $vv addremove dirname1 |
vv branch | List current branches or change branches | $vv branch $vv branch add devel |
vv cat | Print file contents under version control | $vv cat filename |
vv checkout | Create a new working copy of the local repository (there may be several) | $vv checkout |
vv clone | Create a new copy of an existing repository. Then from the newly created repository, you can create the desired number of working copies. It works like git clone. Veracity only supports the HTTP protocol for working with remote repositories. | $vv clone http://example.com/repos/reponame reponame |
vv comment | Add another comment to the commit in addition to the one specified when creating the commit. Each command call adds a new line with a comment. Old lines are saved. | $vv comment --rev=123 --message='A new comment' |
vv commit | Create commit | $vv commit --message='Commit message' |
vv config | Reconfigure Veracity. It allows you not only to set the values ​​of specific options, but also to import and export the configuration into a JSON document, as well as reset the configuration to default values. | $vv config set whoami/username vania-pooh |
vv diff | Distinguish between the current revision and the specified revision. | $vv diff --rev=3 filename |
vv diffmerge | Same as diff, but for comparison, a third-party DiffMerge program is used , which must be installed separately, otherwise the command gives an error. | $vv diffmerge --rev=3 filename |
vv export | Copies all files under version control to a separate directory. | $vv export reponame ~/copyhere |
vv fast-export | Allows you to save the full state of the repository (the contents of files + metadata) into one text file. This file can then be imported on another computer with the vv fast-import command. | $vv fast-export reponame ~/backupname.fi |
vv fast-import | Initializes a new repository from a file created by the vv fast-import command. | $vv fast-import --hash=SHA2/512 ~/backupname.fi |
vv heads | Displays descriptions of the latest commits in each of the active repository branches (branches can be closed using the vv branch close ). | $vv heads |
vv help | Built-in help system for commands Veracity. | $vv help branch new |
vv history | Allows you to view a list of previous commits. Same as git log . | $vv history |
vv incoming | Shows what changes will be uploaded from a remote server. | $vv incoming |
vv init | Create a new local repository. It requires specifying the repository name and which directory to make working. Later you can add other working directories. | $vv init reponame dirname |
vv leaves | Shows a list of "leaves", i.e. recent commits in branches. | $vv leaves |
vv lock | Locks the file for editing. | $vv lock filename |
vv locks | Shows a list of files locked for editing. | $vv locks |
vv merge | Puts changes to the specified commit into the current state of the files in the working directory. | $vv merge -r 37939b07309af8232c44048ca0a1633c982b7506 |
vv move | Moves the specified file or directory to a new location. | $vv move filename ~/newdir |
vv outgoing | Shows a list of changes that will be uploaded to the current or specified remote repository. | $vv outgoing |
vv parents | Shows a list of parent commits for currently modified files. | $vv parents |
vv pull | Get changes from remote repository. Same as git pull . | $vv pull |
vv push | Send changes to a remote repository. Same as git push . | $vv push |
vv remove | Delete the file from version control and erase it. | $vv remove ~/repo/filename |
vv rename | Rename file. | $vv rename ~/repo/oldfile ~/repo/newfile |
vv repo | Create, edit, delete repositories, and list them. | $vv repo info |
vv resolve | Resolve file association conflicts. | $vv resolve ~/filename |
vv revert | Roll back current changes. | $vv revert ~/filename1 ~/filename2 |
vv serve | Allows you to run the built-in Veracity application to manage the repository. | $vv serve --port=8080 --public |
vv stamp | Allows you to add and remove stamps to specified commits. | $vv stamp add approved --rev=3 |
vv status | Show the status of files in the current working directory. | $vv status |
vv tag | Assign a unique text name to a commit. | $vv tag add tagname --rev=3 |
vv unlock | Unlocks the file locked with vv lock . | $vv unlock filename |
vv update | Update the working directory status from the repository (applied after vv pull is completed ). | $vv update |
vv user | Allows you to manage user accounts using repositories. | $vv user create vania-pooh |
vv version | Shows the current installed version of Veracity. | $vv version |
vv whoami | Shows or sets the current user account. | $vv whoami anotherUser |
vv zip | Saves the contents of the repository to a zip archive. | $vv zip ~/backup/archive.zip |
File location
As mentioned earlier, Veracity stores repository metadata separately from the working directory files. This allows you to have several working directories. The Veracity documentation says that it supports several different storage engines, however, by default, the
FS3 engine is used. This engine uses SQLite3 database and text files that store database queries. In order to be able to view the contents of the database, you can install the
SQLite Manager extension for Firefox. By default, all repository data is stored in the
~ / .sgcloset / directory . In addition, each working copy has a hidden
.sgdrawer directory containing a link to the repository name and some other metadata. If you want to ignore the repository files, put them in a .sgignores or .vvignores file, as shown
here . Veracity currently has only 2 executable files -
vv and
vscript . The first is responsible for the execution of version control commands, and the second allows you to run scripts written in Javascript.
Veracity embedded application
As mentioned above, Veracity contains an embedded web server and a web application for managing a project using Veracity. To launch the web application, simply enter the command:
$vv serve --port=8080 --public
The application starts on the specified port and becomes available from the browser. Here's what it looks like:

The picture shows that the specified commit has 3 comments. One was added when creating a commit, the rest with the
vv comment command.
Hosting projects Veracity
Veracity developers understand that it will be very difficult to compete with Git without hosting projects like Github. That is why
onveracity.com was recently launched. In general, the site repeats the functionality of Github, and screenshots can be viewed on its main page.
Links
Conclusion
Information on Veracity is not so much. The developers themselves answer the questions of users on
the questions page . Some information can be found in the book above. Hopefully, this project will also find its place in the sun.