source: trunk/SRC/Documentation/xmldoc/svnbasiccommands.xml @ 408

Last change on this file since 408 was 408, checked in by pinsard, 15 years ago

small things for documentations

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