Arcv

Arcv

Standard revision-control commands

Usage Command Examples

Usage

av -h

av -h

Initiate revision control

av [1]

av

Puts the current working directory under revision control

av -y

Idem, but without prompting for confirmation

Check-in:

  • new,

  • modified,

  • removed files

  • to another source

av [ -m <commit message> ] [--source=<source name>] [2]

av

av -m "bug fix 23"

Commit with log message

av -y -m "bug fix 23"

Automatic commit, no change check

av --silent -m "bug fix 23"

Commit with no output

av --silent -m "bug fix 23"

Commit with no output

av --source=arcv

Commit files of the local folder (e.g. a branch) to 'arcv' inside the repository

Check out:

  • from the current source folder

av co [ <revision> | <release tag> | <filename>[:<revision>]] [ -o <output folder> ] [2]

av co 0 -o /tmp

Check out revision 0 in /tmp

av co R1.0.0 -o /tmp

Check out tag R1.0.0 in /tmp

av -y co "test_report.txt"

Restore a file from head revision

av co

Check out/restore head revision of current source folder

Check out:

  • from the specified source folder of the repository or URI

av co …​ [ --source=<source name>]

av co --source="arcv"

Check out head revision of source folder 'arcv' into the current directory [3]

av co R1.0.0 --source="arcv"

Check out tag R1.0.0 of source folder 'arcv' into the current directory [3]

av co 2 --source="arcv"

Check out 0 revision 2 of source folder 'arcv' into the current directory [3]

av co --source="arcv" -o /tmp

Check out head revision of source folder 'arcv' into /tmp folder

Create a branch

av <branch folder>[:<revision> | <release tag>] [ -o <output folder> ] [2]

av branch fundev

Create a new source folder 'fundev' in the parent directory, derived from the head revision

av branch fundev:2

Create a new source folder 'fundev' in the parent directory, derived from revision 2

av branch fundev:R1.0.0

Create a new source folder 'fundev' in the parent directory, derived from the tagged release R1.0.0

av branch fundev:0 -o /tmp/

Create a new source folder 'fundev' in the /tmp directory, derived from revision 0

Status polling

av check [ --verbose ] [2]

av check

Returns 0 if there are no changes, 1 otherwise

Listing new, removed and modified files

av -l [2]

av -l

Display current revision

av rev [2]

av rev

Outputs '2' if revision 2 is the head.

Display current hash signature

av hash [2]

av hash

Outputs the SHA256 fingerprint in hexadecimal

Compute and display hash signature of a random folder

av hash <directory>

av hash /tmp/arcv-rev1

Computes and outputs the SHA256 fingerprint of a revision 1 checkout of the 'arcv' source folder

Show the revision history

av log [-y] [ --verbose ] [ --from=<rev> ] [ --to=<rev> ] [2]

av log

Shows all the revision logs

av log --verbose

Shows all the revision logs including changed files

av -y

Presents the revisions as a menu where any revision can be diffed with either its predecessor or the head by simple keystroke

Check revision history of a specific file

av log <file> [-y] [ --verbose ] [ --from=<rev> ] [ --to=<rev> ] [2]

av log file_A.txt

Shows all revision logs where the file 'file_A.txt' was changed

av -y

Presents the file revisions as a menu where any revision can be diffed with either its predecessor or the head by simple keystroke

Tag a revision

av pub [<tag>:<revision>] [ -m <log message> ] [2]

av pub -m "A test release 1.0.0"

Creates release tag R1.0.0 from head revision

av pub HOTFIX:80 -m "A test release 1.0.0"

Creates release tag HOTFIX from revision 80

Show the release tags history

av rel [-y] [2]

av rel

Shows all the release tags along with their logs

av rel -y

Presents the releases as a menu where any release can be diffed with either the previous release or the head by simple keystroke

Create a release hook

av hook [ <program> ] [2]

av hook tools/update-web.sh

Create a release hook pointing to update-web.sh that will be executed after release tagging is complete.

av hook

List the defined hooks

Check differences

av <diff tool> [ <revision> | head | current[vs<revision | release tag>] ] [2]

where <diff tool> is any of : diff, meld, git

av diff

Between working dir and head rev

av diff 2

Between working dir and rev 2

av diff R1.0.0

Between working dir and tag R1.0.0

av diff headvs2

Between head and rev 2

av diff 2vs0

Between rev 2 and rev 0

av diff 1vs0

Between rev 1 and rev 0

av diff 3vsR1.0.0

