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" |
---|
31 | xmlns="http://docbook.org/ns/docbook" |
---|
32 | xmlns:xl="http://www.w3.org/1999/xlink" |
---|
33 | xml: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> |
---|
51 | Help 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> |
---|
63 | To 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> |
---|
75 | To 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> |
---|
83 | You 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> |
---|
91 | Or 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> |
---|
102 | To 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> |
---|
110 | To 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> |
---|
122 | Add 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> |
---|
130 | If <replaceable>file_name</replaceable> is not in the working space (here ~/&project;), you must copy it. |
---|
131 | For example : |
---|
132 | <screen> |
---|
133 | <prompt>$</prompt> <userinput>cp -p <replaceable>another_directory</replaceable |
---|
134 | > ~/&project;/</userinput> |
---|
135 | </screen> |
---|
136 | </para> |
---|
137 | |
---|
138 | <para> |
---|
139 | For example, directly |
---|
140 | |
---|
141 | <screen> |
---|
142 | <prompt>$</prompt> <userinput>touch aaa</userinput> <lineannotation>create a <filename>aaa</filename> file</lineannotation> |
---|
143 | <prompt>$</prompt> <userinput>ls -l aaa</userinput> |
---|
144 | <computeroutput> |
---|
145 | -rw-r--r-- 1 smasson lodyc 0 Oct 29 09:59 aaa |
---|
146 | </computeroutput> |
---|
147 | <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check your deposit, <filename>aaa</filename> file is signaled as unknown</lineannotation> |
---|
148 | <computeroutput> |
---|
149 | ? aaa |
---|
150 | </computeroutput> |
---|
151 | <prompt>$</prompt> <userinput>svn add aaa</userinput> <lineannotation>add <filename>aaa</filename> file to the svn deposit</lineannotation> |
---|
152 | |
---|
153 | <computeroutput> |
---|
154 | A aaa |
---|
155 | </computeroutput> |
---|
156 | <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check that <filename>aaa</filename> has been add to the deposit</lineannotation> |
---|
157 | <computeroutput> |
---|
158 | A aaa |
---|
159 | </computeroutput> |
---|
160 | </screen> |
---|
161 | </para> |
---|
162 | |
---|
163 | </sect1> |
---|
164 | <sect1 xml:id="createdir"> |
---|
165 | <title>Create a directory file</title> |
---|
166 | <para> |
---|
167 | <screen> |
---|
168 | <prompt>$</prompt> <userinput>svn mkdir <replaceable>directory_name</replaceable></userinput> |
---|
169 | </screen> |
---|
170 | </para> |
---|
171 | |
---|
172 | <para> |
---|
173 | For example: |
---|
174 | |
---|
175 | <screen> |
---|
176 | <prompt>$</prompt> <userinput>svn mkdir AAA</userinput> <lineannotation>create the directory and add it to the svn deposit in one unique command</lineannotation> |
---|
177 | <computeroutput> |
---|
178 | A AAA |
---|
179 | </computeroutput> |
---|
180 | </screen> |
---|
181 | </para> |
---|
182 | |
---|
183 | <para> |
---|
184 | or |
---|
185 | |
---|
186 | <screen> |
---|
187 | <prompt>$</prompt> <userinput>mkdir AAA</userinput> <lineannotation>create the directory</lineannotation> |
---|
188 | <prompt>$</prompt> <userinput>svn status</userinput> <lineannotation>check your deposit, <filename class="directory">AAA</filename> is signaled as unknown</lineannotation> |
---|
189 | <computeroutput> |
---|
190 | ? AAA |
---|
191 | </computeroutput> |
---|
192 | |
---|
193 | <prompt>$</prompt> <userinput>svn add AAA</userinput> <lineannotation>add it to the svn deposit</lineannotation> |
---|
194 | <computeroutput> |
---|
195 | A AAA |
---|
196 | </computeroutput> |
---|
197 | </screen> |
---|
198 | </para> |
---|
199 | |
---|
200 | </sect1> |
---|
201 | <sect1 xml:id="deletefile"> |
---|
202 | <title>Delete an existing file</title> |
---|
203 | |
---|
204 | <para> |
---|
205 | <screen> |
---|
206 | <prompt>$</prompt> <userinput>svn rm --force aaa</userinput> <lineannotation>works for file or directory</lineannotation> |
---|
207 | </screen> |
---|
208 | </para> |
---|
209 | |
---|
210 | </sect1> |
---|
211 | <sect1 xml:id="addversion"> |
---|
212 | <title>Add automatic version number in a file</title> |
---|
213 | |
---|
214 | <para> |
---|
215 | Edit you file and add somewhere: |
---|
216 | |
---|
217 | <programlisting> |
---|
218 | $Id$ |
---|
219 | </programlisting> |
---|
220 | </para> |
---|
221 | |
---|
222 | <para> |
---|
223 | Next execute the following svn command: |
---|
224 | |
---|
225 | <screen> |
---|
226 | <prompt>$</prompt> <userinput>svn propset svn:keywords Id <replaceable>YOUR_FILE_NAME</replaceable></userinput> |
---|
227 | </screen> |
---|
228 | </para> |
---|
229 | |
---|
230 | <para> |
---|
231 | Next time you download/update you file, <literal>$Id$</literal> will be automatically replaced by the version tag. |
---|
232 | </para> |
---|
233 | </sect1> |
---|
234 | |
---|
235 | <sect1 xml:id="commit"> |
---|
236 | <title>Commit your changes</title> |
---|
237 | |
---|
238 | <para> |
---|
239 | Commit all your changes with one command |
---|
240 | |
---|
241 | <screen> |
---|
242 | <prompt>$</prompt> <userinput>svn commit --username <replaceable>YOUR_LOGIN</replaceable> --message "A SHORT DESCRIPTION" ~/&project;</userinput> |
---|
243 | </screen> |
---|
244 | </para> |
---|
245 | |
---|
246 | <para> |
---|
247 | or commit your change on one specific file (for example <filename>~/&project;/src/aaa</filename>) |
---|
248 | |
---|
249 | <screen> |
---|
250 | <prompt>$</prompt> <userinput>svn commit --username <replaceable>YOUR_LOGIN</replaceable> --message "A SHORT DESCRIPTION" ~/&project;/src/aaa</userinput> |
---|
251 | </screen> |
---|
252 | </para> |
---|
253 | |
---|
254 | </sect1> |
---|
255 | <sect1 xml:id="version"> |
---|
256 | <title> More info on your version</title> |
---|
257 | <para> |
---|
258 | <screen> |
---|
259 | <prompt>$</prompt> <userinput>svn info ~/&project;</userinput> |
---|
260 | </screen> |
---|
261 | </para> |
---|
262 | </sect1> |
---|
263 | </article> |
---|