[FIX] support hg version < 1.1 in walk tests ("fncache" requirement not supported)
[obnox/ohloh/ohloh_scm.git] / README
1 = Ohloh SCM
2
3 The Ohloh source control management library
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License Version 2 as
7 published by the Free Software Foundation.
8
9 Ohcount is specifically licensed under GPL v2.0, and no later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 == Overview
20
21 Ohloh SCM is an abstraction layer for source control management systems,
22 allowing an application to interoperate with various SCMs using a
23 single interface.
24
25 It was originally developed at Ohloh, and is used to generate
26 the reports at www.ohloh.net.
27
28 == System Requirements
29
30 Ohloh SCM is developed on Mac OS X 10.5 and Ubuntu 6.06 LTS. Other Linux
31 environments should also work, but your mileage may vary.
32
33 Ohloh SCM does not support Windows.
34
35 Ohloh SCM targets Ruby 1.8.6 and Rake 0.8.1
36
37 Ohloh SCM interfaces with CVSNT, Subversion, Git and Mercurial through the
38 shell.  In order to pass the unit tests, all three systems must be installed
39 and on your path. Ohloh uses the following versions, and other versions are
40 totally unsupported at this time:
41
42 cvsnt 2.5.03
43 svn 1.4.2
44 git 1.6.0.4
45 hg 1.1.2
46
47 If you are using CVS instead of CVSNT, you can potentially try creating
48 a shell alias or symlink mapping 'cvsnt' to 'cvs'.
49
50 == Running
51
52 Ensure that cvsnt, svn, svnadmin, svnsync, git, and hg are all on your path.
53 Then you can run the unit tests:
54
55 $ rake
56
57 You can load the library into your own Ruby application by requiring lib/scm.rb.
58
59 = Functionality
60
61 For each tracked repository, Ohloh uses the SCM library to maintain a private
62 local mirror. The SCM library hides the differences between source control
63 systems. The SCM library manages all required updates to a mirror, and reports
64 the contents of the mirror in standardized ways.
65
66 Each mirror is assigned a dedicated directory, and the SCM library adapter may
67 store any content it desires in that directory. Usually, it's a direct clone of
68 the original repository, but in the case of CVS or some Subversion servers, it
69 is a conversion of the original repository to Git.
70
71 The main Ohloh application orchestrates the scheduling of all updates and
72 backups. On demand, the SCM library adapter then performs the following basic
73 tasks on the local mirror:
74
75 1. Pull changes -- From a remote repository URL, pull any changes to the local
76 mirror. This step may involve conversion from one system to another.
77
78 2. Push changes -- From the local mirror, push any changes to another Ohloh
79 server. This is required to create backup copies and perform load balancing on
80 the Ohloh cluster, and typically occurs over ssh.
81
82 3. Commit log -- Given the last known commit, report the list of new commits,
83 if any, including their diffs.
84
85 4. Cat file or parent -- Given a commit, return either the contents of a
86 single file, or that file's previous contents.
87
88 5. Export tree -- Given a commit, export the entire contents of the source tree
89 to a specified temp directory.
90
91 The adapter must also implement validation routines used to filter user inputs
92 and confirm the presence of the remote server.
93
94 = Contact Ohloh
95
96 For more information visit the Ohloh website:
97    http://labs.ohloh.net
98
99 You can reach Ohloh via email at:
100    info@ohloh.net