Between rev 3 and tag R1.0.0

Take out of revision control

av destroy [2]

av destroy

Deletes all related files from the repositiory

av destroy -yy

Deletes all without requesting any confirmation and input

Export as a tar ball

av tarball [ <revision> | head ] [2]

av tarball -o /tmp

Create tar for current working source directory in /tmp

av tarball head -o /tmp

Create tar for head revision in /tmp

av tarball 0 -o $HOME

Create tar for very first revision in user’s home

Export to GitHub

av export [ <directory> ] [2]

av export

The source folder will be copied in the 'git' subdir below the top archive directory, which is then pushed to the configured GitHub repository. See documentation for more info.

Display available sources in repository

av list

av list

Example of out:

Source           Head  Hash             Owner

arcv             152   f003f2778b1cd656 michel (1000)   51M
arcv-test        82    ffe48281b805d5a6 michel (1000)  202M
wwwserver        127   94ff298a1852e3f0 michel (1000)  402M

Provide information about the repository

av repo [ <info name> ] [-U]

<info name> any of: releases latest-release-tag latest-release-rev exclude-file exclusions src-dir rev-dir rev-hashfilepath rev-hashfilename head-dir head-image-dir git-repo size

av repo

Shows all available information

av repo -U

-U enables to additionally recompute the occupation sizes instead of using cached ones

av repo exclusions

Shows the file patterns used to exclude files from revision-control

av repo dir

Shows all found information which name contains the keyword 'dir'

Fetching and pushing of data from/to an URI

Usage Command Examples

Initiate revision control with data fetched from an URI

av --source=<URI> --fetch [1]

av --source="mongodb://riffian:27019/slashetc" --fetch

Creates folder 'mongodb-slashetc@192.168.0.12-27019' containing the MongoDB dump file 'mongo-db-slashetc.gz' fetched from the passed URI and puts the created folder under revision control

Fetch and check-in

av [ --source=<URI> [ --rm ] ] --fetch

av --fetch [2]

If the current dir is a source created from an URI (see above), fetches the data from the same URI anew and triggers a check-in.

av --source="mongodb://riffian:27019/slashetc" --fetch --rm [1]

From a random location not under revision control, checks out an image of the head revision of source folder 'mongodb-slashetc@192.168.0.12-27019', creating a new entry in the repository if it doesnt exist yet, fetches a MongoDB dump from the URI inside and checks it in, eventually deleting the checked out folder.

Fetch-only from URI

av --source=<URI> --fetch-only

av --fetch-only [2]

Fetches new data without triggering a check-in afterwards.

av --source="mongodb://riffian:27019/slashetc" --fetch-only

Fetches a MongoDB dump from the specified URI. If necessary, creates the folder 'mongodb-slashetc@192.168.0.12-27019 to store the dump file.

Push data back to an URI (restore)

av [-y] [ --source=<URI> ] push [<revision|tag>]

av push [2]

If the current folder is a source created from an URI (see above), pushes the previously fetched data to the same URI anew.

av push 1 [2]

Pushes the fetched data of revision 1.

av push R1.0.0 [2]

Pushes the fetched data of release tag R1.0.0

av --source="mongodb://riffian:27019/slashetc" push [1]

Pushes the fetched data of release tag R1.0.0 to the specified MongoDB URI directly from the repository.

Usage Command Examples

Create a circular backup

av --cycle=<number>[+] [1]

av --cycle=7

Initiate revision control where revisions are always full copies of the directory and revision number wraps around to 0 at the 8th commit.

av --cycle=7+

Same as av --cycle=7, but additionally makes copies of the last cycle revisions (before wrap around) in a separate directory in the repository, which name is the name of the source prefixed with "-cycles". The "-cycles" can be checked out like any other source to retrieve the successive backup-revisions.

Set a minimum time interval to respect between two commits.

av --interval=<number>d | <number>h | <number>m | <number>s [1]

av --interval=1d

Initiate a revision control where 1 day must have been elapsed before a next commit can be accepted and done.

av --interval=4h

Initiate a revision control where 4 hours must have been elapsed before a next commit can be accepted and done.

Commit new revision even when no change

av --force [2]

av --force

Force creation of a new, empty revision even when there is no change.

1 There’s no directory of the same name as the current one already in the repository
2 The current working directory is under revision control, i.e. a directory of the same name as the current one is already in the repository.
3 The current working directory is assumed not to be under revision control. It is just aimed at storing a copy of the checked out folder.