Blame Manuals/en/Html/Repository/repository_45.html

4c79b5
4c79b5
<html>
6414c4
09d4f2
6414c4
Copyright C 2009, 2010, 2011  Alain Reguera Delgado
4c79b5
4c79b5
Permission is granted to copy, distribute and/or modify this document
4c79b5
under the terms of the GNU Free Documentation License, Version 1.2 or
4c79b5
any later version published by the Free Software Foundation; with no
4c79b5
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
4c79b5
copy of the license is included in the section entitled GNU Free
4c79b5
Documentation License.  
4c79b5
-->
27dad7
4c79b5
4c79b5
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
4c79b5
            Karl Berry  <karl@freefriends.org>
4c79b5
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
4c79b5
            and many others.
4c79b5
Maintained by: Many creative people <dev@texi2html.cvshome.org>
4c79b5
Send bugs and suggestions to <users@texi2html.cvshome.org>
4c79b5
4c79b5
-->
4c79b5
<head>
27dad7
<title>The CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Path</title>
4c79b5
27dad7
<meta name="description" content="The CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Path">
27dad7
<meta name="keywords" content="The CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Path">
4c79b5
<meta name="resource-type" content="document">
4c79b5
<meta name="distribution" content="global">
4c79b5
<meta name="Generator" content="texi2html 1.76">
4c79b5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4c79b5
<style type="text/css">
4c79b5
1e9202
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
4c79b5
4c79b5
a.summary-letter {text-decoration: none}
4c79b5
pre.display {font-family: serif}
4c79b5
pre.format {font-family: serif}
4c79b5
pre.menu-comment {font-family: serif}
4c79b5
pre.menu-preformatted {font-family: serif}
4c79b5
pre.smalldisplay {font-family: serif; font-size: smaller}
4c79b5
pre.smallexample {font-size: smaller}
4c79b5
pre.smallformat {font-family: serif; font-size: smaller}
4c79b5
pre.smalllisp {font-size: smaller}
4c79b5
span.sansserif {font-family:sans-serif; font-weight:normal;}
4c79b5
ul.toc {list-style: none}
4c79b5
-->
4c79b5
</style>
4c79b5
4c79b5
4c79b5
</head>
4c79b5
4c79b5
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
4c79b5
4c79b5
27dad7
[ < ]
27dad7
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
27dad7
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
27dad7
[Index]
4c79b5
[ ? ]
4c79b5
27dad7
27dad7
27dad7

3.42 trunk/Scripts/Bash/Functions/Path

27dad7
27dad7
27dad7
27dad7

3.42.1 Goals

27dad7
27dad7

This section exists to organize files related to path

27dad7
functiontionality.  The path functionality standardizes
27dad7
movement, syncronization, branching, tagging, and general file
27dad7
maintainance inside the repository. 
27dad7

27dad7
27dad7
27dad7

3.42.2 Description

27dad7
27dad7

"CentOS like trees, has roots, trunk, branches, leaves and

27dad7
flowers.  Day by day they work together in freedom, ruled by the laws
27dad7
of nature and open standards, to show the beauty of its existence."
27dad7

27dad7
27dad7
27dad7

3.42.2.1 Repository layout

27dad7
27dad7

The repository layout describes organization of files and directories

27dad7
inside the repository. The repository layout provides the standard
27dad7
backend required for automation scripts to work correctly. If such
27dad7
layout changes unexpectedly, automation scripts may confuse themselves
27dad7
and stop doing what we expect from them to do.
27dad7

27dad7

As convenction, inside CentOS Artwork Repository, we organize files

27dad7
and directories related to CentOS corporate visual identity under
27dad7
three top level directories named: <tt>`trunk/'</tt>, <tt>`branches/'</tt>,
27dad7
and <tt>`tags/'</tt>. 
27dad7

27dad7
27dad7

trunk/Identity/Models/Img/Scripts/Bash/Functions/Path/figure-6

27dad7
27dad7

Figure 3.15: The CentOS Artwork Repository layout.

27dad7
27dad7

27dad7

The <tt>`trunk/'</tt> directory (see section trunk) organizes the main

