[3] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
| 2 | <!DOCTYPE article [ |
---|
| 3 | <!ENTITY % isolat1 SYSTEM "http://www.w3.org/2003/entities/iso8879/isolat1.ent"> |
---|
| 4 | %isolat1; |
---|
| 5 | <!ENTITY % isolat2 SYSTEM "http://www.w3.org/2003/entities/iso8879/isolat2.ent"> |
---|
| 6 | %isolat2; |
---|
| 7 | <!ENTITY % isogrk3 SYSTEM "http://www.w3.org/2003/entities/iso8879/isogrk3.ent"> |
---|
| 8 | %isogrk3; |
---|
| 9 | <!ENTITY % isopub SYSTEM "http://www.w3.org/2003/entities/iso8879/isopub.ent"> |
---|
| 10 | %isopub; |
---|
| 11 | <!ENTITY % isotech SYSTEM "http://www.w3.org/2003/entities/iso8879/isotech.ent"> |
---|
| 12 | %isotech; |
---|
| 13 | <!ENTITY % isonum SYSTEM "http://www.w3.org/2003/entities/iso8879/isonum.ent"> |
---|
| 14 | %isonum; |
---|
| 15 | <!ENTITY project "ircaam"> |
---|
| 16 | ]> |
---|
| 17 | <!-- |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | /usr/home/fplod/incas/ircaam/ircaam_ws/adm/guides/svnbasiccommands.xml sur aedon.locean-ipsl.upmc.fr |
---|
| 21 | |
---|
| 22 | fplod 2008-12-03T17:36:01Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 23 | |
---|
| 24 | XML/DocBook migration of http://forge.ipsl.jussieu.fr/statpacksaxo/wiki/SvnBasicCommands from Sébastien Masson |
---|
| 25 | |
---|
| 26 | --> |
---|
| 27 | <article version="5.0" |
---|
| 28 | xmlns="http://docbook.org/ns/docbook" |
---|
| 29 | xmlns:xl="http://www.w3.org/1999/xlink" |
---|
| 30 | xml:lang="en"> |
---|
| 31 | <title><command>svn</command> basic commands</title> |
---|
| 32 | <info> |
---|
| 33 | <authorgroup> |
---|
| 34 | <author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname> <email>Sebastien.Masson_at_locean-ipsl.upmc.fr</email></author> |
---|
| 35 | </authorgroup> |
---|
| 36 | <pubdate>$Id</pubdate> |
---|
| 37 | </info> |
---|
| 38 | |
---|
| 39 | <sect1 xml:id="help"> |
---|
| 40 | <title><command>svn</command> help</title> |
---|
| 41 | <para> |
---|
| 42 | <screen> |
---|
| 43 | <prompt>$</prompt> <userinput>svn help</userinput> |
---|
| 44 | </screen> |
---|
| 45 | </para> |
---|
| 46 | |
---|
| 47 | <para> |
---|
| 48 | Help on a specific command (for example <command>add</command>): |
---|
| 49 | |
---|
| 50 | <screen> |
---|
| 51 | <prompt>$</prompt> <userinput>svn help add </userinput> |
---|
| 52 | </screen> |
---|
| 53 | </para> |
---|
| 54 | |
---|
| 55 | </sect1> |
---|
| 56 | <sect1 xml:id="download"> |
---|
| 57 | <title>Download &project;</title> |
---|
| 58 | |
---|
| 59 | <para> |
---|
| 60 | To download &project; in the directory <filename class="directory">~/&project;</filename> execute (with the appropriate login) |
---|
| 61 | |
---|
| 62 | <screen> |
---|
| 63 | <prompt>$</prompt> <userinput>svn co svn+ssh://<replaceable>YOUR_LOGIN</replaceable>@forge.ipsl.jussieu.fr/ipsl/forge/projets/&project;/svn/trunk ~/&project;</userinput> |
---|
| 64 | </screen> |
---|
| 65 | </para> |
---|
| 66 | </sect1> |
---|
| 67 | |
---|
| 68 | <sect1 xml:id="update"> |
---|
| 69 | <title>Update &project;</title> |
---|
| 70 | |
---|
| 71 | <para> |
---|
| 72 | To update everything, go to the directory where you installed &project; (for example <filename class="directory">~/&project;</filename>) and execute |
---|
| 73 | |
---|
| 74 | <screen> |
---|
| 75 | <prompt>$</prompt> <userinput>svn update</userinput> |
---|
| 76 | </screen> |
---|
| 77 | </para> |
---|
| 78 | |
---|
| 79 | <para> |
---|
| 80 | You can also specify &project; when calling svn update, for example: |
---|
| 81 | |
---|
| 82 | <screen> |
---|
| 83 | <prompt>$</prompt> <userinput>svn update ~/&project;</userinput> |
---|
| 84 | </screen> |
---|
| 85 | </para> |
---|
| 86 | |
---|
| 87 | <para> |
---|
| 88 | Or you can specify one or several files you want to update |
---|
| 89 | |
---|
| 90 | <screen> |
---|
| 91 | <prompt>$</prompt> <userinput>svn update ~/&project;/src/*.m</userinput> |
---|
| 92 | </screen> |
---|
| 93 | </para> |
---|
| 94 | |
---|
| 95 | </sect1> |
---|
| 96 | <sect1 xml:id="compare"> |
---|
| 97 | <title>Compare your version with the reference deposit</title> |
---|
| 98 | <para> |
---|
| 99 | To compare your version with the reference deposit as it was at the time you download (or updated) &project;, execute: |
---|
| 100 | |
---|
| 101 | <screen> |
---|
| 102 | <prompt>$</prompt> <userinput>svn status</userinput> |
---|
| 103 | </screen> |
---|
| 104 | </para> |
---|
| 105 | |
---|
| 106 | <para> |
---|
| 107 | To compare your version with the latest version of the reference deposit, execute: |
---|
| 108 | |
---|
| 109 | <screen> |
---|
| 110 | <prompt>$</prompt> <userinput>svn status -u</userinput> |
---|
| 111 | </screen> |
---|
| 112 | </para> |
---|
| 113 | |
---|
| 114 | </sect1> |
---|
| 115 | <sect1 xml:id="addfile"> |
---|
| 116 | <title>Add a new file</title> |
---|
| 117 | |
---|
| 118 | <para> |
---|
| 119 | Add a new file to &project; |
---|
| 120 | |
---|
| 121 | <screen> |
---|
| 122 | <prompt>$</prompt> <userinput>svn add <replaceable>file_name</replaceable></userinput> |
---|
| 123 | </screen> |
---|
| 124 | </para> |
---|
| 125 | |
---|
| 126 | <para> |
---|
| 127 | For example, directly |
---|
| 128 | |
---|
| 129 | <screen> |
---|
| 130 | <prompt>$</prompt> <userinput>touch aaa</userinput> <lineannotation>create a <filename>aaa</filename> file</lineannotation> |
---|
| 131 | <prompt>$</prompt> <userinput>ls -l aaa</userinput> |
---|
| 132 | <computeroutput> |
---|
| 133 | -rw-r--r-- 1 smasson lodyc 0 Oct 29 09:59 aaa |
---|
| 134 | </computeroutput> |
---|
| 135 | <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check your deposit, <filename>aaa</filename> file is signaled as unknown</lineannotation> |
---|
| 136 | <computeroutput> |
---|
| 137 | ? aaa |
---|
| 138 | </computeroutput> |
---|
| 139 | <prompt>$</prompt> <userinput>svn add aaa</userinput> <lineannotation>add <filename>aaa</filename> file to the svn deposit</lineannotation> |
---|
| 140 | |
---|
| 141 | <computeroutput> |
---|
| 142 | A aaa |
---|
| 143 | </computeroutput> |
---|
| 144 | <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check that <filename>aaa</filename> has beed add to the deposit</lineannotation> |
---|
| 145 | <computeroutput> |
---|
| 146 | A aaa |
---|
| 147 | </computeroutput> |
---|
| 148 | </screen> |
---|
| 149 | </para> |
---|
| 150 | |
---|
| 151 | </sect1> |
---|
| 152 | <sect1 xml:id="createdir"> |
---|
| 153 | <title>Create a directory file</title> |
---|
| 154 | <para> |
---|
| 155 | <screen> |
---|
| 156 | <prompt>$</prompt> <userinput>svn mkdir <replaceable>directory_name</replaceable></userinput> |
---|
| 157 | </screen> |
---|
| 158 | </para> |
---|
| 159 | |
---|
| 160 | <para> |
---|
| 161 | For example: |
---|
| 162 | |
---|
| 163 | <screen> |
---|
| 164 | <prompt>$</prompt> <userinput>svn mkdir AAA</userinput> <lineannotation>create the directory and add it to the svn deposit in one unique command</lineannotation> |
---|
| 165 | <computeroutput> |
---|
| 166 | A AAA |
---|
| 167 | </computeroutput> |
---|
| 168 | </screen> |
---|
| 169 | </para> |
---|
| 170 | |
---|
| 171 | <para> |
---|
| 172 | or |
---|
| 173 | |
---|
| 174 | <screen> |
---|
| 175 | <prompt>$</prompt> <userinput>mkdir AAA</userinput> <lineannotation>create the directory</lineannotation> |
---|
| 176 | <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check your deposit, <filename class="directory">AAA</filename> is signaled as unknown</lineannotation> |
---|
| 177 | <computeroutput> |
---|
| 178 | ? AAA |
---|
| 179 | </computeroutput> |
---|
| 180 | |
---|
| 181 | <prompt>$</prompt> <userinput>svn add AAA</userinput> <lineannotation>add it to the svn deposit</lineannotation> |
---|
| 182 | <computeroutput> |
---|
| 183 | A AAA |
---|
| 184 | </computeroutput> |
---|
| 185 | </screen> |
---|
| 186 | </para> |
---|
| 187 | |
---|
| 188 | </sect1> |
---|
| 189 | <sect1 xml:id="deletefile"> |
---|
| 190 | <title>Delete an existing file</title> |
---|
| 191 | |
---|
| 192 | <para> |
---|
| 193 | <screen> |
---|
| 194 | <prompt>$</prompt> <userinput>svn rm --force aaa</userinput> <lineannotation>works for file or directory</lineannotation> |
---|
| 195 | </screen> |
---|
| 196 | </para> |
---|
| 197 | |
---|
| 198 | </sect1> |
---|
| 199 | <sect1 xml:id="addversion"> |
---|
| 200 | <title>Add automatic version number in a file</title> |
---|
| 201 | |
---|
| 202 | <para> |
---|
| 203 | Edit you file and add somewhere: |
---|
| 204 | |
---|
| 205 | <programlisting> |
---|
| 206 | $Id$ |
---|
| 207 | </programlisting> |
---|
| 208 | </para> |
---|
| 209 | |
---|
| 210 | <para> |
---|
| 211 | Next execute the following svn command: |
---|
| 212 | |
---|
| 213 | <screen> |
---|
| 214 | <prompt>$</prompt> <userinput>svn propset svn:keywords Id <replaceable>YOUR_FILE_NAME</replaceable></userinput> |
---|
| 215 | </screen> |
---|
| 216 | </para> |
---|
| 217 | |
---|
| 218 | <para> |
---|
| 219 | Next time you download/update you file, <literal>$Id$</literal> will be automatically replaced by the version tag. |
---|
| 220 | </para> |
---|
| 221 | </sect1> |
---|
| 222 | |
---|
| 223 | <sect1 xml:id="commit"> |
---|
| 224 | <title>Commit your changes</title> |
---|
| 225 | |
---|
| 226 | <para> |
---|
| 227 | Commit all your changes with one command |
---|
| 228 | |
---|
| 229 | <screen> |
---|
| 230 | <prompt>$</prompt> <userinput>svn commit --username <replaceable>YOUR_LOGIN</replaceable> --message "A SHORT DESCRIPTION" ~/&project;</userinput> |
---|
| 231 | </screen> |
---|
| 232 | </para> |
---|
| 233 | |
---|
| 234 | <para> |
---|
| 235 | or commit your change on one specific file (for example <filename>~/&project;/src/aaa</filename>) |
---|
| 236 | |
---|
| 237 | <screen> |
---|
| 238 | <prompt>$</prompt> <userinput>svn commit --username <replaceable>YOUR_LOGIN</replaceable> --message "A SHORT DESCRIPTION" ~/&project;/src/aaa</userinput> |
---|
| 239 | </screen> |
---|
| 240 | </para> |
---|
| 241 | |
---|
| 242 | </sect1> |
---|
| 243 | <sect1 xml:id="version"> |
---|
| 244 | <title> More info on your version</title> |
---|
| 245 | <para> |
---|
| 246 | <screen> |
---|
| 247 | <prompt>$</prompt> <userinput>svn info ~/&project;</userinput> |
---|
| 248 | </screen> |
---|
| 249 | </para> |
---|
| 250 | </sect1> |
---|
| 251 | </article> |
---|