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

Last change on this file since 387 was 387, checked in by pinsard, 16 years ago

add svn digest

  • Property svn:keywords set to Id
File size: 6.6 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 co 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
125<para>
126For example, directly
127
128<screen>
129 <prompt>$</prompt> <userinput>touch aaa</userinput> <lineannotation>create a <filename>aaa</filename> file</lineannotation>
130 <prompt>$</prompt> <userinput>ls -l aaa</userinput>
131<computeroutput>
132-rw-r--r-- 1 smasson lodyc 0 Oct 29 09:59 aaa
133</computeroutput>
134 <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check your deposit, <filename>aaa</filename> file is signaled as unknown</lineannotation>
135<computeroutput>
136?      aaa
137</computeroutput>
138 <prompt>$</prompt> <userinput>svn add aaa</userinput> <lineannotation>add <filename>aaa</filename> file to the svn deposit</lineannotation>
139
140<computeroutput>
141A         aaa
142</computeroutput>
143 <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check that <filename>aaa</filename> has beed add to the deposit</lineannotation>
144<computeroutput>
145A      aaa
146</computeroutput>
147</screen>
148</para>
149
150</sect1>
151<sect1 xml:id="createdir">
152<title>Create a directory file</title>
153<para>
154<screen>
155 <prompt>$</prompt> <userinput>svn mkdir <replaceable>directory_name</replaceable></userinput>
156</screen>
157</para>
158
159<para>
160For example:
161
162<screen>
163 <prompt>$</prompt> <userinput>svn mkdir AAA</userinput> <lineannotation>create the directory and add it to the svn deposit in one unique command</lineannotation>
164<computeroutput>
165A         AAA
166</computeroutput>
167</screen>
168</para>
169
170<para>
171or
172
173<screen>
174 <prompt>$</prompt> <userinput>mkdir AAA</userinput> <lineannotation>create the directory</lineannotation>
175 <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check your deposit, <filename class="directory">AAA</filename> is signaled as unknown</lineannotation>
176<computeroutput>
177?      AAA
178</computeroutput>
179
180 <prompt>$</prompt> <userinput>svn add AAA</userinput> <lineannotation>add it to the svn deposit</lineannotation>
181<computeroutput>
182A         AAA
183</computeroutput>
184</screen>
185</para>
186
187</sect1>
188<sect1 xml:id="deletefile">
189<title>Delete an existing file</title>
190
191<para>
192<screen>
193 <prompt>$</prompt> <userinput>svn rm --force aaa</userinput> <lineannotation>works for file or directory</lineannotation>
194</screen>
195</para>
196
197</sect1>
198<sect1 xml:id="addversion">
199<title>Add automatic version number in a file</title>
200
201<para>
202Edit you file and add somewhere:
203
204<programlisting>
205$Id$
206</programlisting>
207</para>
208
209<para>
210Next execute the following svn command:
211
212<screen>
213 <prompt>$</prompt> <userinput>svn propset svn:keywords Id <replaceable>YOUR_FILE_NAME</replaceable></userinput>
214</screen>
215</para>
216
217<para>
218Next time you download/update you file, <literal>$Id$</literal> will be automatically replaced by the version tag.
219</para>
220</sect1>
221
222<sect1 xml:id="commit">
223<title>Commit your changes</title>
224
225<para>
226Commit all your changes with one command
227
228<screen>
229 <prompt>$</prompt> <userinput>svn commit --username <replaceable>YOUR_LOGIN</replaceable> --message "A SHORT DESCRIPTION" ~/&project;</userinput>
230</screen>
231</para>
232
233<para>
234or commit your change on one specific file (for example <filename>~/&project;/SRC/aaa</filename>)
235
236<screen>
237 <prompt>$</prompt> <userinput>svn commit --username <replaceable>YOUR_LOGIN</replaceable> --message "A SHORT DESCRIPTION" ~/&project;/SRC/aaa</userinput>
238</screen>
239</para>
240
241</sect1>
242<sect1 xml:id="version">
243<title> More info on your version</title>
244<para>
245<screen>
246 <prompt>$</prompt> <userinput>svn info ~/&project;</userinput>
247</screen>
248</para>
249</sect1>
250</article>
Note: See TracBrowser for help on using the repository browser.