NAME

pvc


SYNOPSIS

pvc [command] [files]


THE BOOK

http://news.nopcode.org/pvc/pvc.pdf

or

http://news.nopcode.org/pvc/pvc.txt


DOWNLOAD

http://news.nopcode.org/pvcroot/pvc-0.7.tar.gz


BROWSE THE REPOSITORY

http://news.nopcode.org/miau/pvc.cgi?prj=pvc


KEEP TRACK

$ mkdir pvc && pvc init rsync://news.nopcode.org:8181/pvcroot/pvc


HOMEPAGE

http://news.nopcode.org/pvc/


DESCRIPTION

pvc is the plastic version control system.

It is filesystem-based version control system targeting vnix systems aiming simplicity and flexibility.

Their repositories are named worlds, they are composed by lands (branches), trees and leafs (files).

A special tree called 'current' contains references to the leafs in use to be commited to the next tree.

A commit just plants a new tree into the current land with the contents of the current tree.

Each land contains a reference to the last planted tree. So you can switch between lands, chopping trees and diffing leafs between them.

pvc comes with some extra programs like 'pvc.mail' to send mails of commits, 'pvc.cgi' to serve a repository via web and 'pvc2gml' to generate a gml file containing a graph of the selected pvc land.


COMMANDS

init [path]

initialize the repository

info

show information of the current repository

timeline

shows a timeline report of the current land

report [level]

shows a report of the specified tree level. Will notify (N)ew files, (U)pdated files and (C)hanged files.

Without arguments, the resulting report will be diffing the current tree against the head one. (pre-commit)

version

shows the version of pvc

name

shows the project name

resolve [file | hash]

resolves a hash from/to file name.

add [files ..]

adds new files to the current tree of the repository

rm [files ..]

removes a file from the current tree. Use hooks to remove the local copy:

 $ echo 'for my $file (@arg) { unlink $file; }' > .pvc/hook/rm
cat [files ..]

show the contents of the target file. File can be a tree or a land too

mv [src dst]

moves or renames a file

ls [-r] [tree]

list all files of the current tree in the current directory. Use -r to recursive mode. You can specify the tree hash or land name.

rs [leaf]
revs [leaf]

List all revisions of the target leaf. Command 'levels' is an alias for revs. This command is an alias for revs.

files [-r] [tree]

list all files of the current tree without noisy data. Use '-r' to recusively walk directories.

Only lists filenames.

dirs [tree]

list all directories of the current tree without noisy data.

land [land] [tree]

changes or creates a new land or list all the owned lands if no argument given. If you specify the second argument the tree hash will be used for the head tree of the land.

set [files ..]

sets the contents of the local file to the leaf of the current tree

treeset [files ..]

sets the contents of the local file to the leaf of the head's tree

curtree [tree]

Resets the contents of .pvc/tree/current/* with the ones in .pvc/tree/[tree]/. This will remove all your local changes done in the current tree.

depth [level]

prints the hash of the tree at a certain level (starting from 0 (the latest)).

negative values are handled as absolute and can be used to get from the older tree.

reset [files ..]

resets the contents of the local copy file with the leaf of the current tree

undo [files ..]

downgrades the file revision to the previous one if available

redo [files ..]

upgrades the file revision to the next one if available

miss

list all the files from the current directory that are missing in your current tree

commit [message]

plants a new tree in the current land with the contents of the current tree

Optionally you can directly provide the commit message to the tree's log else it will use $EDITOR environment variable or 'vi' to interactively edit the commit log message.

If you set 'vim' for $EDITOR it will split the log view with the commit diff. Note that new files will not be listed there.

The commit message can be modified in the future with 'pvc edit'

upload

uploads a distribution tarball to the remote pvcroot. This is:

 $ scp `pvc dist` `cat .pvc/remote`/..
diff [src] [dst]

show the differences of the current land against the local copy if no arguments given.

If you only specify the source file it will show the differences of the target file of the local copy against the copy in the current tree.

Specifying both source and destination shows the difference between the targets lands, trees or leafs.

To see the changes to be commited type: 'pvc diff . current'. This command shows the differences between the last commited tree of the current land and the current tree.

depthdiff [level]

show the 'pvc diff' of the tree found at depth level compared to the parent one (level+1).

up [files ..]

updates the revision of the target files. If you specify no files it will show a list of all the files that need to be updated

wz [files ..]

This is the interactive version of 'up'. To prepare the commit you can use this command in this way: $ pvc wz $ pvc diff . current > /tmp/diff $ pvc ci :sp /tmp/diff

chop [tree]

removes the pointer to the parent tree.

prune [tree]

removes the target tree chaining parent and son ones

push [-f|remote]

pushes the current repository to the remote one. This command uses rsync.

You can force the operation to be non-interactive with the '-f' flag. We can also define an alternative remote instead of the .pvc/remote one.

pull

pulls the remote repository to the current one. This command uses rsync

fsck [-n]

cleans the repository purging the unreferenced leafs and trees

log [tree]

recursively walks and prints the history of the current land, tree or leaf

tree [tree]

recursively prints the parent hashes of a tree

head

prints the hash value of the head's tree of the current selected land.

parent

prints the hash value of the parent tree of the head one

trace [file]

traces the history of a file across the tree's hirearchy

tar

creates a tarball named pvc.tar.gz with the contents of .pvc/

merge [tree]

merges a tree into the current tree and prompts you for the manual merge wizard.

dist

creates a distribution tarball in the parent directory using the name of the directory as a project name and .pvc/version as the version number ( pkgname-version.tar.gz )


FILES

pvc stores all the versioning information into a filesystem tree.

.pvc/user

contains the user@host identifier. Used by 'pvc commit'

.pvc/version

contains the version of the current local copy. Used by 'pvc dist'

.pvc/remote

contains the path to the remote ssh or local path repository. Used by 'pvc push' and 'pvc pull'

.pvc/ignore

contains one regular expression per line. Matching filenames will be ignored. Default one is: ^\. \/\. .*\.o$ .*\.so$ Makefile$

.pvc/land/current

contains the name of the current land. This name should exist in .pvc/land/<name>

.pvc/tree/current

where the current tree lives


HOOKS

Each command can be hooked with perl snippets just placing them into the .pvc/hook/(pre)<cmd> file.

For example:

 $ echo 'for my $file (@arg) { unlink $file; }' > .pvc/hook/rm

This another example will send a mail every time you commit:

 $ echo 'system("pvc.mail -smtp -diff mylist\@server.com | \
   nc mail.server.com 25");' > .pvc/hook/commit

You can get a report of the commit by typing:

 $ echo 'system("pvc report 0");' >> .pvc/hook/commit

Automatize a reset when changing between lands:

 $ echo '
   $resetting=1;
   if ($arg[0]) { if (`pvc diff`) { 
     print "Local changes found. Not resetting.\n" if (`pvc diff`);
     $resetting=0;
   }}
   ' >.pvc/hook/preland
 $ echo 'system("pvc reset") if ($resetting);' > .pvc/hook/land

By default 'pvc init' creates some hooks. Advanced users should probably remove them to avoid unexpected actions.


HISTORY

 0.1 : 2007-04-09
 0.2 : 2007-04-14
 0.3 : 2007-04-22
 0.4 : 2007-06-02
 0.5 : 2007-06-23
 0.6 : 2007-08-13


AUTHOR

pancake <pancake@youterm.com>