Section 15.1. svn


15.1. svn

The svn program is the basic command-line client for interacting with Subversion. It contains a full array of commands that can be used for interacting with a Subversion working copy or repository.

Online help for each of svn's subcommands can be obtained by running the program as: svn help [COMMAND].

Options

  • --version

    Outputs version information about svn.

Subcommands

The svn commands (with alternate names in parenthesis) are

  • add

  • blame (praise, annotate, ann)

  • cat

  • checkout (co)

  • cleanup

  • commit (ci)

  • copy (cp)

  • delete (del, remove, rm)

  • diff (di)

  • export

  • help (?, h)

  • import

  • info

  • list (ls)

  • log

  • merge

  • mkdir

  • move (mv, rename, ren)

  • propdel (pdel, pd)

  • propedit (pedit, pe)

  • propget (pget, pg)

  • proplist (plist, pl)

  • propset (pset, ps)

  • resolved

  • revert

  • status (stat, st)

  • switch (sw)

  • update (up)

15.1.1. svn add

This command schedules new files or directories to be placed under Subversion's control. This command doesn't actually send the file to the repository, but merely marks it for addition in the working copy. The actual addition to the repository occurs on the next svn commit command.

Basic Usage
 $ svn add PATH 

Options
  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • -N [--non-recursive]

    Don't recurse into subdirectories and add their contents.

  • -q [--quiet]

    Supply the minimum output possible.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

  • --auto-props

    Automatically set properties based on the type of file added to the repository. This overrides any defaults set in your Subversion configuration files.

  • --no-auto-props

    Don't automatically set properties on any files added to the repository. This overrides any defaults set in your Subversion configuration files.

15.1.2. svn blame (praise, annotate, ann)

This command outputs the contents of one or more files, with an author and revision number listed for each line of the file. The author is the username of the last user to modify that particular line, and the revision represents the revision where the modification occurred.

Note that it's the last user to modify the line who is listed, even if she made a nonfunctional change such as adjusting whitespace. The output of this command is useful, but you should generally use other commands like svn log and svn diff to double-check what it tells you before relying on the author information it supplies you with.

Basic Usage
 $ svn blame PATH... 

or

 $ svn blame URL... 

Takes one or more PATHs or URLs that point to files. Attempting to run svn blame on a directory results in an error. You can mix URLs and PATHs on the same command line.

Options
  • -r [--revision] arg

    Use the version of files in revision arg when processing the command. Takes either a single revision number, or a range of revisions, separated by a colon.

     --revision REV --revision LOW:HIGH 

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.3. svn cat

This command dumps the specified file(s) to standard output.

Basic Usage
 $ svn cat PATH... 

or

 $ svn cat URL... 

Takes one or more PATHs or URLs that point to files. Attempting to run svn cat on a directory results in an error. You can mix URLs and PATHs on the same command line.

Options
  • -r [--revision] arg

    Use the version of files in revision arg when processing the command. Takes only a single revision number. Ranges are not allowed.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.4. svn checkout (co)

This command retrieves the contents of a repository (or part of a repository) and places them in a new working copy on the local machine.

Basic Usage
 $ svn checkout URL [PATH] 

Subversion checks out a working copy from the URL given. If the URL points to a directory other than the root of a repository, Subversion recursively checks out that directory and its contents. If the URL points to the root of the repository, the whole repository is checked out. URLs must point to a directory. Single files cannot be checked out (use svn cat).

If a PATH is given, Subversion uses that as the location and name of the working copy (the basename of the PATH is the root of the working copy). If no PATH is given, the working copy is created in the current directory, with the same name as the directory being checked out (or the repository, if the root is being checked out).

Options
  • -r --revision] arg

    Use the version of files in revision arg when performing the checkout. Takes only a single revision number, not ranges.

  • -q --quiet]

    Supply the minimum output possible.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents. Only the specified directory and top-level files that it contains are checked out.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.5. svn cleanup

This command can be used to clean up a working copy if a command fails and leaves the working copy unusable. It removes all locks and completes any unfinished operations in order to get the working copy back into a usable state.

Basic Usage
 $ svn cleanup 

or

 $ svn cleanup PATH... 

Options
  • --diff3-cmd arg

    Use the command pointed to by arg for performing two-and three-way diffs, instead of the built-in functions.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.6. svn commit (ci)

This command sends local modifications to files or directories to the repository, creating a new revision.

