Project

General

Profile

Overview » History » Version 20

Marc Mengel, 10/14/2009 01:34 PM

1 1 Marc Mengel
h1. Creating Repositories
2 1 Marc Mengel
3 13 Marc Mengel
This site is running a slightly modified version of Redmine, to allow Admin users to select what sort of repository they
4 12 Marc Mengel
want to create. (see "here":http://www.redmine.org/issues/4002 and "here":http://www.redmine.org/issues/4003 for details.) 
5 1 Marc Mengel
6 1 Marc Mengel
Create a project by 
7 1 Marc Mengel
* clicking on the Projects link in the top dark bar of the Redmine page, 
8 1 Marc Mengel
* clicking on "New Project" to create the project
9 1 Marc Mengel
* Filling out the form
10 1 Marc Mengel
* Hitting save
11 1 Marc Mengel
12 1 Marc Mengel
Once you have a project created, 
13 1 Marc Mengel
* pick it from the projects page, and 
14 1 Marc Mengel
* click on the "Settings" tab, then
15 1 Marc Mengel
* click on the "Repository" sub-tab
16 1 Marc Mengel
* Choose a repository type (CVS, Git, Subversion)
17 7 Marc Mengel
* put "create_me" (without quotes) in the first input box   (or "file:///create_me" for Subversion)
18 9 Marc Mengel
* hit Create.
19 1 Marc Mengel
20 9 Marc Mengel
Soon thereafter a cron job will wake up (promptly at :00, :15, :30, or :45 after the hour) 
21 9 Marc Mengel
and make your repository along with a local project account, etc.  When that happens
22 9 Marc Mengel
the location of the repository will be updated, usually to /cvs/projects/your-project-name.
23 9 Marc Mengel
So wait for the 15 minute boundary, and go back to your Settings tab, and pick the
24 10 Marc Mengel
Repository sub-tab, and you should see the repository path has been updated.
25 1 Marc Mengel
26 1 Marc Mengel
Oh, and don't forget to add yourself (and other interested parties) as members
27 9 Marc Mengel
of the project in the Settings/Members tab.  This also will take effect at :00, :15, :30 or :45 
28 9 Marc Mengel
after the hour.
29 1 Marc Mengel
30 20 Marc Mengel
h1. Read/Write access to the repositories
31 20 Marc Mengel
32 19 Marc Mengel
Then to push existing code into the repository:
33 19 Marc Mengel
* Git: from a local repository, do:
34 17 Marc Mengel
> git push --all --force  ssh://p-project-name@cdcvs4.fnal.gov/cvs/projects/project-name
35 4 Marc Mengel
* Subversion: with a skeleton directory do
36 15 Marc Mengel
> svn import directory ssh://p-project-name@cdcvs4.fnal.gov/cvs/projects/project-name
37 1 Marc Mengel
* CVS: with directory of files do
38 1 Marc Mengel
> cd directory; cvs -d :ext:p-project-name@cdcvs4.fnal.gov/cvs projects/project-name import modulename tag1 tag2
39 1 Marc Mengel
Where "project-name" above is replaced by your project's internal name you set when you created it.
40 1 Marc Mengel
Note the account name part is "p-" in front of your project name.
41 19 Marc Mengel
42 19 Marc Mengel
If you want to start from an empty repository:
43 19 Marc Mengel
* Git: 
44 19 Marc Mengel
> git clone   ssh://p-project-name@cdcvs4.fnal.gov/cvs/projects/project-name
45 19 Marc Mengel
* Subversion: 
46 19 Marc Mengel
> svn checkout ssh://p-project-name@cdcvs4.fnal.gov/cvs/projects/project-name/trunk
47 19 Marc Mengel
* CVS: with directory of files do
48 19 Marc Mengel
> mkdir empty; cd empty ; cvs -d :ext:p-project-name@cdcvs4.fnal.gov/cvs projects/project-name import modulename tag1 tag2
49 19 Marc Mengel
> cd ..; cvs -d :ext:p-project-name@cdcvs4.fnal.gov/cvs projects/project-name checkout modulename.
50 19 Marc Mengel
Where "project-name" above is replaced by your project's internal name you set when you created it.
51 19 Marc Mengel
Note the account name part is "p-" in front of your project name.
52 19 Marc Mengel
53 15 Marc Mengel
54 2 Marc Mengel
55 1 Marc Mengel
Then you can use ssh to access your repository, and if you add
56 9 Marc Mengel
members to the projectin the Settings/Members tab, they will be added to the .k5login for the
57 9 Marc Mengel
account.  This also will take effect at :00, :15, :30 or :45  after the hour.
58 1 Marc Mengel
59 20 Marc Mengel
h1. Public access to repositories
60 20 Marc Mengel
61 4 Marc Mengel
If your project is "public" in redmine, it should also be available (readonly) as
62 4 Marc Mengel
* http://cdcvs4.fnal.gov/projects/project-name for Git or
63 4 Marc Mengel
* http://cdcvs4.fnal.gov/subversion/project-name for Subversion or
64 4 Marc Mengel
* :pserver://anonymous@cdcvs4.fnal.gov/cvs/project/project-name for CVS (by request)
65 20 Marc Mengel
66 20 Marc Mengel
Once we go production, this will use "cdcvs" instead of "cdcvs4", and be visible offsite.