27dad7
development line of CentOS corporate visual identity. Inside
27dad7
<tt>`trunk/'</tt> directory structure, the CentOS corporate visual
27dad7
identity concepts are implemented using directories.  There is one
27dad7
directory level for each relevant concept inside the repository. The
27dad7
<tt>`trunk/'</tt> directory structure is mainly used to perform
27dad7
development tasks related to CentOS corporate visual identity.
27dad7

27dad7

The <tt>`branches/'</tt> directory (see section branches) oranizes parallel

27dad7
development lines to <tt>`trunk/'</tt> directory. The <tt>`branches/'</tt>
27dad7
directory is used to set points in time where develpment lines are
27dad7
devided one from another taking separte and idependent lives that
27dad7
share a common past from the point they were devided on. The
27dad7
<tt>`branches/'</tt> directory is mainly used to perform quality assurance
27dad7
tasks related to CentOS corporate visual identity.
27dad7

27dad7

The <tt>`tags/'</tt> directory (see section tags) organizes parallel frozen

27dad7
lines to <tt>`branches/'</tt> directory.  The parallel frozen lines are
27dad7
immutable, nothing change inside them once they has been created.  The
27dad7
<tt>`tags/'</tt> directory is mainly used to publish final releases of
27dad7
CentOS corporate visual identity.
27dad7

27dad7

The CentOS Artwork Repository layout is firmly grounded on a