Basic Usage
 $ svn commit 

or

 $ svn commit PATH... 

Options
  • -m --message] arg

    Use arg as the log message for the commit. If this option isn't used, an editor is opened to request the log message (if a default editor has been configured or the --editor-cmd option is also used).

  • -F --file] arg

    Read the log message from the file arg.

  • -q --quiet]

    Supply the minimum output possible.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • --force-log

    Force the provided log message source to be accepted as valid. This may be needed if Subversion thinks that a provided log message or file containing a log message is meant as something else (for instance, if you use a versioned file as the source of your log message).

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.7. svn copy (cp)

This command copies files or directories within a repository or working copy (or from one to the other).

Basic Usage
 $ svn copy SOURCE_PATH DESTINATION_PATH 

Either the source path or destination path (or both) can be URLs that point to a point in the repository. If the destination is a URL, the copy is committed immediately, instead of being scheduled for the next svn commit.

Options
  • -m --message] arg

    Use arg as the log message for the commit. On repository-side copies, if this option isn't used, an editor is opened to request the log message (if a default editor has been configured or the --editor-cmd option is also used).

  • -F --file] arg

    Read the log message from the file arg.

  • -r --revision] arg

    Use revision arg as the source for the file being copied. Only takes single revision numbers, not ranges.

  • -q --quiet]

    Supply the minimum output possible.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --force-log

    Force the provided log message source to be accepted as valid. This may be needed if Subversion thinks that a provided log message or file containing a log message is meant as something else (for instance, if you use a versioned file as the source of your log message).

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.8. svn delete (del, remove, rm)

This command marks files or directories in a working copy for deletion. The next time a commit occurs, they are removed in the repository. The command can also operate directly on a repository, in which case the removal occurs immediately (as if an svn commit had been executed immediately following the deletion).

Basic Usage
 $ svn delete PATH... 

or

 $ svn delete URL... 

Takes one or more PATHs or URLs. Must use all PATHs or all URLs. You cannot mix the two.

Options
  • --force

    Turns off any precautions meant to ensure that you don't accidentally lose data. This can be useful in some instances, if you know what you're doing, but use it with caution.

  • --force-log

    Force the provided log message source to be accepted as valid. This may be needed if Subversion thinks that a provided log message or file containing a log message is meant as something else (for instance, if you use a versioned file as the source of your log message).

  • -m --message] arg

    Use arg as the log message for the commit. On repository-side deletions, if this option isn't used, an editor is opened to request the log message (if a default editor has been configured or the --editor-cmd option is also used).

  • -F --file] arg

    Read the log message from the file arg.

  • -q --quiet]

    Supply the minimum output possible.

  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.9. svn diff (di)

This command outputs the differences between two files, or two revisions of the same file. Both files used for the comparison can come from the current working copy, or from a given revision in the repository.

Basic Usage
 $ svn diff -r N:M URL... 

Or, if you want to take the difference between two different URLs in a repository

 $ svn diff URL1@N URL2@M 

or

 $ svn diff -r N:M URL1 URL2 

Finally, the long form of the command is

 $ svn diff -r N:M --old OLD_URL --new NEW_URL [PATH...] 

If one or more PATHs are used, Subversion restricts the diff output to those paths, relative to each URL.

In Subversion 1.1 and later, use of the @ sign indicates peg revisions. If a peg revision is used, Subversion takes the file of the given URL at that particular revision. If the normal --revision option is used, Subversion instead looks for the file of the given URL in the HEAD revision and follows it back to the requested revision. Normally, the distinction is unimportant, but if a file was moved or deleted and then later replaced by a file of the same name, using the wrong form might not give you the file that you really want.

Options
  • -r --revision] arg

    The two revisions to use when performing the diff, in the form N:M, where N is the old revision and M is the new revision.

  • --old arg

    The URL (given as arg for the older revision used in the diff). This option must be accompanied by --new.

  • --new arg

    The URL (given as arg for the newer revision used in the diff). This option must be accompanied by --old.

  • -x --extensions] arg

    Pass the value of arg to the GNU diff program, when performing the diff operation. If you use this option, you must also use the --diff-cmd option.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • --diff-cmd arg

    Tell Subversion to use arg as the diff command for performing the diff.

  • --no-diff-deleted

    If a file has been deleted, don't print the differences. This prevents an entire file from being dumped if it has been deleted in one of the versions compared.

  • --notice-ancestry

    Look at a file's ancestry when comparing two files. If two files have similar contents but different ancestry, they are considered different.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.10. svn export

