Blame Manuals/Repository/trunk/Scripts/Bash/Functions/Path.texi

d18d63
@subsection Goals
d18d63
d18d63
This section exists to organize files related to @code{path}
d18d63
functiontionality.  The @code{path} functionality standardizes
d18d63
movement, syncronization, branching, tagging, and general file
d18d63
maintainance inside the repository. 
d18d63
d18d63
@subsection Description
d18d63
d18d63
@emph{''CentOS like trees, has roots, trunk, branches, leaves and
d18d63
flowers.  Day by day they work together in freedom, ruled by the laws
d18d63
of nature and open standards, to show the beauty of its existence.''}
d18d63
d18d63
@subsubsection Repository layout
d18d63
d18d63
The repository layout describes organization of files and directories
d18d63
inside the repository. The repository layout provides the standard
d18d63
backend required for automation scripts to work correctly. If such
d18d63
layout changes unexpectedly, automation scripts may confuse themselves
d18d63
and stop doing what we expect from them to do.
d18d63
d18d63
As convenction, inside CentOS Artwork Repository, we organize files
d18d63
and directories related to CentOS corporate visual identity under
d18d63
three top level directories named: @file{trunk/}, @file{branches/},
d18d63
and @file{tags/}. 
d18d63
d18d63
The @file{trunk/} directory (@pxref{trunk}) organizes the main
d18d63
development line of CentOS corporate visual identity. Inside
d18d63
@file{trunk/} directory structure, the CentOS corporate visual
d18d63
identity concepts are implemented using directories.  There is one
d18d63
directory level for each relevant concept inside the repository. The
d18d63
@file{trunk/} directory structure is mainly used to perform
d18d63
development tasks related to CentOS corporate visual identity.
d18d63
d18d63
The @file{branches/} directory (@pxref{branches}) oranizes parallel
d18d63
development lines to @file{trunk/} directory. The @file{branches/}
d18d63
directory is used to set points in time where develpment lines are
d18d63
devided one from another taking separte and idependent lives that
d18d63
share a common past from the point they were devided on. The
d18d63
@file{branches/} directory is mainly used to perform quality assurance
d18d63
tasks related to CentOS corporate visual identity.
d18d63
d18d63
The @file{tags/} directory (@pxref{tags}) organizes parallel frozen
d18d63
lines to @file{branches/} directory.  The parallel frozen lines are
d18d63
immutable, nothing change inside them once they has been created.  The
d18d63
@file{tags/} directory is mainly used to publish final releases of
d18d63
CentOS corporate visual identity.
d18d63
d18d63
The CentOS Artwork Repository layout is firmly grounded on a
d18d63
Subversion base.  Subversion (@url{http://subversion.tigris.org}) is a
d18d63
version control system, which allows you to keep old versions of files
d18d63
and directories (usually source code), keep a log of who, when, and
d18d63
why changes occurred, etc., like CVS, RCS or SCCS.  Subversion keeps a
d18d63
single copy of the master sources.  This copy  is called the source
d18d63
``repository''; it contains all the information to permit extracting
d18d63
previous versions of those files at any time.
d18d63
d18d63
@subsubsection Repository name convenctions
d18d63
d18d63
Repository name convenctions help us to maintain consistency of names
d18d63
inside the repository.
d18d63
d18d63
Repository name convenctions are applied to files and directories
d18d63
inside the repository layout. As convenction, inside the repository
d18d63
layout, file names are all written in lowercase
d18d63
(@samp{01-welcome.png}, @samp{splash.png}, @samp{anaconda_header.png},
d18d63
etc.) and directory names are all written capitalized (e.g.,
d18d63
@samp{Identity}, @samp{Themes}, @samp{Motifs}, @samp{TreeFlower},
d18d63
etc.).
d18d63
d18d63
Repository name convenctions are implemented inside the
d18d63
@code{cli_getRepoName} function of @file{centos-art.sh} script. With
d18d63
@code{cli_getRepoName} function we reduce the amount of commands and
d18d63
convenctions to remember, concentrating them in just one single place
d18d63
to look for fixes and improvements.
d18d63
d18d63
@subsubsection Repository work flow
d18d63
d18d63
Repository work flow describes the steps and time intervals used to
d18d63
produce CentOS corporate visual identity inside CentOS Artwork
d18d63
Repository.  
d18d63
d18d63
To illustrate repository work flow let's consider themes' development
d18d63
cycle. 
d18d63
d18d63
Initially, we start working themes on their trunk development line
d18d63
(e.g., @file{trunk/Identity/Themes/Motifs/TreeFlower/}), here we
d18d63
organize information that cannot be produced automatically (i.e.,
d18d63
background images, concepts, color information, screenshots, etc.).
d18d63
d18d63
Later, when theme trunk development line is considered ``ready'' for
d18d63
implementation (e.g.,  all required backgrounds have been designed),
d18d63
we create a branch for it (e.g.,
d18d63
@file{branches/Identity/Themes/Motifs/TreeFlower/1/}).  Once the
d18d63
branch has been created, we forget that branch and continue working
d18d63
the trunk development line while others (e.g., an artwork quality
d18d63
assurance team) test the new branch for tunning it up. 
d18d63
d18d63
Once the branch has been tunned up, and considered ``ready'' for
d18d63
release, it is freezed under @file{tags/} directory (e.g.,
d18d63
@file{tags/Identity/Themes/Motifs/TreeFower/1.0/}) for packagers,
d18d63
webmasters, promoters, and anyone who needs images from that CentOS
d18d63
theme the tag was created for.
d18d63
d18d63
Both branches and tags, inside CentOS Artwork Repository, use
d18d63
numerical values to identify themselves under the same location.
d18d63
Branches start at one (i.e., @samp{1}) and increment one unit for each
d18d63
branch created from the same trunk development line.  Tags start at
d18d63
zero (i.e., @samp{0}) and increment one unit for each tag created from
d18d63
the same branch development line.
d18d63
d18d63
@quotation
d18d63
@strong{Convenction} Do not freeze trunk development lines using tags
d18d63
directly.  If you think you need to freeze a trunk development line,
d18d63
create a branch for it and then freeze that branch instead.
d18d63
@end quotation
d18d63
d18d63
The trunk development line may introduce problems we cannot see
d18d63
immediatly. Certainly, the high changable nature of trunk development
d18d63
line complicates finding and fixing such problems. On the other hand,
d18d63
the branched development lines provide a more predictable area where
d18d63
only fixes/corrections to current content are commited up to
d18d63
repository. 
d18d63
d18d63
If others find and fix bugs inside the branched development line, we
d18d63
could merge such changes/experiences back to trunk development line
d18d63
(not visversa) in order for future branches, created from trunk, to
d18d63
benefit.
d18d63
d18d63
Time intervals used to create branches and tags may vary, just as
d18d63
different needs may arrive. For example, consider the release schema
d18d63
of CentOS distribution: one major release every 2 years, security
d18d63
updates every 6 months, support for 7 years long. Each time a CentOS
d18d63
distribution is released, specially if it is a major release, there is
d18d63
a theme need in order to cover CentOS distribution artwork
d18d63
requirements. At this point, is where CentOS Artwork Repository comes
d18d63
up to scene. 
d18d63
d18d63
Before releasing a new major release of CentOS distribution we create
d18d63
a branch for one of several theme development lines available inside
d18d63
the CentOS Artwork Repository, perform quality assurance on it, and
d18d63
later, freeze that branch using tags. Once a the theme branch has been
d18d63
frozen (under @file{tags/} directory), CentOS Packagers (the persons
d18d63
whom build CentOS distribution) can use that frozen branch as source
d18d63
location to fulfill CentOS distribution artwork needs. The same
d18d63
applies to CentOS Webmasters (the persons whom build CentOS websites),
d18d63
and any other visual manifestation required by the project.
d18d63
d18d63
@subsubsection Parallel directories
d18d63
d18d63
Inside CentOS Artwork Repository, parallel directories are simple
d18d63
directory entries built from a common parent directory and placed in a
d18d63
location different to that, the common parent directory is placed on.
d18d63
Parallel directories are useful to create branches, tags,
d18d63
translations, documentation, pre-rendering configuration script, and
d18d63
similar directory structures.
d18d63
d18d63
Parallel directories take their structure from one unique parent
d18d63
directory. Inside CentOS Artwork Repository, this unique parent
d18d63
directory is under @file{trunk/Identity} location.  The
d18d63
@file{trunk/Identity} location must be considered the reference for
d18d63
whatever information you plan to create inside the repository.
d18d63
d18d63
In some circumstances, parallel directories may be created removing
d18d63
uncommon information from their paths. Uncommon path information
d18d63
refers to those directory levels in the path which are not common for
d18d63
other parallel directories.  For example, when rendering
d18d63
@file{trunk/Identity/Themes/Motifs/TreeFlower/Distro} directory
d18d63
structure, the @file{centos-art.sh} script removes the
d18d63
@file{Motifs/TreeFlower/} directory levels from path, in order to
d18d63
build the parallel directory used to retrived translations, and
d18d63
pre-rendering configuration scripts required by @code{render}
d18d63
functionality.
d18d63
d18d63
Another example of parallel directory is the documentation structure
d18d63
created by @code{manual} functionality. This time,
d18d63
@file{centos-art.sh} script uses parallel directory information with
d18d63
uncommon directory levels to build the documentation entry required by
d18d63
Texinfo documentation system, inside the repository.
d18d63
d18d63
Othertimes, parallel directories may add uncommon information to their
d18d63
paths. This is the case we use to create branches and tags. When we
d18d63
create branches and tags, a numerical identifier is added to parallel
d18d63
directory structure path. The place where the numerical identifier is
d18d63
set on is relevant to corporate visual identity structure and should
d18d63
be carefully considered where it will be.
d18d63
d18d63
When one parent directory changes, all their related parallel
d18d63
directories need to be changed too. This is required in order for
d18d63
parallel directories to retain their relation with the parent
d18d63
directory structure.  In the other hand, parallel directories should
d18d63
never be modified under no reason but to satisfy the relation to their
d18d63
parent directory structure.  Liberal change of parallel directories
d18d63
may suppresses the conceptual idea they were initially created for;
d18d63
and certainly, things may stop working the way they should do.
d18d63
d18d63
@subsubsection Syncronizing path information
d18d63
d18d63
Parallel directories are very useful to keep repository organized but
d18d63
introduce some complications.  For instance, consider what would
d18d63
happen to functionalities like @code{manual} (@samp{trunk Scripts Bash
d18d63
Functions Manual}) that rely on parent directory structures to create
d18d63
documentation entries (using parallel directory structures) if one of
d18d63
those parent directory structures suddenly changes after the
d18d63
documentation entry has been already created for it? 
d18d63
d18d63
In such cases, functionalities like @code{manual} may confuse
d18d63
themselves if path information is not updated to reflect the relation
d18d63
with its parent directory.  Such functionalities work with parent
d18d63
directory structure as reference; if a parent directory changes, the
d18d63
functionalities dont't even note it because they work with the last
d18d63
parent directory structure available in the repository, no matter what
d18d63
it is. 
d18d63
d18d63
In the specific case of documentation (the @code{manual}
d18d63
functionality), the problem mentioned above provokes that older parent
d18d63
directories, already documented, remain inside documentation directory
d18d63
structures as long as you get your hands into the documentation
d18d63
directory structure (@file{trunk/Manuals}) and change what must be
d18d63
changed to match the new parent directory structure.
d18d63
d18d63
There is no immediate way for @code{manual}, and similar
d18d63
functionalities that use parent directories as reference, to know when
d18d63
and how directory movements take place inside the repository. Such
d18d63
information is available only when the file movement itself takes
d18d63
place inside the repository. So, is there, at the moment of moving
d18d63
files, when we need to syncronize parallel directories with their
d18d63
unique parent directory structure.
d18d63
d18d63
@quotation
d18d63
@strong{Warning} There is not support for URL reference inside
d18d63
@file{centos-art.sh} script.  The @file{centos-art.sh} script is
d18d63
designed to work with local files inside the working copy only.
d18d63
@end quotation
d18d63
d18d63
As CentOS Artwork Repository is built over a version control system,
d18d63
file movements inside the repository are considered repository
d18d63
changes. In order for these repository changes to be versioned, we
d18d63
need to, firstly, add changes into the version control system, commit
d18d63
them, and later, perform movement actions using version control system
d18d63
commands. This configuration makes possible for everyone to know about
d18d63
changes details inside the repository; and if needed, revert or update
d18d63
them back to a previous revision.
d18d63
d18d63
Finally, once all path information has been corrected, it is time to
d18d63
take care of information inside the files. For instance, considere
d18d63
what would happen if you make a reference to a documentation node, and
d18d63
later the documentation node you refere to is deleted. That would make
d18d63
Texinfo to produce error messages at export time. So, the
d18d63
@file{centos-art.sh} script needs to know when such changes happen, in
d18d63
a way they could be noted and handled without producing errors.
d18d63
d18d63
@subsubsection What is the right place to store it?
d18d63
d18d63
Occasionly, you may find that new corporate visual identity components
d18d63
need to be added to the repository. If that is your case, the first
d18d63
question you need to ask yourself, before start to create directories
d18d63
blindly all over, is: What is the right place to store it?
d18d63
d18d63
The CentOS Community different free support vains (see:
d18d63
@url{http://wiki.centos.org/GettingHelp}) are the best place to find
d18d63
answers to your question, but going there with hands empty is not good
d18d63
idea. It may give the impression you don't really care about. Instead,
d18d63
consider the following suggestions to find your own comprehension and
d18d63
so, make your propositions based on it.
d18d63
d18d63
When we are looking for the correct place to store new files, to bear
d18d63
in mind the corporate visual identity structure used inside the CentOS
d18d63
Artwork Repository (@pxref{trunk Identity}) would be probaly the best
d18d63
advice we could offer, the rest is just matter of choosing appropriate
d18d63
names.  To illustrate this desition process let's consider the
d18d63
@file{trunk/Identity/Themes/Motifs/TreeFlower} directory as example.
d18d63
It is the trunk development line of @emph{TreeFlower} artistic motif.
d18d63
Artistic motifs are considered part of themes, which in turn are
d18d63
considered part of CentOS corporate visual identity.
d18d63
d18d63
When building parent directory structures, you may find that reaching
d18d63
an acceptable location may take some time, and as it uses to happen
d18d63
most of time; once you've find it, that may be not a definite
d18d63
solution.  There are many concepts that you need to play with, in
d18d63
order to find a result that match the conceptual idea you try to
d18d63
implement in the new directory location. To know which these concepts
d18d63
are, split the location in words and read its documentation entry from
d18d63
less specific to more specific.
d18d63
d18d63
For example, the @file{trunk/Identity/Themes/Motifs/TreeFlower}
d18d63
location evolved through several months of contant work and there is
d18d63
no certain it won't change in the future, even it fixes quite well the
d18d63
concept we are trying to implement.  The concepts used in
d18d63
@file{trunk/Identity/Themes/Distro/Motifs/TreeFlower} location are
d18d63
described in the following commands, respectively:
d18d63
d18d63
@verbatim
d18d63
centos-art manual --read=turnk/
d18d63
centos-art manual --read=turnk/Identity/
d18d63
centos-art manual --read=turnk/Identity/Themes/
d18d63
centos-art manual --read=turnk/Identity/Themes/Motifs/
d18d63
centos-art manual --read=turnk/Identity/Themes/Motifs/TreeFlower/
d18d63
@end verbatim
d18d63
d18d63
Other location concepts can be found similary as we did above, just
d18d63
change the location we used above by the one you are trying to know
d18d63
concepts for.
d18d63
d18d63
@subsection Usage
d18d63
d18d63
@table @command
d18d63
@item centos-art path --copy='SRC' --to='DST'
d18d63
d18d63
Copy @option{SRC} to @option{DST} and schedule @option{DST} for
d18d63
addition (with history).  In this command, @file{SRC} and @file{DST}
d18d63
are both working copy (WC) entries.
d18d63
d18d63
@item centos-art path --delete='SRC'
d18d63
d18d63
Delete @option{DST}. In order for this command to work the file or
d18d63
directory you intend to delete should be under version control first.
d18d63
In this command, @file{SRC} is a working copy (WC) entry.  
d18d63
d18d63
@end table
d18d63
d18d63
@subsection See also
d18d63
d18d63
@menu
d18d63
* trunk Scripts Bash::
d18d63
* trunk Scripts Bash Functions::
d18d63
@end menu