(1): Create SVN warehouse path
Mkdir-p/opt/svn/project1
Svnadmin Create/data/svn/project1
Note: For specification: Generally in the project directory to create again:
First create a good directory Dev and pub can be placed in a directory, import the same source can also source is the original code (SVN import/home/game/park_dev/)
Mkdir-p/opt/svn/projec1/xxx_dev Development
Mkdir-p/opt/svn/projec1/xxx_pub Release
Next I use Xxx_server to represent the project Project1 's name.
(2): Import project source code # SVN import [Source path] [Target version library path]-m [log Info]
For example:
PS: Source code if the other items are copied, please delete the original. svn file, or you will be tragic
SVN import/home/game/xxx_dev/file:///data/svn/xxx_server/xxx_dev-m "Initial import"
(3): Modify the configuration file: This is to specify the warehouse to add user rights, many people need to develop the time, to prevent the planning of disorderly transmission files, ha ha, are planning the wrong
A/opt/svn/project1/conf/svnserve.conf
[General]
Anon-access = None
Auth-access=write
password-db=passwd
Auth-db=authz
b/opt/svn/project1/conf/passwd
xxx=****//username = password
c anon-access = Read
auth-access = Write
authz-db = Authzpassword-db = passwd
Realm = Xxx_server
(4): Start SVN service
Svnserve-d-r/opt/svn/
Note: If multiple version management is started at the same time on a single server, the boot path must be the root path for all project warehouses: for example
/opt/svn/project1/opt/svn/project2---------->/opt/svn/
Installation scripts----with the creation of warehouses, do not understand you can leave a message to me I help you solve
#!/bin/bash
If
Rpm-qa | grep subversion
Then
echo "1 svn has been installed"
Exit
Else
echo "1 does not detect SVN installation, download Subversion"
Yum Install Subversion-y
Fi
if [[d '/data/svn]]]; Then
echo "2.1/data/svn/has been created"
Else
mkdir/data/svn/
echo "2.1/data/svn/created successfully"
Fi
echo "2.2: Configuration: Svnserver Add Data Warehouse Address"
Svnserve-d-r/data/svn/
echo "3. Build Version Library"
Svnadmin create/data/svn/tech_manage/
echo "4. Add to boot entry" This is convenient to use, the boot when the direct start
echo svnserve-d-r/data/svn/>>/etc/rc.local
The basis of the operation of a large pile, I will not one of the examples of the use of other people to write it?
Subversion Command Rollup
SVN command common options
The--targets list reads the list and interprets it as a list of parameters that will be manipulated
--non-recurisive,–n only to manipulate a single directory, do not process subdirectories
--verbose,–v to print extra information
--quiet,–q Print as little information as possible
--username, name specifies the user name to use when connecting to the authorization
--password, PAWD Specifies the password to use
--no-auth-cache do not cache identity tokens
--non-interactive do not prompt to enter additional information
--config-dir dir reads User Configuration from Dir
--editor-cm cmd uses cmd as the editor for log messages
SVN add
Add the name of the file and directory to the version control system. They will be added to the project warehouse at the next submission
SVN add path
--auto-props automatically set the properties of the file when adding them
--no-auto-props Disable automatic property settings
SVN blame
Displays the version and author information for each line of the file
--revision,–r Rev If the specified Rev is a single version, the version author information is displayed. If it is a range rev1:rev2, display the Rev2 version of the author's information, but only check the version to Rev1.
SVN cat
Outputs the contents of the specified file or URL
SVN cat target ...
--revision,–r Rev
SVN Checkout
Pull out a working copy from the Project warehouse
SVN checkout Url...path
If you do not specify path, the checked out local directory name uses the URL's base name.
svn cleanup
Clean the working copy, remove the lock, complete the unfinished operation, and so on.
SVN cleanup Path ...
SVN commit path
Send the changes from your work copy to the project warehouse
--message,–m MSG uses MSG as a submit log message.
--file,–f file uses the contents of file as a submit log message.
--no-unlock do not release the lock at the time of submission.
SVN copy
Make copies of history, including in the work copy or Project warehouse
SVN copy src dest
SRC and dest can be the path or URL of a working copy (WC).
src dest effect ...
WC WC Copy and add
WC URL to immediately submit copy of WC to URL
URL wc check out URL to WC, add
URL URL full server-side copy; used to make branches and tag
--revision,–r rev to copy of the SRC version. It makes sense only if SRC is the URL of the project warehouse.
SVN Delete target
Deletes a file or directory from the Project warehouse. If target is a file or directory in a working copy, it is removed from the working copy and is expected to be deleted at the next commit. If Target is the Project warehouse URL, it is removed from the project warehouse through an immediate commit.
--message,–m msg
--file,–f file
SVN diff
Shows the difference between two paths
SVN diff–r rev1:rev2 Target ...
SVN diff Oldurl Newurl
SVN export
Create a copy with no version record.
SVN export–r Rev URL Path
Exports a clean directory tree from the specified URL in the project warehouse to Path, if the Rev parameter is specified and the Rev version is exported, otherwise the latest version is everywhere.
SVN import
Submit a version-free file or tree to the project warehouse
SVN import Path URL
SVN info
Displays information about the file or directory.
SVN list
Lists the number of catalog bars in the Project warehouse.
SVN lock
Lock the file so that other users cannot commit the changes.
SVN lock target
--message,–m msg using MSG as lock information message
--force forced lock success by stealing locks from other users or working copies.
SVN log
Displays log messages for some versions or files.
--stop-on-copy do not traverse a copy while traversing history (useful for finding the starting point of a branch)
svn merge
Apply the difference of two sources to the working copy path.
SVN merge–r Rev1:rev2 Source Wcpath
SVN mkdir
Create a new directory under version control
SVN mkdir Target
svn move src dest
Move or rename a work copy or a file or directory in the Project warehouse.
--revision,–r Rev uses version Rev as the source to perform this move.
SVN Propdel
Delete the properties of a file or directory
SVN propdel propname Path ...
SVN propedit
Edit the properties of a file or directory
SVN propedit propname Path ...
SVN propget
Print the property value of a file or directory
SVN propget propname Path ...
--strict disables additional line wrapping and other landscaping measures (useful when redirecting binary attributes to a file)
SVN proplist
List all properties of a file or directory
--verbose
--recursive
--revision,–r Rev lists the properties defined by path in version rev
svn propset (PSet, PS)
SVN propset propname propval path ...
--file,–f file reads the contents of file and uses it as a property value.
--recursive
--encoding ENC the value as a ENC encoded character set
SVN resolved
Remove the conflicting status of a working copy file or directory
--recursive
svn revert
Recover a working copy of a file (undo the latest local changes)
svn revert path This command does not require a network connection
--recursive
SVN status
Print the status of a file or directory in a working copy
SVN status Path ...
--show-updates,–u Contact Server Displays updated information
--no-ignore ignores default settings and Svn:ignore property settings
--non-recursive,–n
--verbose,–v
SVN switch
Shift the working copy to a different URL
SVN switch URL Path
Update the working copy to use the new URL for the project warehouse. This behavior is similar to SVN update and is a way to move a working copy to a branch or tag in the same project warehouse.
--revision,–r Rev to version Rev
--non-recursive,–n
--diff3-cm use cmd as the merge command
svn unlock
Unlock the work copy file or the Project warehouse URL.
SVN unlock target ...
--force smashed the existing lock on target, even if it was not owned by the current working copy.
SVN update
Bring changes from the project warehouse to the working copy.
SVN update Path ...
--revision,–r Rev updated to version Rev
--non-recrusive,–n
--diff3-cmd