source: trunk/adm/guides/svnbasiccommands.xml @ 12

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

add matlab startup

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