Machine Config in use:
RHEL4 Update 6 Full install.
apr-9.21 and subversion-1.4.5 rpms to be installed.
cvs2svn-1.5.1-2.el4.noarch.rpm to be installed if there is a need for cvs2svn shift.
Note:
Subversion Administration:Apache Configuration:
<Location /svn>
DAV svn
SVNParentPath /export/home/svn
SVNListParentPath on
AuthzSVNAccessFile /export/home/authz
AuthType Basic
AuthName "Mentor Noida"
AuthLDAPEnabled on
AuthLDAPAuthoritative on
AuthLDAPURL ldap://hostname:389/ou=people,dc=abc,dc=com?uid?sub?(objectClass=*)
Require valid-user
</Location>
Path Based Authentication (authz File):
[groups]
groupname=user1,user2,user3.................
[Repos:path]
user=perm
@groupname=perm
eg:
[jaguarcvs:/]
abagaria=r
[rtlc:/]
abagaria=
[systems:/]
abagaria=rw
Cvs -> Svn
Importing an Existing CVS Repository to SVN.
cvs2svn -s <path to the new svn repository space> <path to the old $CVSROOT>
eg: cvs2svn -s /export/home/svn/jaguarcvs /export/home/jaguarcvs/CVS
chown -R apache:apache <path to the new svn repository space>
There should be no binaries checked in along with the source code in the repository.
If there is a repository checked in anyways Please use "cvs admin -kb $FILE" on the binary to correct the format.
Using Subversion:
svn --no-auth-cache <command> - so that authentication is not cached for further use.
svn co - Checkout
svn ci - checkin
svn import directory <path of the svn where directory needs to be added> - To Push in unversioned directory in versioning system.
svn list - listing of the files from the current path.
svn update - freshen up the existing versions.
svn add - adds a file/folder to the repository (pending commit).
svn delete - deletes a file/folder from the repository (pending commit).
svn copy source destination - copyies file/folder from one location to another (immediate).
svn move source destination - moves above.
svn mkdir - same as mkdir a;svn add a
svn status - status of all the files/folders in a prticular folder (relative to there repos copy ).
svn diff - check difference b/w working copy and repos copy.
svn lock - to lock the repos copy of the working file.
svn unlock - to unlock file.
Creation of a Repository:
cd [parent path for all repositories]
svnadmin create [new repository name]
chown -R apache:apache [new repository name]
cd /tmp
mkdir tempstruct
cd tempstruct
mkdir branches tags trunk vendors
svn import -m "Initial Repository Structure" http://innvm-svn/svn/[new repository name]
svnadmin lslocks /export/home/svn/repos: To view locks.
svnadmin rmlocks /export/home/svn/repos /filepath : To remove locks from a particular folder/file
Branching:
svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."