How to install the Subversion client in Ubuntu

Source: Internet
Author: User
Tags subversion client svn update
For details about sudoapt-getinstallsubversionsubversion-tools, refer to examples (full directory or file path) [full local directory path] -- username -- password

Sudo apt-get install subversion-tools

See http://www.subversion.org.cn/svnbook/1.1/index.html svn sub-commands for details

1. Check out
Svn co http: // path (full path of directory or file) [full path of local directory]

-- Username -- password svn co svn: // path (full path of directory or file) [full path of local directory] -- username -- password
Svn checkout http: // path (full directory or file path) [full local directory path] -- username
Svn checkout svn: // path (full directory or file path) [full local directory path] -- username
Note: If the -- password parameter is not included, the system will prompt you to enter the password. We recommend that you do not use the -- password option in plain text.
Username and password are two short-term, not one.
If the full path of the local directory is not specified, the local directory is checked out.
Example:
Svn co svn: // 192.168.0.3/test tool/home/testtools -- username wzhnsc
Svn co http: // 192.168.0.3/test/testapp -- username wzhnsc
Svn checkout svn: // 192.168.0.3/test tool/home/testtools -- username wzhnsc
Svncheckouthttp: // 192.168.0.3/test/testapp -- username wzhnsc

2. Export (export a directory tree without the. svn folder)
Svn export [-r version] http: // path (full path of directory or file) [full path of local directory] -- username
Svn export [-r version] svn: // path (full path of directory or file) [full path of local directory] -- username
Local directory full path (with. svn folder) detected by svn export to Be Exported
Note: The first method to export the working directory tree from the version library is to specify the URL,
If the version number is specified, the corresponding version is exported,
If no version is specified, the latest version is exported to the specified location.
If the full path of the local directory is omitted, the last part of the URL is used as the name of the local directory.
The second method is to specify the full path of the local directory to be exported. All local modifications will be retained,
However, files that are not under Version Control (that is, new files not submitted, www.linuxidc.com because there is no relevant information record in the. svn folder) will not be copied.
Example:
Svnexportsvn: // 192.168.0.3/test tool/home/testtools -- usernamewzhnsc
Svnexporthttp: // 192.168.0.3/test/testapp -- usernamewzhnsc
Svnexport/home/testapp/home/testtools

3. Add a new file
Svn add file name
Note: Tell the SVN server to add files and use svn commint-m to upload files!
Example:
Svn add test. php <-add test. php
Svn commit-m "add my test with test. php" test. php
Svn add *. php <-add all php files in the current directory
Svn commit-m "add my tests with all php files" *. php

4. Submit
Svn commit-m "submit remarks text" [-N] [-- no-unlock] File Name
Svn ci-m "submit remarks text" [-N] [-- no-unlock] File Name
The-m parameter must be included. The parameter can be null, but it must be written as-m.
Example:
Svn commit-m "submit all files in the current directory under Version Control" * <-note this * indicates all files
Svn commit-m "submit my test with test. php" test. php
Svn commit-m "submit my test with test. php"-N -- no-unlock test. php <-keep the lock and use the-no-unlock switch.
Svn ci-m "submit all files in the current directory under Version Control" * <-note this * indicates all files
Svn ci-m "submit my test with test. php" test. php
Svn ci-m "submit my test with test. php"-N -- no-unlock test. php <-keep the lock and use the-no-unlock switch.

5. Update files
Svn update
Svn update-r Revised Version file name
Svn update file name
Example:
Svn update <-No directory later. By default, all files in the current directory and sub-directories are updated to the latest version.
Svn update-r200 test. cpp <-restore the file test. cpp in the version library to version 200
Svn updatetest. php <-Synchronize updates with version libraries.
An expiration conflict is prompted during submission. You need to update and modify the file first,
Then clear the svn resolved and submit the commit.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.