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

4c79b5
4c79b5
<html>
09d4f2
09d4f2
09d4f2
The CentOS Artwork Repository exists to organize and automate The
09d4f2
CentOS Project corporate visual identity (, to
09d4f2
start on).
4c79b5
6c4982
Copyright C 2009, 2010 Alain Reguera Delgado. All rights
4c79b5
reserved.
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
-->
008ee0
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>
831389
<title>CentOS Artwork Repository: 3.41 trunk/Scripts/Bash/Functions/Path</title>
4c79b5
831389
<meta name="description" content="CentOS Artwork Repository: 3.41 trunk/Scripts/Bash/Functions/Path">
831389
<meta name="keywords" content="CentOS Artwork Repository: 3.41 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
831389
[ < ]
831389
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
831389
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
831389
[Index]
4c79b5
[ ? ]
4c79b5
831389
831389
831389

3.41 trunk/Scripts/Bash/Functions/Path

63f275
63f275
831389
e68a7a

3.41.1 Goals

e68a7a
831389

This section exists to organize files related to path

831389
functiontionality of <tt>`centos-art.sh'</tt> script.  The path
831389
functionality of <tt>`centos-art.sh'</tt> script standardizes movement,
831389
syncronization, branching, tagging, and general file maintainance
831389
inside the repository. 
831389

831389
831389
831389

3.41.2 Description

831389
831389

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

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

831389
831389
831389

3.41.2.1 Repository layout

831389
831389

The repository layout describes organization of files and directories

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

831389

As convenction, inside CentOS Artwork Repository, we organize files

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

831389
831389

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

831389
831389

Figure 3.10: The CentOS Artwork Repository layout.

831389
831389

831389

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

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

831389

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

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

831389

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

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

831389

The CentOS Artwork Repository layout is firmly grounded on a

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

63f275
831389
831389

3.41.2.2 Repository name convenctions

831389
831389

Repository name convenctions help us to maintain consistency of names

831389
inside the repository.
831389

831389

Repository name convenctions are applied to files and directories

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

831389

Repository name convenctions are implemented inside the

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

63f275
cbf5a9
831389

3.41.2.3 Repository work flow

e68a7a
831389

Repository work flow describes the steps and time intervals used to

831389
produce CentOS corporate visual identity inside CentOS Artwork
831389
Repository.  
831389

831389

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

831389
cycle. 
831389

831389

Initially, we start working themes on their trunk development line

831389
(e.g., <tt>`trunk/Identity/Themes/Motifs/TreeFlower/'</tt>), here we
831389
design background images and propagate them to different visual
831389
manifestations using one theme's model as reference.
831389

831389

Later, when the theme is considered "ready" for implementation (i.e.

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

831389

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

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

831389

Both branches and tags, inside CentOS Artwork Repository, use

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

831389
831389

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

63f275
831389

Figure 3.11: Name convention for tags and branches creation.

831389
831389

831389

As proposition, it would be convenient not to freeze trunk development

831389
lines using tags or anything else.  If you think you need to freeze a
831389
trunk development line, create a branch for it and then freeze that
831389
branch instead.  
831389

831389

The trunk development line may introduce problems we cannot see

831389
immediatly. Certainly, the high changable nature of trunk development
831389
line complicates finding and fixing such problems. On the other hand,
831389
the branched development lines provides a less changable area where
831389
only small fixes/corrections are commited up to repository. 
831389

831389

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

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

831389

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

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

831389

Before releasing a new major release of CentOS distribution you can

831389
create a branch for one of several theme development lines available
831389
inside the CentOS Artwork Repository, perform quality assurance on it,
831389
and later, freeze that branch using tags. Once a the theme branch has
831389
been frozen (under <tt>`tags/'</tt> directory), CentOS Packagers (the
831389
persons who build CentOS distribution) can use that frozen branch as
831389
source location to fulfill CentOS distribution artwork needs.
831389

63f275
cbf5a9
831389

3.41.2.4 Parallel directories

831389
831389

Inside CentOS Artwork Repository, parallel directories are simple

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

831389

Parallel directories take their structure from one unique parent

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

831389

In some circumstances, parallel directories may be created removing

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

831389

Another example where parallel directory removes the uncommon path

