Project

General

Profile

UsingRepositories » History » Version 31

Brian Nord, 04/08/2013 04:57 PM

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