Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 10 and Version 11 of code/tools/SVN


Ignore:
Timestamp:
Feb 18, 2008, 10:13:36 PM (17 years ago)
Author:
bknecht
Comment:

Some typos and additional infos

Legend:

Unmodified
Added
Removed
Modified
  • code/tools/SVN

    v10 v11  
    11[[TracNav(TracNav/TOC)]]
    22== SVN ==
    3 This Page contains a collection of the most used svn command including some examples. This page does not claim to be complete. for further reading use the built-in help function from svn. The syntax is ''svn help <command>'', of command is omitted, a complete list of valid svn command in printed to the comsole. Further it is assumed that the user has a basic understanding of the shell, and know he way around in the file structure. svn allow most flexibilities the bash shell allows.[[br]][[br]]
     3This Page contains a collection of the most used svn commands including some examples. This page does not claim to be complete. For further reading use the built-in help function from svn. The syntax is ''svn help <command>'', if command is omitted, a complete list of valid svn command in printed to the comsole. Further it is assumed that the user has a basic understanding of the shell, and knows the way around in the file structure. Svn allows most flexibilities the bash shell allows.[[br]][[br]]
    44
    5 these are some examples, which are elaborated further down.
     5These are some examples, which are elaborated further down.
    66{{{
    77svn co https://svn.orxonox.net/data/trunk data
     
    1616svn diff
    1717}}}
     18
     19Read the [http://svnbook.red-bean.com/en/1.1/index.html official guide to subversion] or its [http://www.onlamp.com/pub/a/onlamp/2002/10/31/subversion.html shorter version] for further information.
    1820
    1921If not noted otherwise all commands are recursive.
     
    3537----
    3638=== update (up) ===
    37 update is closely related to checkout, as it also download - or updates - the svn tree. while checkout is normally only used once, update is used all the time.
     39Update is closely related to checkout, as it also download - or updates - the svn tree. while checkout is normally only used once, update is used all the time.
    3840
    3941The syntax is ''svn up <local-path>'', if <local-path> is omitted the current update will be allied to the current directory.
     
    5254----
    5355=== commit (ci) ===
    54 Sometime also called checkin, does the opposite of checkout or update, it upload changes made to the local the to the server.
     56Sometimes also called checkin, does the opposite of checkout or update, it upload changes made to the local copy to the server.
    5557
    5658The syntax is ''svn ci -m <commit message> <local-path>'', if <local-path> is omitted, the current directory is assumed, if -m <commit message> is ommited, an editor will pop up where you can (and should) write a meaningful commit message.
    5759
    58 this will checkin the current directory including subfolders with the comment "initial upload"
     60This will checkin the current directory including subfolders with the comment "initial upload"
    5961{{{
    6062svn ci -m "initial upload"
    6163}}}
    6264
    63 A commit is only possible if the local version is up-to-date. if it isn't you will get an error, and the commit will fail. the solution then is to do an [wiki:SVN#updateup update].
     65A commit is only possible if the local version is up-to-date. If it isn't you will get an error, and the commit will fail. The solution then is to do an [wiki:SVN#updateup update].
    6466----
    6567=== add ===
    66 Adding a new file to the local svn copy, that it get upload with the next commit.
     68Adding a new file to the local svn copy, that it gets uploaded with the next commit.
    6769
    6870The syntax is ''svn add <file>''
    6971
    70 this will add the files myFile.cc and myFile.h in the folder myFolder to the svn
     72This will add the files myFile.cc and myFile.h in the folder myFolder to the svn
    7173{{{
    7274svn add myFolder/myFile.cc myFolder/myFile.h
     
    7476----
    7577=== remove (rm) ===
    76 Also called delete (del), which deletes an item from the svn tree. please note that this also removed the file/folder from the local harddrive.
     78Also called delete (del), which deletes an item from the svn tree. Please note that this also removes the file/folder from the local harddrive.
    7779
    7880The syntax is ''svn rm <file/folder>''.
    7981
    80 this will remove the file myOldFile.cc from the svn tree
     82This will remove the file myOldFile.cc from the svn tree
    8183{{{
    8284svn rm myOldFile.cc
     
    8486----
    8587=== move (mv) ===
    86 Sometime called rename (ren) - as a rename is the same as a move. The command simplifies the rearranging of files in the svn tree.
     88Sometimes called rename (ren) - as a rename is the same as a move. The command simplifies the rearranging of files in the svn tree.
    8789
    8890The syntax is ''svn mv <source files> <target-folder>''
    8991
    90 this will move the files myFile.cc and myFile.h to myFolder
     92This will move the files myFile.cc and myFile.h to myFolder
    9193{{{
    9294svn mv myFile.cc myFile.h myFolder
    9395}}}
    9496
    95 this will rename the file myFiel.cc to myFile.cc - to correct a typo. please note the mv and rename are the same command
     97This will rename the file myFiel.cc to myFile.cc - to correct a typo. Please note the mv and rename are the same command
    9698{{{
    9799svn ren myFiel.cc myfile.cc
     
    99101----
    100102=== copy (cp) ===
    101 A command which is rarely used on the local tree - why would someone need a file twice in the same tree? - but it is rather useful to create new branches. though it is normally done by the supervisors, it can be done by the students.
     103A command which is rarely used on the local tree - why would someone need a file twice in the same tree? - but it is rather useful to create new branches. Though it is normally done by the supervisors, it can be done by the students.
    102104
    103105The syntax is ''svn cp <source-tree> <target-tree>'' or ''svn cp <source-files> <target>''
     
    109111----
    110112=== resolved ===
    111 If a conflict arises - this normally happens if someone change a file on the server (committed it) while you were doing changes in the same place. This command '''does not solve''' the conflict, but it removes the other unnecessary files.
     113If a conflict arises - this normally happens if someone changes a file on the server (committed it) while you were doing changes in the same place. This command '''does not solve''' the conflict, but it removes the other unnecessary files.
    112114
    113115The syntax is ''svn resolved <conflicting file>''
     
    119121----
    120122=== revert ===
    121 One of the major advantages of a version control system, is that you can always revert to a known saved state - in this case the last updated local revision. revert removes all local changes and restores the file to a state prior editing, i.e discarding all local changes.
     123One of the major advantages of a version control system, is that you can always revert to a known saved state - in this case the last updated local revision. Revert removes all local changes and restores the file to a state prior editing, i.e discarding all local changes.
    122124
    123125The syntax is ''svn revert <target>''.
     
    129131----
    130132=== diff (di) ===
    131 Another rarely used but very useful command. It shows the difference between the downloaded revision and the current state, which basically what will be uploaded at the next commit. It is also useful to check if all new files have been added to the svn tree - it happens very often, the there are two commits in short time, first the updates, then the new files.
     133Another rarely used but very useful command. It shows the difference between the downloaded revision and the current state, which basically what will be uploaded at the next commit. It is also useful to check if all new files have been added to the svn tree - it happens very often, that there are two commits in short time, first the updates, then the new files.
    132134
    133135The syntax is ''svn di <local-path>'', if <local-path> is omitted, the current directory is assumed.
    134136
    135 this will show - print to the console - the current changes made to the revision
     137This will show - print to the console - the current changes made to the revision
    136138{{{
    137139svn di .