This command is used to get a local copy of a repository (or portion of a repository) without any Subversion-specific information (i.e., without the .svn directories).

Basic Usage
 $ svn export URL [DESTINATION_PATH] 

or

 $ svn export WC_PATH [DESTINATION_PATH] 

The URL or WC_PATH must point to a directory. Individual files cannot be exported (use svn cat). If no DESTINATION_PATH is given, the exported directory is placed in the current working directory, using its name from the repository. If a DESTINATION_PATH is given, the exported directory is created with the path and name supplied as the destination.

Options
  • -r --revision] arg

    Use the version of files in revision arg when performing the export. Takes only single revision numbers, no ranges.

  • -q --quiet]

    Supply the minimum output possible.

  • --force

    Turns off any precautions meant to ensure that you don't accidentally lose data. This can be useful in some instances, if you know what you're doing, but use it with caution.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

  • --native-eol arg (1.1 only)

    Allows you to specify an end-of-line indicator to use for files that use the default system EOL indicator (i.e., have svn:eol-style unset or set to native). The argument for this option can be LF, CR, or CRLF.

15.1.11. svn help (?, h)

This command outputs documentation for the svn command. To get help on a specific subcommand, run help with the name of the command.

Basic Usage
 $ svn help [COMMAND] 

Options

None

15.1.12. svn import

This command is used to bring an unversioned file or directory into a repository. Unlike svn add, this command performs an immediate commit. It also doesn't need a working copy to function.

Basic Usage
 $ svn import URL 

or

 $ svn import PATH URL 

If just a URL is given, the current working directory is recursively imported into the repository pointed to by URL. If a PATH is given, the directory pointed to by PATH is imported.

Options
  • -m --message] arg

    Use arg as the log message for the commit. If this option isn't used, an editor is opened to request the log message (if a default editor has been configured or the --editor-cmd option is also used).

  • -F --file] arg

    Read the log message from the file arg.

  • -q --quiet]

    Supply the minimum output possible.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --force-log

    Force the provided log message source to be accepted as valid. This may be needed if Subversion thinks that a provided log message or file containing a log message is meant as something else (for instance, if you use a versioned file as the source of your log message).

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

  • --auto-props

    Automatically set properties based on the type of file imported into the repository.

  • --no-auto-props

    Don't automatically set properties on any files added to the repository.

15.1.13. svn info

This command is used to output a variety of information about files and directories in a working copy.

Basic Usage
 $ svn info [PATH...] 

If no PATH is given, the info for the current working directory is displayed.

Options
  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.14. svn list (ls)

This command lists the contents of directories in a repository.

Basic Usage
 $ svn list [PATH...] 

or

 $ svn list [URL...] 

Takes one or more PATHs or URLs. You may mix PATHs and URLs in the same command.

Options
  • -r --revision] arg

    List the files as of revision arg. Only accepts single revision numbers, not ranges.

  • -v --verbose]

    Print extra information about each file and directory. For each item listed, svn list tells you the last revision where that item was modified, the last user who modified the item, the size of the item (if it is a file and not a directory), and the date that the item was modified.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.15. svn log

This command can be used to output the log message history of a file or directory.

Basic Usage
 $ svn log [PATH...] 

or

 $ svn log URL [PATH...] 

If no URL or PATH is given, the log history for the current working directory is displayed. If just PATHs are given, the log history for the files or directories pointed to is displayed. If a URL is given, the log history for the repository file or directory pointed to by the URL is displayed. If the URL points to a directory, and one or more PATHs are given after the URL, those PATHs are considered relative to the URL, and the logs for all file or directories pointed to are displayed.

Options
  • -r --revision] arg

    Limit the logs messages displayed to a specific revision or range of revisions. To enter a range, use the form -r N:M, where N and M are the starting and ending revisions in the range, respectively.

  • -q --quiet]

    Output the minimum amount of output; usually output consists of the revision numbers, the author of the revision, and the date of the revision (see --verbose). The log messages are not output.

  • -v --verbose]

    Tell Subversion to output the files that were changed, and what action was performed on them in addition to the normal output for each log message. File actions include whether the file was modified (M), added (A), or deleted (D). If used in conjunction with --quiet, the files that have changed are output in addition to the usual output when using --quiet.

  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • --stop-on-copy

    Tell Subversion to stop outputting log messages as soon as it reaches a revision where the file or directory was copied from another location.

  • --incremental

    Format the output so that it can be concatenated with the output from another run of svn log. In normal output, this leaves the final separator line off of the output. When --xml is used, it leaves off an XML header and enclosing <log> element.

  • --xml

    Format the output in an XML format.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.16. svn merge

