Python-common SVN commands

Source: Internet
Author: User
Tags svn update

1. update (up): merges changes to the version library into the working copy. Use Syntax: update [PATH...]. If no version is specified, update the working copy to the HEAD version. Otherwise, synchronize to the version specified by the-r option. Each update outputs a line of information and uses the first character to report the action. The meaning of these characters is: A has been added D has been deleted U has been updated C merged conflict G merged successfully E already has the first column of characters indicates file content update, the second column indicates file property update. The character "B" in the third column indicates that the lock on the file is terminated or stolen. If the "-- force" option is used, the checked-out fails automatically because of the path that is not version controlled in the work copy. If the Obstacle Path is of the same type (file or directory) as the corresponding path in the version library, it will become a version-controlled path, but the content will not change. It means that the descendant of the Obstacle Path, if it is also the Obstacle Path, will also be controlled by the version. If files in the Obstacle Path are different from those in the version library, they are regarded as working copies with local modifications. All attributes in the version library are applied to the Obstacle Path. Use the character "E" in the first column to report the Obstacle Path. Parameter description: use the "-- set-depth" option to set the new depth of the working copy of the operation target. Valid options:-r [-- revision] ARG: ARG (some commands also accept the ARG1: ARG2 range) version parameter can be one of the following: NUMBER version '{'date'}' the latest 'base' baseline version of the 'head' working copy in the 'head' version library after the specified time 'committed' before the final submission or baseline' prev'previous COMMITTED version-N [-- non-recursive]: outdated; try -- depth = files or -- depth = immediates -- depth ARG: By the depth parameter ARG ("empty", "files", "immediates", or "infinity ") constrained operation -- set-depth ARG: set the new depth of the working copy to ARG ("exclude", "empty", "files", "immediates", or "infinity ") -q [- -Quiet]: do not print information, or just print profile information -- diff3-cmd ARG: Use ARG as the merge command -- force: force operation run -- ignore-externals: ignore external project -- changelist ARG: only the [aliases: -- cl] -- editor-cmd ARG: Use ARG as the external editor -- accept ARG: Specifies the automatic conflict resolution action ('postone ', 'base', 'Mine-conflict ', 'theirs-conflict', 'Mine-full', 'theirs-full', 'edit', 'launch') Global Options: -- username ARG: Specify the user name ARG -- password ARG: Specify the password ARG -- no-auth-cache: Do not cache user recognition Certificate token -- non-interactive: Do not interactively prompt -- trust-server-cert: accept unknown SSL server certificate without prompt (only used for option "-- non-interactive ") -- config-dir ARG: Read the user configuration FILE from the directory ARG -- config-option ARG: the following format sets the user configuration options: FILE: SECTION: OPTION = [VALUE] example: update the svn update> update.txt file. 2. Check the working copy from the version library. Syntax: checkout URL [@ REV]... [PATH] If REV is specified, it determines the version first searched for from the URL. If the path parameter is omitted, the directory name at the end of the URL is used as the target directory name. If multiple URLs are specified, they are checked out to the PATH subdirectory in sequence. The subdirectory name is the directory name at the end of the URL. If the "-- force" option is used, the checked-out failure is not automatically caused by the path of the obstacle that is not version controlled in the work copy. If the Obstacle Path is of the same type (file or directory) as the corresponding path in the version library, it will be a version-controlled path, but the content will not change. It means that the child with the Obstacle Path, if it is also the Obstacle Path, will also be controlled by the version. If the files in the Obstacle Path are different from those in the version library, it is deemed that the work copy is modified locally. All attributes in the version library are applied to the Obstacle Path. Parameter explanation: Run "svn help checkout" in cmd to get help. Valid options:-r [-- revision] ARG: ARG (some commands also accept the ARG1: ARG2 range) version parameter can be one of the following: NUMBER version '{'date'}' the latest 'base' baseline version of the 'head' working copy in the 'head' version library after the specified time 'committed' before the final submission or baseline' PREV 'committed's previous version-q [-- quiet]: do not print information, or print only the summary information-N [-- non-recursive]: obsolete; try -- depth = files or -- depth = immediates -- depth ARG: operations that are subject to the depth parameter ARG ("empty", "files", "immediates", or "infinity") -- force: force operation run -- ignore-externals: ignore Global Options for external projects: -- username ARG: Specify the user name ARG -- password ARG: Specify the password ARG -- no-auth-cache: Do not cache the user authentication token -- non-interactive: Do not interactively prompt -- trust-server-cert: unprompted acceptance of unknown SSL server certificates (only used for options "-- non-interactive") -- config-dir ARG: Read the user configuration file from the directory ARG -- config-option ARG: set User Configuration options in the following format: FILE: SECTION: OPTION = [VALUE] example: (1) log on to the username checkout [python] svn checkout % _ SVN_URL _ % -- username % _ USER _ % -- password % _ PASSWORD _ % _ MODEL _ % _ ENV _ % (2) checkout, pay attention to some Use [python] echo svn checkout % _ ACTION _ % _ SVNROOT _ %/% _ PARAM _ %/SetUp/Model/% _ MODEL _ %/Setting if not exist Setting \. svn (svn checkout % _ ACTION _ % _ SVNROOT _ %/% _ PARAM _ %/SetUp/Model/% _ MODEL _ %/Setting -- non-interactive) else (svn switch % _ ACTION _ % _ SVNROOT _ %/% _ PARAM _ %/SetUp/Model/% _ MODEL _ %/Setting -- non-interactive) svn revert Setting-R 3. Function of revert: Restore the working copy file to the original version (recover most local modifications ). Use the Syntax: revert PATH... NOTE: This sub-command does not access the network, and it removes any conflicting status. However, it does not restore the deleted directory. Parameter description: valid option: -- targets ARG: transfer the file ARG content as the attachment parameter-R [-- recursive]: recursive down, same as -- depth = infinity -- depth ARG: operations subject to the depth parameter ARG ("empty", "files", "immediates", or "infinity")-q [-- quiet]: do not print information, or print only the summary information -- changelist ARG: only the [aliases: -- cl] global option: -- username ARG: Specifies the user name ARG -- password ARG: specify the password ARG -- no-auth-cache: Do not cache the user authentication token -- non-interactive: Do not interactive prompt -- trust-server-cert: accept unknown SSL server certificate without prompt (only used to select Item "-- non-interactive") -- config-dir ARG: Read the user configuration FILE from the directory ARG -- config-option ARG: Set the user configuration options in the following format: FILE: SECTION: OPTION = [VALUE] example: [python] svn revert Setting-R 4. delete (del, remove, rm): delete files and directories from the version library. Syntax: 1. delete PATH... 2. delete URL... 1. The project specified by each PATH will be scheduled to be deleted from the version library upon next submission. Unless the -- keep-local parameter is given, files and directories not submitted in the working copy will be deleted immediately. If the PATH is an unversioned or modified project, or contains the project, the project will be deleted only when the -- force parameter is given. 2. The project specified by each URL will be deleted from the version library by submitting immediately. Parameter description: Valid options: -- force: force the operation to run-q [-- quiet]: do not print information, or only print summary information -- targets ARG: transfer the file ARG content as the attachment parameter-m [-- message] ARG: Specify the log information ARG-F [-- file] ARG: Read the log information from the file ARG -- force-log: force verify log information resource -- editor-cmd ARG: Use ARG as an external editor -- encoding ARG: Treat ARG value as character encoding -- with-revprop ARG: in the new version, set the version attribute ARG using the format name [= value] -- keep-local: retain the path in the working copy. Global Options: -- username ARG: Specify the user name ARG -- password ARG: specify the password ARG -- no-auth-cache: do not slow down Save the user authentication token -- non-interactive: Do not interactive prompt -- trust-server-cert: Do not prompt to accept unknown SSL server certificate (only used for option "-- non-interactive ") -- config-dir ARG: Read the user configuration FILE from the directory ARG -- config-option ARG: the following format sets the user configuration options: FILE: SECTION: OPTION = [VALUE] example: [python] svn del-m "Remove STABLE" % _ CL_URL _ % 5. copy (cp): Copies data in the working copy or version library to keep the history. Use Syntax: copy SRC [@ REV]... DST when copying multiple sources, they are added as the child nodes of DST. DST must be a directory. SRC and DST can be the path of the working copy (WC) or the address of the version Library (URL): WC-> WC: Copy and scheduling increase (including history) WC-> URL: submit the working copy to the version library URL immediately-> WC: Check the URL to the working copy, add the URL-> URL: complete server copy; it is generally used for branch and label. All SRC must be of the same type. Warning to be compatible with the old version of Subversion, the operation of copying two working copies (WC-> WC) will not communicate with the version library. Similarly, by default, merged tracking information cannot be transmitted from the replication source to the destination. Parameter description: Valid options:-r [-- revision] ARG: ARG (some commands also accept the ARG1: ARG2 range) version parameters can be one of the following: NUMBER version '{'date'}' the latest 'base' baseline version of the 'head' working copy in the 'head' version library after the specified time 'committed' before the final submission or baseline' PREV 'committed's previous version-q [-- quiet]: do not print information, or print only the summary information -- ignore-externals: ignore external project -- parents: Create intermediate directory-m [-- message] ARG: specify the log information ARG-F [-- file] ARG: Read the log information from the file ARG -- force-log: force verify the log information resource -- editor-cmd ARG: use ARG as an external editor -- encoding ARG: The value is considered as the character encoding -- with-revprop ARG: in the new version, set the version attribute ARG using the format name [= value] global option: -- username ARG: Specify the user name ARG -- password ARG: specify the password ARG -- no-auth-cache: Do not cache the user authentication token -- non-interactive: Do not interactive prompt -- trust-server-cert: unprompted acceptance of unknown SSL server certificates (only used for options "-- non-interactive") -- config-dir ARG: Read the user configuration file from the directory ARG -- config-option ARG: set User Configuration options in the following format: FILE: SECTION: OPTION = [VALUE] example: [python] svn copy-m "% _ MEMO _ %" % _ CL_PATH _ % _ CL_URL _ % Copy is used to create the branch folder. The folder name is variable % _ MEMO _ % and the path is under % _ CL_PATH _ %. This method is similar to commit, the SVN version is automatically updated.

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.