Project

General

Profile

UsingRepositories » History » Version 27

Laurenz Gamper, 01/29/2013 05:13 AM

1 7 Brian Nord
h1. SVN
2 7 Brian Nord
3 22 Laurenz Gamper
* [[UsingRepositories#svn_access|SVN Access]]
4 23 Laurenz Gamper
* [[UsingRepositories#svn_intro|SVN Introduction]]
5 23 Laurenz Gamper
* [[UsingRepositories#svn_checkout|SVN Checkout]]
6 23 Laurenz Gamper
* [[UsingRepositories#run_pipeline|Running the pipeline]]
7 20 Laurenz Gamper
8 20 Laurenz Gamper
9 23 Laurenz Gamper
10 20 Laurenz Gamper
h1(#svn_access). SVN Access
11 20 Laurenz Gamper
12 7 Brian Nord
To Access the DESpec SVN, you need:
13 7 Brian Nord
* a services account
14 7 Brian Nord
* to be a member of the subprojects of DESpec
15 7 Brian Nord
* a kerberos ticket
16 7 Brian Nord
* a svn client
17 7 Brian Nord
18 7 Brian Nord
h2. Recommended SVN Clients
19 7 Brian Nord
20 7 Brian Nord
* Windows: TortoiseSVN http://tortoisesvn.tigris.org/
21 7 Brian Nord
* Mac: Versions http://versionsapp.com/
22 7 Brian Nord
* command line
23 7 Brian Nord
24 7 Brian Nord
25 7 Brian Nord
h2. Services Account at Fermilab
26 7 Brian Nord
27 7 Brian Nord
How to get a services account:
28 7 Brian Nord
https://cdcvs.fnal.gov/redmine/projects/despec/wiki/DESpecwikiAccess
29 7 Brian Nord
30 7 Brian Nord
h2. Member of the Subprojects
31 7 Brian Nord
32 10 Laurenz Gamper
If you would like to have write access, email Brian or Laurenz, so we can add you to the DESpec project. If you don't need write access, look at the section Anonymous SVN.
33 7 Brian Nord
34 7 Brian Nord
h2. Kerberos
35 7 Brian Nord
36 14 Laurenz Gamper
h3. How to set up kerberos
37 14 Laurenz Gamper
38 14 Laurenz Gamper
<pre>
39 14 Laurenz Gamper
$ mv /etc/krb5.conf /etc/krb5.conf.bak
40 14 Laurenz Gamper
$ cd /etc
41 14 Laurenz Gamper
$ wget http://security.fnal.gov/krb5.conf
42 14 Laurenz Gamper
$ echo "host cdcvs.fnal.gov
43 14 Laurenz Gamper
   ForwardX11 = no
44 14 Laurenz Gamper
   GSSAPIAuthentication yes
45 14 Laurenz Gamper
   GSSAPIDelegateCredentials yes" >> ~/.ssh/config
46 14 Laurenz Gamper
$ kinit -f your-fnal-username
47 14 Laurenz Gamper
$ klist
48 14 Laurenz Gamper
</pre>
49 14 Laurenz Gamper
50 14 Laurenz Gamper
The final klist should show your kerberos ticket and the svn can be checked out now using the svn checkout command below.
51 14 Laurenz Gamper
52 15 Laurenz Gamper
53 15 Laurenz Gamper
h3. Links with further documentation
54 13 Laurenz Gamper
55 1 Brian Nord
http://www.fnal.gov/docs/strongauth/macadmin.html#55292
56 7 Brian Nord
http://kb.mit.edu/confluence/display/istcontrib/Acquiring+Kerberos+Tickets+in+Mac+OS+X+10.7+(Lion)+or+OS+X+10.8+(Mountain+Lion)
57 16 Laurenz Gamper
http://fermilinux.fnal.gov/documentation/security/kerberos-newer-linux/
58 1 Brian Nord
59 25 Laurenz Gamper
h1(#svn_intro). SVN Introduction
60 16 Laurenz Gamper
61 1 Brian Nord
http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html
62 16 Laurenz Gamper
63 25 Laurenz Gamper
h2. Adding a File
64 1 Brian Nord
65 25 Laurenz Gamper
Adding a file does not commit the file, use commit to upload the file.
66 25 Laurenz Gamper
<pre>
67 25 Laurenz Gamper
svn add your-file
68 25 Laurenz Gamper
</pre>
69 25 Laurenz Gamper
70 25 Laurenz Gamper
h2. Commit
71 25 Laurenz Gamper
72 20 Laurenz Gamper
One need not supply a URL for commit.  SVN automatically contacts external server
73 1 Brian Nord
<pre>
74 1 Brian Nord
svn commit -m "your message"  
75 1 Brian Nord
</pre>
76 25 Laurenz Gamper
77 25 Laurenz Gamper
h2. SVN Checking your changes
78 25 Laurenz Gamper
79 25 Laurenz Gamper
This presents a summary of the changes.
80 25 Laurenz Gamper
<pre>
81 25 Laurenz Gamper
svn status
82 25 Laurenz Gamper
</pre>
83 25 Laurenz Gamper
84 25 Laurenz Gamper
Which outputs something like
85 25 Laurenz Gamper
<pre>
86 27 Laurenz Gamper
$:~/src/despec/trunk/Wrapper$ svn status
87 25 Laurenz Gamper
M       run_pipeline.py
88 25 Laurenz Gamper
A       lsprofcalltree.py
89 25 Laurenz Gamper
C       glue.ini
90 25 Laurenz Gamper
?       glue.mine.ini
91 25 Laurenz Gamper
</pre>
92 25 Laurenz Gamper
93 25 Laurenz Gamper
You see the filenames and the flags at the beginning of the line. The flags mean:
94 25 Laurenz Gamper
<pre>
95 25 Laurenz Gamper
? item
96 25 Laurenz Gamper
The file, directory, or symbolic link item is not under version control.
97 25 Laurenz Gamper
98 25 Laurenz Gamper
A item
99 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for addition into the repository.
100 25 Laurenz Gamper
101 25 Laurenz Gamper
C item
102 25 Laurenz Gamper
The file item is in a state of conflict. That is, changes received from the server during an update overlap with local changes that you have in your working copy (and weren't resolved during the update). You must resolve this conflict before committing your changes to the repository.
103 25 Laurenz Gamper
104 25 Laurenz Gamper
D item
105 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for deletion from the repository.
106 25 Laurenz Gamper
107 25 Laurenz Gamper
M item
108 25 Laurenz Gamper
The contents of the file item have been modified.
109 20 Laurenz Gamper
</pre>
110 20 Laurenz Gamper
111 23 Laurenz Gamper
h1(#svn_checkout). SVN Checkout
112 20 Laurenz Gamper
113 17 Laurenz Gamper
h3. Source Code
114 18 Laurenz Gamper
115 17 Laurenz Gamper
<pre>
116 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/trunk despec
117 17 Laurenz Gamper
</pre>
118 17 Laurenz Gamper
119 19 Laurenz Gamper
h3. Data
120 17 Laurenz Gamper
121 17 Laurenz Gamper
<pre>
122 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/data data
123 17 Laurenz Gamper
</pre>
124 1 Brian Nord
125 10 Laurenz Gamper
h3. Paper
126 1 Brian Nord
127 1 Brian Nord
<pre>
128 1 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/paper paper
129 9 Brian Nord
</pre>
130 1 Brian Nord
131 1 Brian Nord
132 1 Brian Nord
This will create a directory called despec containing a checkout the complete pipeline.
133 1 Brian Nord
134 1 Brian Nord
h1. Anonymous SVN
135 1 Brian Nord
136 1 Brian Nord
<pre>
137 12 Laurenz Gamper
svn export http://cdcvs.fnal.gov/subversion/simulation_pipeline-main/trunk/ despec
138 1 Brian Nord
</pre>
139 1 Brian Nord
140 23 Laurenz Gamper
h1{#run_code}. Run the Code
141 1 Brian Nord
142 24 Laurenz Gamper
[[Glue|Description of the glue code]]
143 24 Laurenz Gamper
144 1 Brian Nord
Instructions on how to run the pipeline: [[Run_Pipeline]]
145 8 Brian Nord
146 8 Brian Nord
147 8 Brian Nord
h2. Creating a sub-project repository
148 8 Brian Nord
149 8 Brian Nord
* Creating a Repository in a Sub-Project: see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/CreatingRepositories
150 8 Brian Nord
* setting up a repository on your local machine (which will then be pushed/pulled to/from the FRedmine (FNAL Redmine) repository you created:
151 8 Brian Nord
152 8 Brian Nord
h3. Example-ish
153 8 Brian Nord
154 8 Brian Nord
* If you have a project "fred" and a "main" repository with no identifier
155 8 Brian Nord
you get put in
156 8 Brian Nord
** /cvs/projects/fred
157 8 Brian Nord
* if you have a project fred and a repository identifier of "joe" you get
158 8 Brian Nord
** /cvs/projects/fred-joe
159 8 Brian Nord
160 8 Brian Nord
* So you can do give them all identifiers, or have one (main) one without;
161 8 Brian Nord
or you can give the Main one an identifier...
162 8 Brian Nord
163 8 Brian Nord
* If there is no "Main" repository, the Repository tab doesn't show up,
164 8 Brian Nord
apparently.
165 8 Brian Nord
166 8 Brian Nord
&nbsp; &nbsp; &nbsp;
167 8 Brian Nord
Also see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/Subversion for Subversion