27dad7
Subversion base.  Subversion (http://subversion.tigris.org) is a
27dad7
version control system, which allows you to keep old versions of files
27dad7
and directories (usually source code), keep a log of who, when, and
27dad7
why changes occurred, etc., like CVS, RCS or SCCS.  Subversion keeps a
27dad7
single copy of the master sources.  This copy  is called the source
27dad7
"repository"; it contains all the information to permit extracting
27dad7
previous versions of those files at any time.
27dad7

27dad7
27dad7
27dad7

3.42.2.2 Repository name convenctions

27dad7
27dad7

Repository name convenctions help us to maintain consistency of names

27dad7
inside the repository.
27dad7

27dad7

Repository name convenctions are applied to files and directories

27dad7
inside the repository layout. As convenction, inside the repository
27dad7
layout, file names are all written in lowercase
27dad7
(<samp>`01-welcome.png'</samp>, <samp>`splash.png'</samp>, <samp>`anaconda_header.png'</samp>,
27dad7
etc.) and directory names are all written capitalized (e.g.,
27dad7
<samp>`Identity'</samp>, <samp>`Themes'</samp>, <samp>`Motifs'</samp>, <samp>`TreeFlower'</samp>,
27dad7
etc.).
27dad7

27dad7

Repository name convenctions are implemented inside the

27dad7
cli_getRepoName function of <tt>`centos-art.sh'</tt> script. With
27dad7
cli_getRepoName function we reduce the amount of commands and
27dad7
convenctions to remember, concentrating them in just one single place
27dad7
to look for fixes and improvements.
27dad7

27dad7
27dad7
27dad7

3.42.2.3 Repository work flow

27dad7
27dad7

Repository work flow describes the steps and time intervals used to

27dad7
produce CentOS corporate visual identity inside CentOS Artwork
27dad7
Repository.  
27dad7

27dad7

To illustrate repository work flow let's consider themes' development

27dad7
cycle. 
27dad7

27dad7

Initially, we start working themes on their trunk development line

27dad7
(e.g., <tt>`trunk/Identity/Themes/Motifs/TreeFlower/'</tt>), here we
27dad7
organize information that cannot be produced automatically (i.e.,
27dad7
background images, concepts, color information, screenshots, etc.).
27dad7

27dad7

Later, when theme trunk development line is considered "ready" for

27dad7
implementation (e.g.,  all required backgrounds have been designed),
27dad7
we create a branch for it (e.g.,
27dad7
<tt>`branches/Identity/Themes/Motifs/TreeFlower/1/'</tt>).  Once the
27dad7
branch has been created, we forget that branch and continue working
27dad7
the trunk development line while others (e.g., an artwork quality
27dad7
assurance team) test the new branch for tunning it up. 
27dad7

27dad7

Once the branch has been tunned up, and considered "ready" for

27dad7
release, it is freezed under <tt>`tags/'</tt> directory (e.g.,
27dad7
<tt>`tags/Identity/Themes/Motifs/TreeFower/1.0/'</tt>) for packagers,
27dad7
webmasters, promoters, and anyone who needs images from that CentOS
27dad7
theme the tag was created for.
27dad7

27dad7

Both branches and tags, inside CentOS Artwork Repository, use

27dad7
numerical values to identify themselves under the same location.
27dad7
Branches start at one (i.e., <samp>`1'</samp>) and increment one unit for each
27dad7
branch created from the same trunk development line.  Tags start at
27dad7
zero (i.e., <samp>`0'</samp>) and increment one unit for each tag created from
27dad7
the same branch development line.
27dad7

27dad7
27dad7

trunk/Identity/Models/Img/Scripts/Bash/Functions/Path/figure-1

27dad7
27dad7

Figure 3.16: Name convention for tags and branches creation.

27dad7
27dad7

27dad7
Convenction

Convenction

Do not freeze trunk development lines using tags

27dad7
directly.  If you think you need to freeze a trunk development line,
27dad7
create a branch for it and then freeze that branch instead.
27dad7

27dad7
27dad7

The trunk development line may introduce problems we cannot see

27dad7
immediatly. Certainly, the high changable nature of trunk development
27dad7
line complicates finding and fixing such problems. On the other hand,
27dad7
the branched development lines provide a more predictable area where
27dad7
only fixes/corrections to current content are commited up to
27dad7
repository. 
27dad7

27dad7

If others find and fix bugs inside the branched development line, we

27dad7
could merge such changes/experiences back to trunk development line
27dad7
(not visversa) in order for future branches, created from trunk, to
27dad7
benefit.
27dad7

27dad7

Time intervals used to create branches and tags may vary, just as

27dad7
different needs may arrive. For example, consider the release schema
27dad7
of CentOS distribution: one major release every 2 years, security
27dad7
updates every 6 months, support for 7 years long. Each time a CentOS
27dad7
distribution is released, specially if it is a major release, there is
27dad7
a theme need in order to cover CentOS distribution artwork
27dad7
requirements. At this point, is where CentOS Artwork Repository comes
27dad7
up to scene. 
27dad7

27dad7

Before releasing a new major release of CentOS distribution we create

27dad7
a branch for one of several theme development lines available inside
27dad7
the CentOS Artwork Repository, perform quality assurance on it, and
27dad7
later, freeze that branch using tags. Once a the theme branch has been
27dad7
frozen (under <tt>`tags/'</tt> directory), CentOS Packagers (the persons
27dad7
whom build CentOS distribution) can use that frozen branch as source
27dad7
location to fulfill CentOS distribution artwork needs. The same
27dad7
applies to CentOS Webmasters (the persons whom build CentOS websites),
27dad7
and any other visual manifestation required by the project.
27dad7

27dad7
01b527
27dad7

3.42.2.4 Parallel directories

27dad7
27dad7

Inside CentOS Artwork Repository, parallel directories are simple

27dad7
directory entries built from a common parent directory and placed in a
27dad7
location different to that, the common parent directory is placed on.
27dad7
Parallel directories are useful to create branches, tags,
27dad7
translations, documentation, pre-rendering configuration script, and
27dad7
similar directory structures.
27dad7

27dad7

Parallel directories take their structure from one unique parent

27dad7
directory. Inside CentOS Artwork Repository, this unique parent
27dad7
directory is under <tt>`trunk/Identity'</tt> location.  The
27dad7
<tt>`trunk/Identity'</tt> location must be considered the reference for
27dad7
whatever information you plan to create inside the repository.
27dad7

27dad7

In some circumstances, parallel directories may be created removing

27dad7
uncommon information from their paths. Uncommon path information
27dad7
refers to those directory levels in the path which are not common for
27dad7
other parallel directories.  For example, when rendering
27dad7
<tt>`trunk/Identity/Themes/Motifs/TreeFlower/Distro'</tt> directory
27dad7
structure, the <tt>`centos-art.sh'</tt> script removes the
27dad7
<tt>`Motifs/TreeFlower/'</tt> directory levels from path, in order to
27dad7
build the parallel directory used to retrived translations, and
27dad7
pre-rendering configuration scripts required by render
27dad7
functionality.
27dad7

27dad7
27dad7

trunk/Identity/Models/Img/Scripts/Bash/Functions/Path/figure-3

6414c4
27dad7

Figure 3.17: Parallel directories removing uncommon information.

27dad7
27dad7

27dad7

Another example of parallel directory is the documentation structure

27dad7
created by manual functionality. This time,
27dad7
<tt>`centos-art.sh'</tt> script uses parallel directory information with
27dad7
uncommon directory levels to build the documentation entry required by
27dad7
Texinfo documentation system, inside the repository.
27dad7

27dad7

Othertimes, parallel directories may add uncommon information to their

27dad7
paths. This is the case we use to create branches and tags. When we
27dad7
create branches and tags, a numerical identifier is added to parallel
27dad7
directory structure path. The place where the numerical identifier is
27dad7
set on is relevant to corporate visual identity structure and should
27dad7
be carefully considered where it will be.
27dad7

27dad7
27dad7

trunk/Identity/Models/Img/Scripts/Bash/Functions/Path/figure-4

27dad7
27dad7

Figure 3.18: Parallel directories adding uncommon information.

27dad7
27dad7

27dad7

When one parent directory changes, all their related parallel

27dad7
directories need to be changed too. This is required in order for
27dad7
parallel directories to retain their relation with the parent
27dad7
directory structure.  In the other hand, parallel directories should
27dad7
never be modified under no reason but to satisfy the relation to their
27dad7
parent directory structure.  Liberal change of parallel directories
27dad7
may suppresses the conceptual idea they were initially created for;
27dad7
and certainly, things may stop working the way they should do.
27dad7

27dad7
27dad7

trunk/Identity/Models/Img/Scripts/Bash/Functions/Path/figure-5

27dad7
27dad7

Figure 3.19: Wrong construction of parallel directories.

27dad7
27dad7

0d952c
01b527
27dad7

3.42.2.5 Syncronizing path information

749e81
27dad7

Parallel directories are very useful to keep repository organized but

27dad7
introduce some complications.  For instance, consider what would
27dad7
happen to functionalities like manual (<samp>`trunk Scripts Bash
27dad7
Functions Manual'</samp>) that rely on parent directory structures to create
27dad7
documentation entries (using parallel directory structures) if one of
27dad7
those parent directory structures suddenly changes after the
27dad7
documentation entry has been already created for it? 
27dad7

27dad7

In such cases, functionalities like manual may confuse

27dad7
themselves if path information is not updated to reflect the relation
27dad7
with its parent directory.  Such functionalities work with parent
27dad7
directory structure as reference; if a parent directory changes, the
27dad7
functionalities dont't even note it because they work with the last
27dad7
parent directory structure available in the repository, no matter what
27dad7
it is. 
27dad7

27dad7

In the specific case of documentation (the manual

27dad7
functionality), the problem mentioned above provokes that older parent
27dad7
directories, already documented, remain inside documentation directory
27dad7
structures as long as you get your hands into the documentation
27dad7
directory structure (<tt>`trunk/Manuals'</tt>) and change what must be
27dad7
changed to match the new parent directory structure.
27dad7

27dad7

There is no immediate way for manual, and similar

27dad7
functionalities that use parent directories as reference, to know when
27dad7
and how directory movements take place inside the repository. Such
27dad7
information is available only when the file movement itself takes
27dad7
place inside the repository. So, is there, at the moment of moving
27dad7
files, when we need to syncronize parallel directories with their
27dad7
unique parent directory structure.
27dad7

27dad7
Warning

Warning

There is not support for URL reference inside

27dad7
<tt>`centos-art.sh'</tt> script.  The <tt>`centos-art.sh'</tt> script is
27dad7
designed to work with local files inside the working copy only.
27dad7

0d952c
27dad7

As CentOS Artwork Repository is built over a version control system,

27dad7
file movements inside the repository are considered repository
27dad7
changes. In order for these repository changes to be versioned, we
27dad7
need to, firstly, add changes into the version control system, commit
27dad7
them, and later, perform movement actions using version control system
27dad7
commands. This configuration makes possible for everyone to know about
27dad7
changes details inside the repository; and if needed, revert or update
27dad7
them back to a previous revision.
27dad7

27dad7

Finally, once all path information has been corrected, it is time to

27dad7
take care of information inside the files. For instance, considere
27dad7
what would happen if you make a reference to a documentation node, and
27dad7
later the documentation node you refere to is deleted. That would make
27dad7
Texinfo to produce error messages at export time. So, the
27dad7
<tt>`centos-art.sh'</tt> script needs to know when such changes happen, in
27dad7
a way they could be noted and handled without producing errors.
27dad7

49b888
01b527
27dad7

3.42.2.6 What is the right place to store it?

0d952c
27dad7

Occasionly, you may find that new corporate visual identity components

27dad7
need to be added to the repository. If that is your case, the first
27dad7
question you need to ask yourself, before start to create directories
27dad7
blindly all over, is: What is the right place to store it?
27dad7

27dad7

The CentOS Community different free support vains (see:

27dad7
http://wiki.centos.org/GettingHelp) are the best place to find
27dad7
answers to your question, but going there with hands empty is not good
27dad7
idea. It may give the impression you don't really care about. Instead,
27dad7
consider the following suggestions to find your own comprehension and
27dad7
so, make your propositions based on it.
27dad7

27dad7

When we are looking for the correct place to store new files, to bear

27dad7
in mind the corporate visual identity structure used inside the CentOS
27dad7
Artwork Repository (see section trunk/Identity) would be probaly the best
27dad7
advice we could offer, the rest is just matter of choosing appropriate
27dad7
names.  To illustrate this desition process let's consider the
27dad7
<tt>`trunk/Identity/Themes/Motifs/TreeFlower'</tt> directory as
27dad7
example. It is the trunk development line of TreeFlower's artistic
27dad7
motif. Artistic motifs are considered part of themes, which in turn
27dad7
are considered part of CentOS corporate visual identity.
27dad7

27dad7

When building parent directory structures, you may find that reaching

27dad7
an acceptable location may take some time, and as it uses to happen
27dad7
most of time; once you've find it, that may be not a definite
27dad7
solution.  There are many concepts that you need to play with, in
27dad7
order to find a result that match the conceptual idea you try to
27dad7
implement in the new directory location. To know which these concepts
27dad7
are, split the location in words and read its documentation entry from
27dad7
less specific to more specific.
27dad7

27dad7

For example, the <tt>`trunk/Identity/Themes/Motifs/TreeFlower'</tt>

27dad7
location evolved through several months of contant work and there is
27dad7
no certain it won't change in the future, even it fixes quite well the
27dad7
concept we are trying to implement.  The concepts used in
27dad7
<tt>`trunk/Identity/Themes/Distro/Motifs/TreeFlower'</tt> location are
27dad7
described in the following commands, respectively:
27dad7

27dad7
centos-art manual --read=turnk/
27dad7
centos-art manual --read=turnk/Identity/
27dad7
centos-art manual --read=turnk/Identity/Themes/
27dad7
centos-art manual --read=turnk/Identity/Themes/Motifs/
27dad7
centos-art manual --read=turnk/Identity/Themes/Motifs/TreeFlower/
27dad7
27dad7

Other location concepts can be found similary as we did above, just

27dad7
change the location we used above by the one you are trying to know
27dad7
concepts for.
27dad7

e37211
01b527
e37211

3.42.3 Usage

e37211
27dad7
27dad7
centos-art path --copy='SRC' --to='DST'
27dad7
27dad7

Copy <samp>`SRC'</samp> to <samp>`DST'</samp> and schedule <samp>`DST'</samp> for

27dad7
addition (with history).  In this command, <tt>`SRC'</tt> and <tt>`DST'</tt>
27dad7
are both working copy (WC) entries.
27dad7

27dad7
27dad7
centos-art path --delete='SRC'
27dad7
27dad7

Delete <samp>`DST'</samp>. In order for this command to work the file or

27dad7
directory you intend to delete should be under version control first.
27dad7
In this command, <tt>`SRC'</tt> is a working copy (WC) entry.  
27dad7

27dad7
27dad7
e37211
e37211
01b527
54264c

3.42.4 See also

4c79b5
63f275
27dad7
3.37 trunk/Scripts/Bash  
27dad7
27dad7
3.38 trunk/Scripts/Bash/Functions  
63f275
63f275
4c79b5
4c79b5
4c79b5
01b527
[ < ]
01b527
[ > ]
4c79b5
   
4c79b5
[ << ]
27dad7
[ Up ]
27dad7
[ >> ]
4c79b5
4c79b5

4c79b5
 <font size="-1">
27dad7
  This document was generated on January, 6 2011 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

4c79b5
</body>
4c79b5
</html>