Difference between revisions of "Setting up Subversion"

From PeformIQ Upgrade
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
svn import help
svn import help
svn list file:///u/svn
svn list file:///u/svn
svn list file:///u/svn/projects/MDCS/Scripts
svn list file:///u/svn/projects/Test/Scripts
</pre>
</pre>


Line 32: Line 32:


ls -l $DIR
ls -l $DIR
</pre>
==A More Complex Initialization Script==
<pre>
#!/bin/sh
#---------------------------------------------------------------------
PROJECT=Java
PROJECT=
MODULE=Scripts
MODULE=NTLM
PROJECTS=/u/svn/projects
if [ -n "$PROJECT" ] ; then
  SVN_PATH=$PROJECTS/${PROJECT}
else
  SVN_PATH=$PROJECTS
fi
REPOSITORY=$SVN_PATH/$MODULE
echo "Setting up SVN Repository - $REPOSITORY"
#---------------------------------------------------------------------
set -x
if [ ! -d $PROJECTS ] ; then
  mkdir $PROJECTS
fi
if [ ! -d $SVN_PATH ] ; then
  mkdir $SVN_PATH
fi
if [ -d $REPOSITORY ] ; then
  rm -rf $REPOSITORY
fi
#---------------------------------------------------------------------
mkdir $REPOSITORY
svnadmin create $REPOSITORY
ls -l $REPOSITORY
#---------------------------------------------------------------------
</pre>
</pre>


[[Category:Subversion]]
[[Category:Subversion]]
[[Category:Source Code Control]]
[[Category:SCM]]
[[Category:Examples]]
[[Category:Examples]]

Latest revision as of 22:43, 27 February 2012

Rough Notes

Some Commands

svnadmin 
svnadmin help
svnadmin create /u/svn
svn help
svn import help
svn list file:///u/svn
svn list file:///u/svn/projects/Test/Scripts

Script to initialize the repository

[root@xxx u]# cat setup_svn.sh 
#!/bin/sh

DIR=/u/svn/projects/XXX/Scripts

set -x

if [ -d $DIR ] ; then
   rm -rf $DIR
fi

mkdir $DIR

svnadmin create $DIR

ls -l $DIR

A More Complex Initialization Script

#!/bin/sh

#---------------------------------------------------------------------


PROJECT=Java
PROJECT=
MODULE=Scripts
MODULE=NTLM

PROJECTS=/u/svn/projects

if [ -n "$PROJECT" ] ; then
   SVN_PATH=$PROJECTS/${PROJECT}
else
   SVN_PATH=$PROJECTS
fi

REPOSITORY=$SVN_PATH/$MODULE

echo "Setting up SVN Repository - $REPOSITORY"

#---------------------------------------------------------------------

set -x

if [ ! -d $PROJECTS ] ; then
   mkdir $PROJECTS
fi

if [ ! -d $SVN_PATH ] ; then
   mkdir $SVN_PATH
fi

if [ -d $REPOSITORY ] ; then
   rm -rf $REPOSITORY
fi

#---------------------------------------------------------------------

mkdir $REPOSITORY

svnadmin create $REPOSITORY

ls -l $REPOSITORY

#---------------------------------------------------------------------