Svn: Difference between revisions

From Halfface
Jump to navigation Jump to search
No edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==setup svn==
install svn.
install svn.
  yum install mod_dav_svn
  yum install mod_dav_svn
Line 6: Line 7:


Change permission.
Change permission.
  chown -R apache.apache /www/svn/cfengine
  chown -R apache:apache /www/svn/cfengine
  chmod g+s /www/svn/cfengine/db
  chmod g+s /www/svn/cfengine/db


Line 21: Line 22:
  </Location>
  </Location>


labels:
==Termininology==
  trunks Latest. Work in the trunk  
  trunks Latest. Work in the trunk  
  tags. Reprecensts stable  
  tags. Reprecensts stable  
  branches. Private working space. Could be merged.
  branches. Private working space. Could be merged.


Stable and testing
==Useful commands==
svn -m "initial import" import . http://www.halfface.se/svn/ # Import working directory in svn.
svn co http://www.halfface.se/svn/ # Check out directory.
svn add *  # Add all files in current directory to svn.
svn status # What differs. Ask stupid svn which files should be added.
svn mv ../cfagent.conf . # Move file within svn.
svn rm etc # Remove file from svn.
svn ci -m "Report function working" # Check in current status in svn.
svn copy http://www.halfface.se/svn/ http://www.halfface.se/svn2/ # Copy in svn.
svn copy -r 24 http://www.halfface.se/svn/ # Copy version 24 to
svn co http://svn.klu.infineon.com/repos/AdminToolKit/ # Check out specific version
svn up # Update against svn data.
svn --username bjorklun ls http://www.halfface.se/svn/ # List contents of repository as user bjorklun
svn status # Which files has changed.
svn propset svn:executable "*" filename # Change permisson on files..
svn propset svn:executable ON somescript # Make file executeble in svn repository.
svn diff -r 3900 /filename See how your working copy's modifications compare against an older revision:
svn diff -r 3000:3500 Compare revision 3000 to revision 3500 of all files in trunk using range notation
svn switch --relocate http://192.168.7.139 http://192.168.29.52 Change server ip


  svn commands:
==header==
svn co http://svn.klu.infineon.com/repos/AdminToolKit/ Check out directory.
# Enable properties for file.
svn add * Add all files in current directory to svn.
  svn propset svn:keywords "file_name.txt
  svn mv ../cfagent.conf . Move file within svn.
# Add the following as an header to your file.
  svn rm etc Remove file from svn.
  # SVN FILE: $Id$ */
  svn ci -m "inital standard configuration" Check in current status in svn.
  # @author        $Author$
  svn copy http://svn.vih.infineon.com/repos/AdminToolKit/trunk http://svn.vih.infineon.com/repos/AdminToolKit/trunk2 Copy in svn.
  # @version        $Rev$
  svn co Check out current directory when working with svn source.
  # @lastrevision  $Date$
  svn copy -r 24 http://svn.kia.infineon.com Copy version 24 to
  # @filesource    $URL$
svn co http://svn.klu.infineon.com/repos/AdminToolKit/ Initial check out
 
svn up Update against svn data.
=show files with differences=
svn --username bjorklun ls http://www.halfface.se/svn/cfengine List contents of repository as user bjorklun
  svn diff --summarize -r r56870:r56394 https://svn.com/trunk/
 
[[Category:Applications]]
[[Category:Unix]]

Latest revision as of 15:00, 16 December 2016

setup svn

install svn.

yum install mod_dav_svn

Create svn repository.

svnadmin create /www/svn/cfengine

Change permission.

chown -R apache:apache /www/svn/cfengine
chmod g+s /www/svn/cfengine/db

httpd.conf

<Location /svn/cfengine>
  DAV svn
  SVNPath /www/svn/cfengine
  AuthzSVNAccessFile /etc/httpd/conf/svnauthz.conf
  AuthType Basic
  AuthName "Subversion repository cfengine"
  AuthUserFile /etc/httpd/conf/passwords
  Order deny,allow
  Require valid-user
</Location>

Termininology

trunks		Latest. Work in the trunk 
tags. 		Reprecensts stable 
branches. 	Private working space. Could be merged.

Useful commands

svn -m "initial import" import . http://www.halfface.se/svn/		# Import working directory in svn.
svn co http://www.halfface.se/svn/					# Check out directory.
svn add *  								# Add all files in current directory to svn.
svn status								# What differs. Ask stupid svn which files should be added.
svn mv ../cfagent.conf .						# Move file within svn.
svn rm etc								# Remove file from svn.
svn ci -m "Report function working"					# Check in current status in svn.
svn copy http://www.halfface.se/svn/ http://www.halfface.se/svn2/	# Copy in svn.
svn copy -r 24 http://www.halfface.se/svn/ 				# Copy version 24 to
svn co http://svn.klu.infineon.com/repos/AdminToolKit/ 		# Check out specific version
svn up									# Update against svn data.
svn --username bjorklun ls http://www.halfface.se/svn/		# List contents of repository as user bjorklun
svn status								# Which files has changed.
svn propset svn:executable "*" filename				# Change permisson on files..
svn propset svn:executable ON somescript				# Make file executeble in svn repository.
svn diff -r 3900 /filename						See how your working copy's modifications compare against an older revision:
svn diff -r 3000:3500							Compare revision 3000 to revision 3500 of all files in trunk using range notation
svn switch --relocate http://192.168.7.139 http://192.168.29.52	Change server ip

header

  1. Enable properties for file.
svn propset svn:keywords "file_name.txt
  1. Add the following as an header to your file.
# SVN FILE: $Id$ */
# @author         $Author$
# @version        $Rev$
# @lastrevision   $Date$
# @filesource     $URL$

show files with differences

svn diff --summarize -r r56870:r56394 https://svn.com/trunk/