This command takes the differences between two revisions of a repository (or a working copy and a repository revision) and merges them into a working copy.

Basic Usage
 $ svn merge SOURCE_URL1[@N] SOURCE_URL2[@M] [WC_PATH] 

or

 $ svn merge SOURCE_PATH1@N SOURCE_PATH2@M [WC_PATH] 

or

 $ svn merge -r N:M SOURCE [WC_PATH] 

In the first and second usages, two sources are given for comparison, with the differences merged into the WC_PATH in the working copy. If the sources are URLs, the revisions can be omitted (and Subversion uses the HEAD revisions). If the sources are given as paths in the working copy, a revision must be given, and the comparisons are made against the corresponding URLs to each working copy path.

In the third form, the SOURCE can be either a URL or a working copy path. The revision range is required in this case to give two different versions to compare. The differences are merged into WC_PATH as in the first two usage forms.

In Subversion 1.1 and later, the use of the @ sign indicates peg revisions. If a peg revision is used, Subversion takes the file of the given URL at that particular revision. If the normal --revision option is used, Subversion instead looks for the file of the given URL in the HEAD revision and follows it back to the requested revision. Normally, the distinction is unimportant, but if a file was moved or deleted and then later replaced by a file of the same name, using the wrong form might not give you the file that you really want.

Options
  • -r --revision] arg

    Give the two revisions to be merged between, in the form -r N:M, where N is the older revision and M is the newer revision. The revision numbers can be reversed to reverse the merge direction.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • -q --quiet]

    Supply the minimum output possible.

  • --force

    Turn off any precautions meant to ensure that you don't accidentally lose data. This can be useful in some instances, if you know what you're doing, but use it with caution.

  • --dry-run

    Run the command without actually modifying anything. Outputs which files will change, as well as any expected conflicts.

  • --diff3-cmd arg

    Use the command pointed to by arg for performing two-and three-way diffs, instead of the built-in functions.

  • --ignore-ancestry

    Cause Subversion to ignore the ancestry of the files involved in the merge.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.17. svn mkdir

This command creates a new versioned directory, either in a working copy or directly on the repository. If the directory is created in the working copy, it is scheduled for addition to the repository on the next commit (just as if you'd created a local directory and then done an svn add). If the directory is created in the repository, it is committed immediately, with a new revision created (just as if you'd done an svn commit).

Basic Usage
 $ svn mkdir PATH... 

or

 $ svn mkdir URL... 

Either PATHs or URLs can be given, but PATHs and URLs cannot be mixed on the same command line.

Options
  • -m --message] arg

    Use arg as the log message for the commit. On repository-side directory creation operations, if this option isn't used, an editor is opened to request the log message (if a default editor has been configured or the --editor-cmd option is also used).

  • -F --file] arg

    Read the log message from the file arg.

  • -q --quiet]

    Supply the minimum output possible.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --force-log

    Force the provided log message source to be accepted as valid. This may be needed if Subversion thinks that a provided log message or file containing a log message is meant as something else (for instance, if you use a versioned file as the source of your log message).

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.18. svn move (mv, rename, ren)

This command moves a file in a repository or working copy from one location to another. If the move is done in the working copy, the change is scheduled to be applied to the repository on the next commit. If it is applied directly to a repository, the move takes place immediately, with a new revision (as if svn commit had been run).

Basic Usage
 $ svn move SOURCE DESTINATION 

The SOURCE and DESTINATION can either be working copy paths or URLs pointing to the repository. In either case, SOURCE and DESTINATION must be of the same form (both paths or both URLs).

Options
  • -m --message] arg

    Use arg as the log message for the commit. On repository-side moves, if this option isn't used, an editor is opened to request the log message (if a default editor has been configured or the --editor-cmd option is also used).

  • -F --file] arg

    Read the log message from the file arg.

  • -r --revision] arg

    For all practical purposes, svn move does not really accept --revision. You can specify it as an option, but the only valid argument is HEAD.

  • -q --quiet]

    Supply the minimum output possible.

  • --force

    Turns off any precautions meant to ensure that you don't accidentally lose data. This can be useful in some instances, if you know what you're doing, but use it with caution.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --force-log

    Force the provided log message source to be accepted as valid. This may be needed if Subversion thinks that a provided log message or file containing a log message is meant as something else (for instance, if you use a versioned file as the source of your log message).

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.19. svn propdel (pdel, pd)

