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

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

add journals thanks to REGYNA project

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