svn repository operations (d)

First, use the command line to access the SVN server

1. detection (Checkout)

(1) first into their working directory, for example: D: \ svnSpace

cd D: \ svnSpace

(2) Run svn checkout command, the command format is as follows

# Svn Checkout svn: // host address SVN server / repository directory specific directory to save the contents of the detection of 
svn checkout svn: // localhost / OA MyOA

Run the checkout command to enter MyOA directory, which has a hidden directory .svn, to save important information interaction with the server, including the latest version information, documents retrieved from the server status, update time. SVN is precisely this as the basis to determine the status of files in the current directory. This hidden directory Do not delete or modify its contents. If you save a file server can be regarded as a "original", so each developer detection to a local directory of files can be viewed as "copy", commonly referred to as the working copy.

2. submit (commit)

Enter D: \ svnSpace \ MyOA directory, create a file test.txt
(1) First execute svn add command will be incorporated into version control, this step is necessary, or can not be submitted to the server
svn add test.txt
(2) execute svn commit command
  • -M parameter using additional log information
  • Open access
svn commit -m "My first commit" test.txt
 
Being the first to turn on anonymous access:
  • Enter the conf directory under the corresponding repository directory: D: \ svnDep \ OA \ conf
  • Open svnserve.conf 
  • The line 19 # anon-access = read instead anon-access = write, that is, remove the "#" will be changed to read write. Note Do not leave a space in front, must be the top grid write. 
  • SVN is no need to restart the service, even the command line window does not need to re-open. 

In fact the last svn commit command can not specify a specific file, then submit all changes represent the current working copy.

3. Update (update)

Svn update command execution 

4. The whole working copy of a return to a version of history

svn update - version number of the revision you want to get back
 # svn Update 1 --revision

5. restore a file to a version of the state, and does not involve other files

svn update file name - the version number of revision want to get back
 # svn update pp.txt -revision 10

Second, a single repository rights profile

 

Guess you like

Origin www.cnblogs.com/myitnews/p/11487784.html