This command deletes a property from a working copy file, or deletes a revision property. If the working copy property is deleted, the deletion is committed to the repository on the next svn commit. If the deletion is applied to a revision property, the change takes place immediately, and is not undoable.

Basic Usage
 $ propdel PROP_NAME [PATH...] 

or

 $ propdel PROP_NAME --revprop -r REVISION [URL] 

If no PATHs are given, the property is deleted from the current working directory. Otherwise, it is deleted from all files or directories pointed to by the PATHs. For revision properties, the URL of the current working copy is used if a URL is not given.

Options
  • -q --quiet]

    Supply the minimum output possible.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • -r --revision] arg

    Indicate the revision that should be modified when deleting a revision property. Must be used in conjunction with --revprop.

  • --revprop

    Indicate that the property referred to is a revision property, not a versioned property.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.20. svn propedit (pedit, pe)

This command opens a text editor, with the contents of a versioned property in a working copy, or a revision property in the repository. If the property contents are changed and saved, the modified property value is applied to the property. For a working copy file, the property change is applied at the next commit. If the property edited is a revision property, the changes take effect immediately on saving and exiting from the text editor, and are not undoable.

Basic Usage
 $ propedit PROP_NAME [PATH...] 

or

 $ propedit PROP_NAME --revprop -r REVISION [URL] 

If no PATHs are given, the property is edited on the current working directory. Otherwise, it is edited for all files or directories pointed to by the PATHs (each file or directory is opened separately in the editor). For revision properties, the URL of the current working copy is used if a URL is not given.

Options
  • -r --revision] arg

    Indicate the revision that should be modified when editing a revision property. Must be used in conjunction with --revprop.

  • --revprop

    Indicate that the property referred to is a revision property, not a versioned property.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --editor-cmd arg

    Use the command pointed to by arg as the editor to open when asking for a log message, rather than the system-wide default editor.

  • --force

    Turns off any precautions meant to ensure that you don't accidentally lose data. This can be useful in some instances, if you know what you're doing, but use it with caution.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.21. svn propget (pget, pg)

This command outputs the value of a versioned property on a file or directory, or a revision property.

Basic Usage
 $ propget PROP_NAME [PATH...] 

or

 $ propget PROP_NAME --revprop -r REVISION [URL] 

If no PATHs are given, the property is output for the current working directory. Otherwise, it is output from all files or directories pointed to by the PATHs. For revision properties, the URL of the current working copy is used if a URL is not given.

Options
  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • -r --revision] arg

    Indicate the revision that the property should be retrieved from. May be used in conjunction with revision properties and versioned properties.

  • --revprop

    Indicate that the property referred to is a revision property, not a versioned property.

  • --strict

    Indicate that Subversion should use strict semantics, which prevents the output of an end-of-line character at the end of the output. This is useful for outputting binary files stored in properties.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.22. svn proplist (plist, pl)

This command outputs all of the versioned properties that have been set for a file or directory, or all of the revision properties that have been set for a given revision.

Basic Usage
 $ propdel [PATH...] 

or

$ propdel --revprop -r REVISION [URL]

If no PATHs are given, the properties set for the current working directory are listed. Otherwise, properties are listed for all files or directories pointed to by the PATHs. For revision properties, the URL of the current working copy is used if a URL is not given.

Options
  • -v --verbose]

    Cause Subversion to output property values in addition to property names when listing set properties.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • -r --revision] arg

    Indicate the revision that the properties should be retrieved from. May be used in conjunction with revision properties and versioned properties.

  • -q --quiet]

    Supply the minimum output possible.

  • --revprop

    Indicate that the property referred to is a revision property, not a versioned property.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.23. svn propset (pset, ps)

This command sets the value of a versioned property on a working copy file or directory, or the value of a revision property in the repository (erasing any previous value). The value to set the property to is supplied on the command line. If a working copy file or directory is modified, the property change is sent to the repository on the next commit. If the change is applied to a revision property, the change is applied immediately, and is not undoable.

Basic Usage
 $ propset PROP_NAME PROP_VAL [PATH...] 

or

 $ propset PROP_NAME --revprop -r REVISION PROP_VAL [URL] 

If no PATHs are given, the property is set on the current working directory. Otherwise, it is set on all files or directories pointed to by the PATHs. For revision properties, the URL of the current working copy is used if a URL is not given.

Options
  • -F --file] arg

  • -q --quiet]

    Supply the minimum output possible.

  • -r --revision] arg

    Indicate the revision that should be modified when setting a revision property. Must be used in conjunction with --revprop.

  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • --revprop

    Indicate that the property referred to is a revision property, not a versioned property.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --encoding arg

    Use to indicate that the log message is encoded in a different encoding than the system default. The encoding used is given as arg.

  • --force

    Turn off any precautions meant to ensure that you don't accidentally lose data. This can be useful in some instances, if you know what you're doing, but use it with caution.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.24. svn resolved

This command tells Subversion that a conflicted file has been fixed to resolve the conflict. This removes the conflict state from the file, and deletes any additional files generated by Subversion when the conflict was detected.

Basic Usage
 $ svn resolved PATH... 

Options
  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • -q --quiet]

    Supply the minimum output possible.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.25. svn revert

This command reverts a file in a working copy to its last unmodified state. This permanently removes all local changes, and any scheduled actions (addition, deletion, and so on).

Basic Usage
 $ svn revert PATH... 

Options
  • --targets arg

    Parse the files pointed to by arg, and add them to the list of arguments for the command.

  • -R --recursive]

    Recursively descend into any directories supplied in the path, and process all of the files contained therein.

  • -q --quiet]

    Supply the minimum output possible.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.26. svn status (stat, st)

This command outputs the current status of files in a working copy directory.

Basic Usage
 $ svn status [PATH...] 

Options
  • -u --show-updates]

    Cause the output to show which files have been updated in the repository, too. This requires Subversion to contact the repository, which is not normally done when running svn status.

  • -v --verbose]

    Cause Subversion to output all of the files in examined directories, regardless of whether they have been modified locally. It also outputs the current working copy revision of the file, the last committed revision of the file, and the file's last author.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • -q --quiet]

    Supply the minimum output possible.

  • --no-ignore

    Instruct Subversion to show files that it has been instructed to ignore through the svn:ignore property or user configuration.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.27. svn switch (sw)

This command switches the current URL of a file or directory in a working copy. This can be used to switch a directory to a branch or tag, or to switch an entire working copy to a new URL, if the repository is moved.

Basic Usage
 $ svn switch URL [PATH] 

or

 $ svn switch --relocate FROM_URL TO_URL [PATH...] 

If no PATHs are given, the current working copy directory is switched.

Options
  • -r --revision] arg

    Give a specific revision to place the working copy at when switching. This is equivalent to running svn update -r N immediately after running svn switch.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • -q --quiet]

    Supply the minimum output possible.

  • --diff3-cmd arg

    Use the command pointed to by arg for performing two-and three-way diffs, instead of the built-in functions.

  • --relocate

    Instruct Subversion to relocate the working copy from one URL to another. This is used if the URL of the repository has changed.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

15.1.28. svn update (up)

This command updates files or directories in a working copy to reflect a different revision (the HEAD revision, by default). Local modifications are kept. If a directory is given, Subversion recursively updates all of the files contained within that directory, as well as the directory itself.

Basic Usage
 $ svn update [PATH...] 

If no PATHs are given, the current working copy directory is used.

Options
  • -r --revision] arg

    Tell Subversion to update to a revision other than HEAD. Only single revisions may be given, not ranges.

  • -N --non-recursive]

    Don't recurse into subdirectories and process their contents.

  • -q --quiet]

    Supply the minimum output possible.

  • --diff3-cmd arg

    Use the command pointed to by arg for performing two-and three-way diffs, instead of the built-in functions.

  • --username arg

    Use the username arg when contacting the repository. If a username is not given, Subversion uses the username that has been cached in the current working copy, or if a URL is given instead of a PATH, it uses the current login username.

  • --password arg

    Use the password arg when contacting the repository. If a password is needed and not supplied, Subversion prompts for one.

  • --no-auth-cache

    Don't keep the authentication information for use with future repository connections.

  • --non-interactive

    Don't ask the user for any additional information. Useful for running the command in a script.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.



    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    ISBN: 131855182
    EAN: N/A
    Year: 2005
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net