Linux SVN client Use method Introduction

Source: Internet
Author: User
Tags php and svn svn client

svnaddvalues/strings.xml//--add

svnst//--View Status

svnci//--Submit Svnci-m "Svnci,permission"

1, checkout the file to the local directory

Svncheckoutpath (path is a directory on the server)

For example: Svncheckoutsvn://192.168.1.1/pro/domain

Abbreviation: Svnco

2, add new files to the version library

Svnaddfile

Example: svnaddtest.php (add test.php)

svnadd*.php (Add all php files in current directory)

3, the change of the file submitted to the version of the library

Svncommit-m "LogMessage" [-n][--no-unlock]path (if you choose to keep the lock, use the--no-unlock switch)

For example: Svncommit-m "Addtestfileformytest" test.php

Abbreviation: Svnci

4, lock/unlock

Svnlock-m "Lockmessage" [--force]path

For example: Svnlock-m "Locktestfile" test.php

Svnunlockpath

5. Update to a version

Svnupdate-rmpath

For example:

Svnupdate If there is no directory behind it, the current directory and all files under the subdirectory are updated to the latest version by default.

svnupdate-r200test.php (Restore the file test.php in the repository to version 200)

svnupdatetest.php (update, sync with version library.) If the prompt expires at the time of submission, it is because of the conflict, you need to update, modify the file, then clear svnresolved, and then submit a commit.

Abbreviation: Svnup

6. View file or directory status

1 Svnstatuspath (the status of files and subdirectories under the directory, the normal state does not show)

"?: not in the control of SVN; M: content is modified; C: conflict occurs; A: Scheduled to add to the version library; K: Locked "

2) Svnstatus-vpath (display file and subdirectory status)

The first column remains the same, the second column displays the working version number, and the third and fourth columns display the last modified version number and the modified person.

Note: The three commands Svnstatus, Svndiff, and Svnrevert can also be executed without a network, because SVN is in local. SVN retains the original copy of the local version.

Abbreviation: svnst

7, delete the file

Svndeletepath-m "Deletetestfle"

For example: Svndeletesvn://192.168.1.1/pro/domain/test.php-m "Deletetestfile"

or direct svndeletetest.php and then svnci-m ' Deletetestfile ', recommended to use this

Shorthand: SVN (DEL,REMOVE,RM)

8, view the log

Svnlogpath

For example: svnlogtest.php displays all changes to this file and its version number

9. View File Details

Svninfopath

For example: svninfotest.php

10, compare the difference

Svndiffpath (compare modified file to base version)

For example: svndifftest.php

Svndiff-rm:npath (diff to version M and version N)

For example: svndiff-r200:201test.php

Abbreviation: Svndi

11. Merge the differences between the two versions into the current file

Svnmerge-rm:npath

For example: svnmerge-r200:205test.php (the difference between version 200 and 205 is merged into the current file, but there is a general conflict and needs to be addressed)

12, SVN help

Svnhelp

Svnhelpci

------------------------------------------------------------------------------

The above is the common command, below write a few commonly used

------------------------------------------------------------------------------

13, File and directory list under the version library

Svnlistpath

Show all files and directories that belong to the version library under the path directory

Abbreviation: SVNLS

14. Create a new directory under version control

Svnmkdir: Create a new directory under the included version control.

Usage: 1, Mkdirpath ...

2, Mkdirurl ...

Create a directory for version control.

1. Each directory specified in the working copy path will be created on the local side and added

Schedule to be submitted for the next time.

2. Each directory specified as a URL will be created by submitting it immediately to the warehouse.

In both cases, all intermediate directories must exist beforehand.

15. Restore Local Modifications

Svnrevert: Restores the original unchanged working copy file (restores most of the local modifications). Revert

Usage: Revertpath ...

Note: The notebook command does not access the network and will remove the conflicting status. But it won't recover.

The deleted directory

16. Code base URL Change

Svnswitch (SW): Update the working copy to a different URL.

Usage: 1, Switchurl[path]

2, Switch--relocatefromto[path ...]

1, update your working copy, map to a new URL, its behavior and "Svnupdate" is similar, will be

The file on the server is merged with the local file. This corresponds to a branch or tag in the same warehouse where the working copy is

Method.

2, rewrite the working copy of the URL metadata to reflect the simple URL changes. When the root URL of the warehouse changes

(for example, schema name or host name change), but the working copy is still mapped to the same directory in the same warehouse.

This command updates the working copy's correspondence with the warehouse.

17. Conflict resolution

Svnresolved: Removes the conflicting state of the directory or file for the working copy.

Usage: Resolvedpath ...

Note: The notebook command does not resolve the conflict according to syntax or remove the conflict token; it simply removes the conflicting

Related files, and then allow path to be submitted again.

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.