Changes between Version 3 and Version 4 of pm-svn-cmds


Ignore:
Timestamp:
Jun 2, 2006 1:29:34 PM (14 years ago)
Author:
andreasw
Comment:

intermediate save

Legend:

Unmodified
Added
Removed
Modified
  • pm-svn-cmds

    v3 v4  
    33Below we list the subversion command line commands that a typical developer has to know about.  Online help is available using {{{svn help}}}.  A detailed description of each command can be found in the "Subversion Complete Reference" chapter of the subversion book, at [http://svnbook.red-bean.com/nightly/en/svn.ref.html http://svnbook.red-bean.com/nightly/en/svn.ref.html]
    44
    5 == svn help ==
     5=== svn help ===
    66
    7 Lists all available {{{svn}}} commands.  Help for a specific command {{{cmd}}} can be obtained with {{{svn help cmd}}}.
     7Lists all available {{{svn}}} commands.  '''Help for a specific command''' {{{cmd}}} can be obtained with {{{svn help cmd}}}.
    88
    9 == svn checkout (short form: svn co) ==
     9=== svn checkout (short form: svn co) ===
    1010
    11 Checks out a directory plus all subdirectories from a subversion repository.  The COIN repositories are available from the URL {{{https://www.coin-or.org/svn}}}.  For each project, say {{{Prjct}}}, you obtain everything in the current revision for the project, by specifying {{{svn co https://www.coin-or.org/svn/Prcjt/}}}; if you only want a part of the code, such as the current official release (by convention in the subdirecory {{{trunk}}}, you type {{{svn co https://www.coin-or.org/svn/Prcjt/trunk}}}.  Usually, you should specify the target directory where you want your local copy of the code to be stored (such as {{{Coin-Prjct}}}).  If the target directory is omitted, the source code will be installed in a subdirectory with the name of the last directory in the URL, i.e., {{{trunk}}} in the example above.
     11'''Checks out a directory plus all subdirectories''' from a subversion repository.  The COIN repositories are available from the URL {{{https://www.coin-or.org/svn}}}.  For each COIN package, say {{{Pkg}}}, you obtain everything in the package (including all branches and tags) by specifying "{{{svn co https://www.coin-or.org/svn/Pkg/"; if you only want a part of the code, such as the current official release (by convention in the subdirecory {{{trunk}}}, you type {{{svn co https://www.coin-or.org/svn/Pkg/trunk}}}.  Usually, you should specify the target directory where you want your local copy of the code to be stored (such as {{{Coin-Pkg}}}).  If the target directory is omitted, the source code will be installed in a subdirectory with the name of the last directory in the URL, i.e., {{{trunk}}} in the example above.
    1212
    1313If you want to specify a specific revision that you want to check out, you can do this using the {{{-r N}}} flag, where {{{N}}} is the revision number.
    1414
    15 By default, {{{svn checkout}}} will download files in other subversion directories, if [wiki:pm-svn-externals svn externals] are defined for directories in the specified URL, and will recurse to further locations if externals are defined there.  If you don't want to download any externals, specify the {{{--ignore-externals}}} flag.
     15By default, {{{svn checkout}}} will download files from other subversion repositories, if [wiki:pm-svn-externals svn externals] are defined for directories in the specified URL, and will recurse to further locations if externals are defined there.  If you don't want to download any externals, specify the {{{--ignore-externals}}} flag.
    1616
    1717The COIN svn repository is set up in a way, so that everybody can download files, without having to provide a password.  You will have to provide your id and password once, if you want to do a write action, such as {{{svn submit}}}.
    1818
    19 == svn update (short form: svn up) ==
     19=== svn update (short form: svn up) ===
    2020
    21 Updates the local copy to the current version of the current directory and subdirectories, or of a specific directory, if it is given as argument (e.g., {{{svn up subdir}}}).  If you have made changes in your local copy, subversion will try to merge the difference between the previously checked-out version and the new one.  If it has trouble doing that, it will notify you of a ''conflict''.  You should then have a look at the files for which a conflict occured and fix it; the location of a conflict is marked by {{{<<<}}} and {{{>>>}}} strings.
     21'''Updates the local copy''' to the current version of the current directory and subdirectories, or of a specific directory, if this directory is given as argument (e.g., {{{svn up subdir}}}).  If you have made changes in your local copy, subversion will try to merge the difference between the previously checked-out version and the new one.  If it has trouble doing that, it will notify you of a ''conflict''.  You should then have a look at the files for which a conflict occured and fix it; the location of a conflict is marked by {{{<<<}}} and {{{>>>}}} strings.
    2222It is important that you ''resolve'' the conflict, either by using {{{svn resolved}}} or {{{svn revert}}}, because you will otherwise not be able to commit your changes.
    2323
    2424The {{{-r N}}} flag allows you to update your local copy to a specific revision number ({{{N}}}).  To avoid recursion into subdirectories during the update, use the {{{-N}}} flag.  The {{{--ignore-externals}}} flags tells subversion to ignore the externals.
    2525
     26=== svn status (short form: svn st) ===
    2627
    27 == svn status (short form: svn st) ==
     28If you want to find out the '''status of the files in your local copy''', you use this command.  This will tell you, which files and directories in your local copy have local modifications, which files are marked for addition or deletion, etc.  To see a list of the symbol that show up for the files, type "{{{svn help status}}}", or look read about it in the [http://svnbook.red-bean.com/nightly/en/svn.ref.html subversion book].
    2829
    29 == svn commit (short form: svn ci) ==
     30=== svn commit (short form: svn ci) ===
    3031
    31 == svn diff (short form: svn di) ==
     32This command it used to '''commit your local modifications to the subversion repository'''. If add enter a file or directory name as argument, only the files or the directory (and everything below it) will be committed.  If you omit this argument, the current directory and everything below it will be submitted.  To suppress the recursion into subdirectories, you can specify the {{{-N}}} flag.
    3233
    33 == svn revert ==
     34You should enter a message that describe the changes that you made, so that later on you can see in the subversion history what has been going on.  You can enter the message on the command line, using the "{{{-m}}}" flag, followed by the message (in quotes).  If you omit the {{{-m}}} flag, you default editor will open for you to enter the message.
    3435
    35 == svn resolved ==
     36'''Note''':  For most COIN packages, we use [wiki:pm-svn-externals subversion externals] to obtain dependencies.  The {{{commit}}} command does not automatically recurse into externals; therefore, you have to do a {{{commit}}} by hand.  '''Make sure you are not committing code to an external with a specified version number in the externals definition!'''
    3637
    37 == svn add ==
     38=== svn diff (short form: svn di) ===
     39
     40To '''see the details of local modifications in your working copy''', you use this command.  You can specify a file or directory name as argument, to narrow down, which modifications you want to have shown.  Again, the {{{-N}}} flag can be used to suppress recursion into subdirectories.  You can also see the differences of your local copy with respect to a particular revision in the repositry, by using the "{{{-r N}}}" flag, where {{{N}}} is the specific revision number.
     41
     42=== svn revert ===
     43
     44If you want to '''restore the current version in the repository''' and undo your local modifications, you use this command.  By default, it reverts the modifications only made to a file or directory given to the command as argument; if the argument is omitted, only the current directory is reverted.  If you want to revert more than just one file or directory, you can use the "{{{-R}}}" to enable the recursive action of the command.
     45
     46=== svn resolved ===
     47
     48This command is necessary to tell subversion that you '''resolved a conflict that occured earlier during an update or a merge'''.  Unless you ''resolve'' those conflicts, you will not be able to commit local changes of the files and directories, for which the conflict occurred.  A conflict is also resolve automatically, if you use the {{{revert}}} command.
     49
     50=== svn add ===
     51
     52You use this command to '''add new files and directories''' to the repository.  You need to give subversion the name of the file or directory as argument.  '''Note that the command acts recursively on directories''', unless you use the "{{{-N}}}" flag. 
    3853
    3954== svn remove (short form: svn rm) ==
     
    4560== svn merge ==
    4661
     62== svn export ==
     63
    4764== svn proplist (short form: svn plist) ==
    4865
     
    5370== svn propdel (short form: svn pdel) ==
    5471
    55 == svn export ==