Daizu::Revision - functions for loading revisions from Subversion
These functions are used to load metadata about revisions (and the file path changes made in them) from the Subversion into the PostgreSQL database.
The following functions are available for export from this module. None of them are exported by default.
- load_revision($cms, $desired_revnum)
Load information about new revisions, up to
$desired_revnum. It starts from the revision after the last one which was loaded, and is idempotent (so if you try to load the same revision twice there will be no change).
$desired_revnumis not defined, loads up to the most recent revision in the repository.
This can also be called as a method on a Daizu object.
Return a reference to a hash of known branches. The keys are the paths, and the values are the ID numbers found in the
Dies if it can't find a branch with the path
trunk, because that indicates a broken database.
- branch_and_path($branches, $path)
Return a list of two values, the ID number and path of the branch which a file at
$pathwould be in, whether or not it actually exists. The path should be relative to the root of the repository, for example
trunk/foo.html. It doesn't mater whether
$pathstarts with a forward slash.
Returns nothing if the path is not in any branch, in which case Daizu CMS will simply ignore it.
- file_guid($db, $branch_id, $path, $revnum)
Returns a reference to a hash of information about the GUID for the file in branch
undefif there is/was no such file.
The hash will contain the following keys:
True iff the associated file is a directory.
The GUID URI (usually starting with
tag:). This will be the custom GUID URI if overridden by a
True if a
daizu:guidproperty has overridden the automatically generated GUID URI.
The number of the first revision in which
$pathwas used for this file in this branch.
The number of the last revision in which
$pathwas used for this file in this branch, or
undefif it is still being used in the most recently loaded revision.
This software is copyright 2006 Geoff Richards <firstname.lastname@example.org>. For licensing information see this page: