NAME
Daizu::Revision - functions for loading revisions from Subversion
DESCRIPTION
These functions are used to load metadata about revisions (and the file path changes made in them) from the Subversion into the PostgreSQL database.
FUNCTIONS
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).If
$desired_revnum
is not defined, loads up to the most recent revision in the repository.This can also be called as a method on a Daizu object.
- known_branches($db)
-
Return a reference to a hash of known branches. The keys are the paths, and the values are the ID numbers found in the
branch
table.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
$path
would be in, whether or not it actually exists. The path should be relative to the root of the repository, for exampletrunk/foo.html
. It doesn't mater whether$path
starts 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
$branch_id
at$path
in revision$revnum
, orundef
if there is/was no such file.The hash will contain the following keys:
- id
-
GUID ID.
- is_dir
-
True iff the associated file is a directory.
- uri
-
The GUID URI (usually starting with
tag:
). This will be the custom GUID URI if overridden by adaizu:guid
property. - custom_uri
-
True if a
daizu:guid
property has overridden the automatically generated GUID URI. - first_revnum
-
The number of the first revision in which
$path
was used for this file in this branch. - last_revnum
-
The number of the last revision in which
$path
was used for this file in this branch, orundef
if it is still being used in the most recently loaded revision.
COPYRIGHT
This software is copyright 2006 Geoff Richards <geoff@laxan.com>. For licensing information see this page: