1Test::AutoBuild::ReposiUtsoerry(C3o)ntributed Perl DocumTeenstta:t:iAountoBuild::Repository(3)
2
3
4

NAME

6       Test::AutoBuild::Repository - Source control repository access
7

SYNOPSIS

9         use Test::AutoBuild::Repository
10
11         my $rep = Test::AutoBuild::Repository->new(
12                      name => $name,
13                      options => \%options,
14                      env => \%env,
15                      label => $label);
16
17         # Checkout / update the location '$src_path'
18         # into local directory '$dst_path'
19         my ($changed, $changes) = $rep->export($runtime, $src_path, $dst_path);
20
21         # If the repository impl supports it, get the more
22         # recent repository global changelist number
23         my $changelist = $rep->changelist($runtime);
24

DESCRIPTION

26       This module provides the API for interacting with the source control
27       repositories. A repository implementation has to be able to do two main
28       things
29
30        * Get a checkout of a new module
31        * Update an existing checkout, determining if any
32          changes where made
33
34       Optionally, it can also extract & return the details of all changelists
35       committed since the previous checkout operation.
36

CONFIGURATION

38       The valid configuration options for the "repositories" block are
39

METHODS

41       my $rep = Test::AutoBuild::Repository->new(name => $name, label =>
42       $label, options => \%options, env => \%env);
43           This method creates a new repository. The "name" argument is an
44           alphanumeric token representing the name of the repository. The
45           "label" argument is a human friendly name of the repository. The
46           optional "options" argument is a hashref of implementation specific
47           options. The optional "env" argument is a hashref of environment
48           variables to set when running the commands to access the reposi‐
49           tory.
50
51       my $value = $rep->changelist($runtime);
52           Returns the changelist to which the repository is synchronized.
53           This is defined to be the most recent changelist, not newer than
54           the timestamp to which the build runtime is set. This method should
55           be implemented by any repository types which support changelists.
56           For those that don't the default implementation will throw an
57           error.
58
59       my $name = $rep->name([$name]);
60           When run without any arguments, returns the alphanumeric token rep‐
61           resenting the name of the repository. If a single argument is sup‐
62           plied, this is use to update the name.
63
64       my $label = $rep->label([$label]);
65           When run without any arguments, returns the human friendly string
66           representing the label of the repository. If a single argument is
67           supplied, this is use to update the label.
68
69       my $value = $rep->option($name[, $value]);
70           When run with a single argument, retuns the option value corre‐
71           sponding to the name specified in the first argument. If a second
72           argument is supplied, then the option value is updated.
73
74       my $value = $rep->env($name[, $value]);
75           When run with a single argument, retuns the environment variable
76           corresponding to the name specified in the first argument. If a
77           second argument is supplied, then the environment variable is
78           updated.
79
80       my ($changed, $changes) = $rep->export($runtime, $src, $dst);
81           Exports the location $src into the directory $dst. Returns zero if
82           there were no changes to export; non-zero if the module was new or
83           changed.  The second return parameter is a hash reference whose
84           keys are change numbers, and values are the corresponding
85           Test::AutoBuild::Change objects. This second parameter is optional,
86           since not all repositories maintain changelists.  This is a virtual
87           method which must be implemented by all subclasses.
88
89       my ($output, $errors) = $rep->_run($cmd);
90           Runs the command specified in the first argument, having first set‐
91           up the environment variables specified when the repository was cre‐
92           ated. It returns any text written to standard out by the command
93

AUTHORS

95       Daniel Berrange <dan@berrange.com>
96
98       Copyright (C) 2002 Daniel Berrange <dan@berrange.com>
99

SEE ALSO

101       perl(1), Test::AutoBuild, Test::AutoBuild::Module, Test::Auto‐
102       Build::Repository::CVS, Test::AutoBuild::Repository::GNUArch,
103       Test::AutoBuild::Repository::Perforce, Test::AutoBuild::Reposi‐
104       tory::Mercurial, Test::AutoBuild::Repository::Subversion, Test::Auto‐
105       Build::Repository::Disk, Test::AutoBuild::Repository::SVK
106
107
108
109perl v5.8.8                       2007-12-09    Test::AutoBuild::Repository(3)
Impressum