831389
information is when we use the help functionality. This time,
831389
<tt>`centos-art.sh'</tt> script uses parallel directory information
831389
(without uncommon directory levels) to build the documentation entry
831389
required by Texinfo to store documentation entries inside the
831389
repository.
831389

831389
831389

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

831389
831389

Figure 3.12: Parallel directories removing uncommon information.

831389
831389

831389

Othertimes, parallel directories may add uncommon information to their

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

831389
831389

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

63f275
831389

Figure 3.13: Parallel directories adding uncommon information.

831389
831389

831389

When one parent directory changes, all their related parallel

831389
directories need to be changed too. This is required in order for
831389
parallel directories to match the new parent directory structure.  In
831389
the other hand, parallel directories should never be modified by no
831389
reason but to satisfy their parent directory structure. Liberal change
831389
of parallel directories may suppress the conceptual idea they were
831389
initially created for.
831389

831389
831389

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

63f275
831389

Figure 3.14: Wrong construction of parallel directories.

831389
831389

63f275
cbf5a9
831389

3.41.2.5 Syncronizing path information

831389
831389

Creating parallel directories is very useful to keep repository

831389
organized. But, what would happen to functionalities like help
831389
(WARNING: The <samp>`trunk Scripts Bash Functions Help'</samp> documentation entry no longer exists.) that rely on parent
831389
directory structures to create documentation entries (using parallel
831389
directory structures) if one of those parent directory structures
831389
suddenly changes after the documentation entry has been already
831389
created for it? 
831389

831389

Well, at this point, functionalities like help may confuse

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

831389

In the specific case of documentation (the help functionality),

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

831389

There is no way for help, and similar functionalities that use

831389
parent directories as reference, to know when and how directory
831389
movements take place inside the repository. Such information is
831389
available only when movement actions, like thoses achived by
831389
rm or mv commands, take place inside the
831389
repository. So, is there, at the moment of moving files, when we need
831389
to syncronize parallel directories with their unique parent directory
831389
structure.
831389

831389

Syncronizing parallel directories with their respecitive parent

831389
directory implies moving files inside the repository, i.e. we need to,
831389
firstly, rebuild the path information for each parallel directory
831389
inside the repository, using the current path of its parent directory
831389
as reference, and later, use the new path information to move each old
831389
parallel directory from its old location to its new location based on
831389
an updated path information.
831389

831389

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

831389
file movements inside the repository are considered repository
831389
changes. In order for these repository changes to be versioned, we
831389
need to, firstly, add changes related files into version control
831389
system, and later, use commands from the version control system to
831389
move those files already versioned.  This configuration makes possible
831389
for everyone to know about changes details inside the repository; and
831389
if needed, revert or update them back to a previous revision.
831389

831389

Finally, once all file corrections have been already made, the

831389
syncronization action takes care of updating path references inside
831389
related files. Updating path references inside related files is
831389
specially important for documentation files where documentation nodes
831389
are built using repository path information as reference.
831389

831389
831389
831389

3.41.2.6 What is the right location to store it?

831389
831389

Occasionly, you may find that new corporate visual identity components

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

831389

