NAME
Meta::Baseline::Aegis - library to encapsulate aegis interface in perl scripts.
COPYRIGHT
Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
DETAILS
MANIFEST: Aegis.pm
PROJECT: meta
VERSION: 0.50
SYNOPSIS
package foo;
use Meta::Baseline::Aegis qw();
my($change)=Meta::Baseline::Aegis::change();
DESCRIPTION
This is a perl library to serve as an interface to Aegis. It provides a lot of helpful routines for all the scripts to make them shorter and more understandable. It also encapsulates the way we talk to aegis - you should only speak to aegis through this library and never address aegis alone since the interface to aegis may change and we may want to do some of the stuff (like getting the current change directory) in a more efficient manner (like storing it in an environment variable).
The services here are divided into several categories: 0. variable substituion. 1. history services. 2. file lists. 3. performing operations (checkout etc...).
FUNCTIONS
aesub($)
aesub_file($)
search_path()
baseline()
project()
change()
change_description()
version()
architecture()
copyright_years()
state()
developer()
developer_list()
reviewer_list()
integrator_list()
administrator_list()
development_directory()
integration_directory()
history_directory()
deve()
inte()
inside_change()
work_dir()
which_nodie($)
which($)
which_f($)
which_dir($)
search_path_object()
search_path_list()
search_path_hash()
developer_list_list()
developer_list_hash()
reviewer_list_list()
reviewer_list_hash()
integrator_list_list()
integrator_list_hash()
administrator_list_list()
administrator_list_hash()
change_files_set($$$$$$)
project_files_set($$$)
source_files_set($$$$$$)
base_files_set($$)
missing_files_set()
extra_files_set($)
total_files_set($$)
no_missing_files()
checkout_file($)
checkout_set($)
in_change($)
get_enum()
rc_set()
TEST($)
FUNCTION DOCUMENTATION
- aesub($)
-
This routine will substitute a string for you from aegis and give you the string after substitution. This is done using the aesub aegis routine.
- aesub_file($)
-
This method will get a file name and will run aesub on the content of the file and return the content after substitution. This method uses the aesub method.
- search_path()
-
This routine returns a list that is the search list for the current This routine produces a string which is the correct search list as far as aegis is concerned for source files in the current change or branch. This could be fed into cook as the search_path, converted to compiler include or link directives etc...
- baseline()
-
This routine gives you the baseline dir for your project. Another implementation (thorough aegis) is the one used. It could be implemented by the environment but that would be a bad solution as it is not stable and depends on correct configuration of the environment.
- project()
-
This routine returns the current project name.
- change()
-
This routine returns the current change name.
- change_description()
-
This routine returns the current change description.
- version()
-
This routine returns the current version name.
- architecture()
-
This routine returns the current architecture name.
- copyright_years()
-
This routine returns the copyright years attribute.
- state()
-
This routine returns the current state name.
- developer()
-
This routine returns the current developer name.
- developer_list()
-
This routine returns the current developer list. This is implemented as aesub.
- reviewer_list()
-
This routine returns the current reviewer list. This is implemented as aesub.
- integrator_list()
-
This routine returns the current integrator list. This is implemented as aesub.
- administrator_list()
-
This routine returns the current administrator list. This is implemented as aesub.
- development_directory()
-
This routine gives you the development directory for the current change. This is only valid if the change is in the development stage. This is implemented as aesub.
- integration_directory()
-
This routine gives you the integration directory for the current change. This is only valid if the change is in the integration stage. This is implemented as aesub.
- history_directory()
-
This routine gives you the history directory for the current project. This is always valid. This is implemented as a call to aesub.
- deve()
-
Returns whether the change is in a development state. This checks if the current changes state is "being_developed".
- inte()
-
Returns whether the change is in an integration state. This checks if the current changes state is "being_integrated".
- inside_change()
-
Returns whether the change is in development.
- work_dir()
-
Returns what I defined to be the work dir. This is the development directory if the change is begin developed and the integration directory if the change is being integrated.
- check_exists($)
-
This method will verify that a certain file exists in the aegis development path. The method will throw an exception if this is not so.
- check_direxists($)
-
This method will verify that a certain directory exists in the aegis path as a development directory. The method will throw an exception if this is not so.
- which_nodie($)
-
This routine does the same as the which routine and does not die if the file is not found (just returns undef...).
- which($)
-
This tells you where a source is in the search_path. The file could be in the development directory and up the branches up to the baseline. If the routine doenst find the file it dies. It uses the "which_nodie" routine to do it's thing.
- which_f($)
-
This routine tells you the absolute name of a file in the project but allows for the file to begin with a "/" (meaning allows it to be absolute already). In that case, it just returns the file name.
- which_dir($)
-
This routine will give you the absolute path to a development directory.
- search_path_object()
-
This method will give you the Aegis search path as a search_path object. See the Meta::Utils::File::Patho object documentation about using this object.
- search_path_list()
-
This routine returns the search_path for perl purposes. I.e. - in a list where every element is an element of the path.
- search_path_hash()
-
This routine does exactly as "search_path_list" but returns the results in a hash. This uses "search_path_list" to get a list and converts it into a hash.
- developer_list_list()
-
This routine returns the list of developers in a perl list reference.
- developer_list_hash()
-
This routine returns the list of developers in a perl hash reference.
- reviewer_list_list()
-
This routine returns the list of reviewers in a perl list reference.
- reviewer_list_hash()
-
This routine returns the list of reviewers in a perl hash reference.
- integrator_list_list()
-
This routine returns the list of integrators in a perl list reference.
- integrator_list_hash()
-
This routine returns the list of integrators in a perl hash reference.
- administrator_list_list()
-
This routine returns the list of administrators in a perl list reference.
- administrator_list_hash()
-
This routine returns the list of administrators in a perl hash reference.
- change_files_set($$$$$$)
-
This script gives out all the files in the current change with no extra aegis information. The idea is to use this in other scripts. The best way to implement this is using aegis report and write a special report to do this work. another is using ael cf (aegis -List Change_Files). yet another is aer Change_Files (this is the version that is implemented). An even better way is if we could get a client C interface to aegis from peter miller and hook to it directly from perl (or maybe a perl interface ? could peter miller be this good ?). The data for this routine are: 0. newx - do you want new files included ? 1. modi - do you want modified files included ? 2. dele - do you want deleted files included ? 3. srcx - do you want source files included ? 4. test - do you want test files included ? 5. abso - do you want absolute file names or relative in the output ?
- project_files_set($$$)
-
List all the files in the current baseline project.
- source_files_set($$$$$$)
-
List all the files viewed from the changes point of view This is very useful for grepping etc... There are two parameters: whether deleted files are wanted or not and wheter absolute file names are wanted as a result. There is a trick here - if absolute names are reuiqred (for example-as collected by cook...:) then the aegis is consulted for the files which are in the current change and a switcharoo on the prefix is performed... This is because if we call our own routines with the absolute flag turned on we wont be able to subtract the moved files from the baseline ones (they will have different names...). Aegis has such a report so maybe I should add an implementation which uses it and then check out which performs better.
- base_files_set($$)
-
This gives out all the files left in the baseline.
- missing_files_set()
-
This routine gives out all the missing files for the current change. It does so by using change_files 1 1 1 1 and filtering out all the files which exist using Meta::Utils::Hash::filter_exist().
- extra_files_set($)
-
This returns a hash with all the extra files (files which are not change files) which are lying around in the directory. The algorithm: collect all the files in the working directory and subtract all the files which are in the change.
- total_files_set($$)
-
This gives you all the files from the changes point of view (source+target).
- no_missing_files()
-
This routine returns a boolean according to whether there are or aren't any missing files.
- checkout_file($)
-
This method will check out a single file.
- checkout_set($)
-
This will receive a hash reference and will check out all the files in the hash. The method does not just do a foreach on the set because it is more effective to ask aegis to checkout all files at once.
- in_change($)
-
This function recevies a file name and returns true iff the file is part of the current change.
- get_enum()
-
This method will return an enumeated object depicting all types of source selections that one can make in Aegis.
- TEST($)
-
Test suite for this module. This just prints out some statistics out of that module. This does not pring state related information (for instance - the development_directory feature is only available in development...).
SUPER CLASSES
None.
BUGS
None.
AUTHOR
Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER
HISTORY
0.00 MV initial code brought in
0.01 MV c++ and perl code quality checks
0.02 MV make quality checks on perl code
0.03 MV more perl checks
0.04 MV make Meta::Utils::Opts object oriented
0.05 MV check that all uses have qw
0.06 MV fix todo items look in pod documentation
0.07 MV make all tests real tests
0.08 MV more on tests/more checks to perl
0.09 MV fix all tests change
0.10 MV more on tests
0.11 MV more perl quality
0.12 MV make lilypond work
0.13 MV correct die usage
0.14 MV perl quality change
0.15 MV perl code quality
0.16 MV more perl quality
0.17 MV chess and code quality
0.18 MV more perl quality
0.19 MV perl documentation
0.20 MV more perl quality
0.21 MV perl qulity code
0.22 MV more perl code quality
0.23 MV more perl quality
0.24 MV revision change
0.25 MV revision in files
0.26 MV revision for perl files and better sanity checks
0.27 MV languages.pl test online
0.28 MV history change
0.29 MV web site and docbook style sheets
0.30 MV spelling and papers
0.31 MV perl packaging
0.32 MV more perl packaging
0.33 MV perl packaging again
0.34 MV PDMT
0.35 MV tree type organization in databases
0.36 MV md5 project
0.37 MV database
0.38 MV perl module versions in files
0.39 MV movies and small fixes
0.40 MV graph visualization
0.41 MV md5 progress
0.42 MV thumbnail user interface
0.43 MV more thumbnail issues
0.44 MV paper writing
0.45 MV website construction
0.46 MV web site automation
0.47 MV SEE ALSO section fix
0.48 MV web site development
0.49 MV teachers project
0.50 MV md5 issues
SEE ALSO
Data::Dumper(3), Error(3), Meta::Development::Assert(3), Meta::Ds::Noset(3), Meta::IO::File(3), Meta::Info::Enum(3), Meta::Utils::File::Collect(3), Meta::Utils::File::File(3), Meta::Utils::File::Path(3), Meta::Utils::File::Patho(3), Meta::Utils::Hash(3), Meta::Utils::List(3), Meta::Utils::Output(3), Meta::Utils::Parse::Text(3), Meta::Utils::System(3), Meta::Utils::Utils(3), strict(3)
TODO
-do some caching on the aegis information which we get using aesub (so we wont run aesub all the time...:)
-could we interface the aegis library directly so we wouldnt talk to aegis through executables ? (this is true for the aesub executable and the aegis executable so far...).
-add an interface to aefind here.
-add the aegis backup code here.
-add code to parse the .aegisrc file here.