Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 7 and Version 8 of code/tools/SVN


Ignore:
Timestamp:
Feb 18, 2008, 12:30:31 AM (17 years ago)
Author:
nicolasc
Comment:

cleanup

Legend:

Unmodified
Added
Removed
Modified
  • code/tools/SVN

    v7 v8  
    11== SVN ==
    2 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]]
     2This 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]]
    33
    44these are some examples, which are elaborated further down.
     
    1919
    2020=== checkout (co) ===
    21 the checkout command is used to create a local copy of a svn subtree on the local computer.
     21The checkout command is used to create a local copy of a svn subtree on the local computer.
    2222
    23 the syntax used is ''svn co -r <revision> <remote-path> <local-path>'', if -r <revision> is omitted, the HEAD revision is assumed, which is also the newest one, if <local-path> is omitted the last remote folder will be used as <local-path>.
     23The syntax used is ''svn co -r <revision> <remote-path> <local-path>'', if -r <revision> is omitted, the HEAD revision is assumed, which is also the newest one, if <local-path> is omitted the last remote folder will be used as <local-path>.
    2424
    2525This will create a folder orxonox-trunk with the contents of the trunk
     
    3434
    3535=== update (up) ===
    36 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. the syntax is ''svn up <local-path>'', if <local-path> is omitted the current update will be allied to the current directory.
     36update 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.
     37
     38The syntax is ''svn up <local-path>'', if <local-path> is omitted the current update will be allied to the current directory.
    3739
    3840This will update the current folder including subfolders.
     
    4951
    5052=== commit (ci) ===
    51 sometime also called checkin, does the opposite of checkout or update, it upload changes made to the local the to the server. The 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.
     53Sometime also called checkin, does the opposite of checkout or update, it upload changes made to the local the to the server.
     54
     55The 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.
    5256
    5357this will checkin the current directory including subfolders with the comment "initial upload"
     
    5963
    6064=== add ===
    61 adding a new file to the local svn copy, that it get upload with the next commit. the syntax is ''svn add <file>''
     65Adding a new file to the local svn copy, that it get upload with the next commit.
     66
     67The syntax is ''svn add <file>''
    6268
    6369this will add the files myFile.cc and myFile.h in the folder myFolder to the svn
     
    6773
    6874=== remove (rm) ===
    69 also called delete, which deletes an item from the svn tree. please note that this also removed the file/folder from the local harddrive. the syntax is ''svn rm <file/folder>''. you still need to commit it to the server.
     75Also called delete (del), which deletes an item from the svn tree. please note that this also removed the file/folder from the local harddrive.
     76
     77The syntax is ''svn rm <file/folder>''.
    7078
    7179this will remove the file myOldFile.cc from the svn tree
     
    7583
    7684=== move (mv) ===
    77 sometime called rename (ren) - as a rename is the same as a move. The command simplifies the rearranging of files in the svn tree. the syntax is ''svn mv <source files> <target-folder>''
     85Sometime called rename (ren) - as a rename is the same as a move. The command simplifies the rearranging of files in the svn tree.
     86
     87The syntax is ''svn mv <source files> <target-folder>''
    7888
    7989this will move the files myFile.cc and myFile.h to myFolder
     
    8898
    8999=== copy (cp) ===
    90 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.
     100A 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.
    91101
    92 this will create a new branch called test from the current version of the trunk
     102The syntax is ''svn cp <source-tree> <target-tree>'' or ''svn cp <source-files> <target>''
     103
     104This will create a new branch called test from the current version of the trunk
    93105{{{
    94106svn cp https://svn.orxonox.net/orxonox/trunk https://svn.orxonox.net/orxonox/branches/test
     
    96108
    97109=== resolved ===
    98 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.
     110If 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.
    99111
    100 this will resolve the conflict in in myConflictFile.cc, and make the copy committable again.
     112The syntax is ''svn resolved <conflicting file>''
     113
     114This will resolve the conflict in in myConflictFile.cc, and make the copy committable again.
    101115{{{
    102116svn resolved myConflictFile.cc
     
    106120One 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.
    107121
    108 this will discard all local changes made to myFile.cc
     122The syntax is ''svn revert <target>''.
     123
     124This will discard all local changes made to myFile.cc
    109125{{{
    110126svn revert myFile.cc
     
    112128
    113129=== diff (di) ===
    114 another rarely used but very useful command. it shows you 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. the syntax is ''svn di <local-path>'', if <local-path> is omitted, the current directory is assumed.
     130Another 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.
     131
     132The syntax is ''svn di <local-path>'', if <local-path> is omitted, the current directory is assumed.
    115133
    116134this will show - print to the console - the current changes made to the revision