The CentOS Community (http://wiki.centos.org/GettingHelp) is the

831389
best place to find answers to your question, but going there with
831389
hands empty is not good idea. It may give the impression you don't
831389
really care about. Instead, consider the following suggestions to find
831389
your own comprehension and so, make your propositions based on it.
831389

831389

When looking the correct place to store new files, to bear in mind the

831389
corporate visual identity structure used inside the CentOS Artwork
831389
Repository (see section trunk/Identity) would be probaly the best advice
831389
we could offer to you, the rest is just matter of choosing appropriate
831389
names.  To illustrate this desition process let's consider the
831389
<tt>`trunk/Identity/Themes/Motifs/TreeFlower/Distro/'</tt> directory as
831389
example. It is the main development line of CentOS distribution visual
831389
manifestation, using TreeFlower's artistic motif, inside themes of
831389
CentOS corporate visual identity. 
831389

831389

When building parent directory structures, you may find that reaching

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

831389

For example, the

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

831389
centos-art help --read=turnk/
831389
centos-art help --read=turnk/Identity/
831389
centos-art help --read=turnk/Identity/Themes/
831389
centos-art help --read=turnk/Identity/Themes/Motifs/
831389
centos-art help --read=turnk/Identity/Themes/Motifs/TreeFlower/
831389
centos-art help --read=turnk/Identity/Themes/Motifs/TreeFlower/Distro/
831389
831389

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

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

831389
831389
831389

3.41.3 Usage

831389
831389
831389
centos-art path --copy=SRC --to=DST
831389

Use this command to duplicate <tt>`SRC'</tt> in working copy,

831389
remembering history. In this command, <tt>`SRC'</tt> and
831389
<tt>`DST'</tt> can each be either a working copy (WC) path or
831389
URL:
831389

831389
831389
<samp>`WC -> WC'</samp>
831389

Copy and schedule for addition (with history).

831389

831389
831389
<samp>`WC -> URL'</samp>
831389

Immediately commit a copy of WC to URL.

831389

831389
831389
<samp>`URL -> WC'</samp>
831389

Check out URL into WC, schedule for addition.

831389

831389
831389
<samp>`URL -> URL'</samp>
831389

Complete server-side copy; used to branch and tag.

831389

831389
831389
831389

This command is an interface for Subversion's copy command.

831389
Options related to Subversion's copy command can be passed
831389
from third argument on. For example to specify a log message use the
831389
<samp>`--message'</samp> option as follow:
831389

831389
centos-art path --copy=URL/SRC --to=URL/DST --message 'Copy url/src to url/dst'
831389
831389

For more information on Subversion's copy functionality,

831389
run the command: svn help copy | less.
831389

831389
831389
centos-art path --move=SRC --to=DST
831389

Move and/or rename something in working copy or repository. In this

831389
command, SRC and DST can both be working copy (WC) paths or URLs: 
831389

831389
831389
<samp>`WC -> WC'</samp>
831389

Move and schedule for addition (with history).

831389

831389
<samp>`URL -> URL'</samp>
831389

Complete server-side rename.

831389

831389
831389
831389

This command is an interface for Subversion's move command.

831389
Options related to Subversion's move command can be passed
831389
from third argument on. For example to specify a log message use the
831389
<samp>`--message'</samp> option as follow:
831389

831389
centos-art path --move=URL/SRC --to=URL/DST --message 'Move url/src to url/dst'
831389
831389

For more information on Subversion's move functionality,

831389
run the command: svn help move | less.
831389

831389
831389
centos-art path --delete='SRC'
831389

Use this command to remove files and directories from version control.

831389
In this command, <tt>`SRC'</tt> can be a working copy (WC) path or URL. 
831389

831389
831389
<samp>`WC'</samp>
831389

Each item specified by a PATH is scheduled for deletion upon the next

831389
commit.  Files, and directories that have not been committed, are
831389
immediately removed from the working copy.  PATHs that are, or
831389
contain, unversioned or modified items will not be removed unless the
831389
<samp>`--force'</samp> option is given.
831389

831389
831389
<samp>`URL'</samp>
831389

Each item specified by a URL is deleted from the repository via an

831389
immediate commit.
831389

831389
831389
831389

This command is an interface for Subversion's delete

831389
command. Options related to Subversion's delete can be
831389
passed from third argument on. For example to specify a log message
831389
use the <samp>`--message'</samp> as follow:
831389

831389
centos-art path --delete='URL' --message 'Delete url.'
831389
831389

For more information on Subversion's delete functionality,

831389
run the command: svn help delete | less.
831389

831389
831389
centos-art path --sync='SRC'
831389

Use this command to syncronize path information inside working copy.

831389
This command is automatically used after moving or renaming parent
831389
directories.  In this command, <tt>`SRC'</tt> is a working copy path
831389
inside <tt>`trunk/Identity/'</tt> location, considered the parent
831389
directory you want to syncronize path information for.
831389

831389
831389
831389
831389
54264c

3.41.4 See also

4c79b5
63f275
831389
3.36 trunk/Scripts/Bash  
831389
831389
3.37 trunk/Scripts/Bash/Functions  
63f275
63f275
4c79b5
4c79b5
4c79b5
831389
[ < ]
831389
[ > ]
4c79b5
   
4c79b5
[ << ]
831389
[ Up ]
831389
[ >> ]
4c79b5
4c79b5

4c79b5
 <font size="-1">
008ee0
  This document was generated on December, 2 2010 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

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