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
-->
6414c4
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>
280c77
<title>The CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Path</title>
4c79b5
280c77
<meta name="description" content="The CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Path">
280c77
<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
280c77
[ < ]
280c77
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
280c77
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
280c77
[Index]
4c79b5
[ ? ]
4c79b5
280c77
280c77
280c77

3.42 trunk/Scripts/Bash/Functions/Path

280c77
280c77
280c77
280c77

3.42.1 Goals

280c77
280c77

This section exists to organize files related to path

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

280c77
280c77
280c77

3.42.2 Description

280c77
280c77

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

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

280c77
280c77
280c77

3.42.2.1 Repository layout

280c77
280c77

The repository layout describes organization of files and directories

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

280c77

As convenction, inside CentOS Artwork Repository, we organize files

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

280c77
280c77

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

280c77
280c77

Figure 3.15: The CentOS Artwork Repository layout.

280c77
280c77

280c77

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

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

280c77

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

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

280c77

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

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

280c77

The CentOS Artwork Repository layout is firmly grounded on a

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

280c77
280c77
280c77

3.42.2.2 Repository name convenctions

280c77
280c77

Repository name convenctions help us to maintain consistency of names

280c77
inside the repository.
280c77

280c77

Repository name convenctions are applied to files and directories

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

280c77

Repository name convenctions are implemented inside the

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

280c77
280c77
280c77

3.42.2.3 Repository work flow

280c77
280c77

Repository work flow describes the steps and time intervals used to

280c77
produce CentOS corporate visual identity inside CentOS Artwork
280c77
Repository.  
280c77

280c77

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

280c77
cycle. 
280c77

280c77

Initially, we start working themes on their trunk development line

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

280c77

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

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

280c77

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

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

280c77

Both branches and tags, inside CentOS Artwork Repository, use

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

280c77
280c77

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

280c77
280c77

Figure 3.16: Name convention for tags and branches creation.

280c77
280c77

280c77
Convenction

Convenction

Do not freeze trunk development lines using tags

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

280c77
280c77

The trunk development line may introduce problems we cannot see

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

280c77

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

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

280c77

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

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

280c77

Before releasing a new major release of CentOS distribution we create

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

280c77
01b527
280c77

3.42.2.4 Parallel directories

280c77
280c77

Inside CentOS Artwork Repository, parallel directories are simple

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

280c77

Parallel directories take their structure from one unique parent

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

280c77

In some circumstances, parallel directories may be created removing

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

280c77

Another example where parallel directory removes the uncommon path

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

280c77
280c77

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

6414c4
280c77

Figure 3.17: Parallel directories removing uncommon information.

280c77
280c77

280c77

Othertimes, parallel directories may add uncommon information to their

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

280c77
280c77

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

280c77
280c77

Figure 3.18: Parallel directories adding uncommon information.

280c77
280c77

280c77

When one parent directory changes, all their related parallel

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

280c77
280c77

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

280c77
280c77

Figure 3.19: Wrong construction of parallel directories.

280c77
280c77

0d952c
01b527
280c77

3.42.2.5 Syncronizing path information

749e81
280c77

Creating parallel directories is very useful to keep repository

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

280c77

If that is the case, functionalities like manual may confuse

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

280c77

In the specific case of documentation (the manual

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

280c77

There is no way for manual, and similar functionalities that

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

280c77

Syncronizing parallel directories with their respecitive parent

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

280c77
Warning

Warning

Even Subversion supports URL to refere sources and

280c77
destinations of resources inside the central repository, the
280c77
<tt>`centos-art.sh'</tt> script does not.  The <tt>`centos-art.sh'</tt> script
280c77
is designed to work inside working copies only.
280c77

0d952c
280c77

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

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

280c77

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

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

49b888
01b527
280c77

3.42.2.6 What is the right place to store it?

0d952c
280c77

Occasionly, you may find that new corporate visual identity components

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

280c77

The CentOS Community different free support vains (see:

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

280c77

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

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

280c77

When building parent directory structures, you may find that reaching

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

280c77

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

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

280c77
centos-art manual --read=turnk/
280c77
centos-art manual --read=turnk/Identity/
280c77
centos-art manual --read=turnk/Identity/Themes/
280c77
centos-art manual --read=turnk/Identity/Themes/Motifs/
280c77
centos-art manual --read=turnk/Identity/Themes/Motifs/TreeFlower/
280c77
280c77

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

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

e37211
01b527
e37211

3.42.3 Usage

e37211
280c77
280c77
centos-art path --copy=SRC --to=DST
280c77

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

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

280c77
280c77
<samp>`WC -> WC'</samp>
280c77

Copy and schedule for addition (with history).

280c77

280c77
280c77
<samp>`WC -> URL (Not supported)'</samp>
280c77

Immediately commit a copy of WC to URL.

280c77

280c77
280c77
<samp>`URL -> WC (Not supported)'</samp>
280c77

Check out URL into WC, schedule for addition.

280c77

280c77
280c77
<samp>`URL -> URL (Not supported)'</samp>
280c77

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

280c77

280c77
280c77
280c77
280c77
centos-art path --move=SRC --to=DST
280c77
280c77
<samp>`WC -> WC'</samp>
280c77

Move and schedule for addition (with history).

280c77

280c77
<samp>`URL -> URL (Not supported)'</samp>
280c77

Complete server-side rename.

280c77

280c77
280c77
280c77
280c77
centos-art path --delete='SRC'
280c77

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

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

280c77
280c77
<samp>`WC'</samp>
280c77

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

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

280c77
280c77
<samp>`URL (Not supported)'</samp>
280c77

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

280c77
immediate commit.
280c77

280c77
280c77
280c77
e37211
e37211
01b527
54264c

3.42.4 See also

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

4c79b5
 <font size="-1">
6414c4
  This document was generated on January, 3 2011 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

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