Tips for using SVN in centos

Source: Internet
Author: User
Tags svn centos

Merge and modify SVN branches to the trunk

Run the following command on the Main Branch

$ Svn merge -- reintegrate branch URL/album_mdl.php
--- Merging differences between repository URLs into 'Album _ mdl. Php ':
U album_mdl.php
--- Recording mergeinfo for merge between repository URLs into 'Album _ mdl. Php ':
U album_mdl.php

SVN create branch

Run the following command to create a branch.

$ Svn cp-M' create new branch for dev 'http: // master address http: // branch address

SVN delete branch

$ Svn rm http: // branch address-m'delete the dev branch'

SVN branch sync master latest content

Run the following command in the branch Directory:

$ Svn merge http: // master address

SVN rollback cache changes

$ Svn revert.-R

SVN replacement service address

$ Svn switch -- relocate original repository ROOT address new repository ROOT address

The SVN content is synchronously updated. When a file is submitted, the submitted content is automatically updated to another location.
For example, synchronously update to the Web server for instant release.

Create a post-commit.bat file under the hooks folder under the repository directory.

@ Echo off
"D: \ Program Files \ VisualSVN \ bin \ svn.exe" update "E: \ BaiDuYun \ backup materials \ SVN backup"-username testuser-password testpwd

If a file read-only error occurs, you must modify the execution permission of the Svn server.
In the SVN service of the service, modify the SVN login identity as administrator.

Clear all. svn files in the directory

Find.-type d-name ". svn" | xargs rm-fr

In this command,-type is used to specify the file type to be searched, d is the directory type (if f is used as the standard file), and-name is the name of the file to be searched. svn.
The xargs command divides the list found by find into segments based on each row and runs the rm-fr command on each segment.

For the xargscommand, you can create a file touchlist.txt with the following content:

File1
File2
File3
File4

Run the command cat touchlist.txt | xargs touch. The following files are automatically created in the current directory:

Localhost: test mylxsw $ ll
Total 8
-Rw-r -- 1 mylxsw staff 0 9 12 11: 56 file1
-Rw-r -- 1 mylxsw staff 0 9 12 11: 56 file2
-Rw-r -- 1 mylxsw staff 0 9 12 :56 file3
-Rw-r -- 1 mylxsw staff 0 9 12 :56 file4
-Rw-r -- 1 mylxsw staff 24 9 12 :55 touchlist.txt

To clear all specified files in the directory, run the find. -type f-name "*. xml "-print0 | xargs-0 rm-fr. This command solves the xargs: unterminated quote error when the file name contains spaces.

Move a specified file type in a specified directory

# Find.-name "*. mkv" | xargs-I {} mv {}/dest/

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.