1 # JPF Source Repository Access #
3 JPF sources are kept as [Mercurial](http://www.selenic.com/mercurial) repositories within the http://babelfish.arc.nasa.gov/hg/jpf directory. You need to clone the subrepositories (e.g. http://babelfish.arc.nasa.gov/hg/jpf/jpf-core) that you are interested in, **not** the root directory ../hg/jpf itself (which most likely will give you old subrepo revisions).
5 We provide anonymous, public read access. If you want to push your changes back to the repository, and you are not a NASA Ames employee, you need to [obtain a JPF contributor account](wiki:about/account).
7 Mercurial is a [Distributed Version Control System](http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/) (DVCS), like Git. If you are not familiar with this, it means "all repositories are created equal", and you have to read up a bit. The foremost authority is ["Mercurial: The Definite Guide"](http://hgbook.red-bean.com/).
9 For the inpatient, we also provide a short [Mercurial primer](../devel/mercurial).
11 ## Command Line Access ##
13 To check out the jpf-core use the mercurial command `clone`:
18 > hg clone http://babelfish.arc.nasa.gov/hg/jpf/jpf-core
19 destination directory: jpf-core
20 requesting all changes
22 added 71 changesets with 2045 changes to 1694 files
23 updating working directory
24 683 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 The same process can be repeating by substituting `jpf-core` with the [project](../projects/index) you are interested in. You can install the projects wherever you want, but you have to remember where you installed them for the subsequent [site.properties](../install/site-properties) configuration.
29 To update your local repository, change to its directory and do `pull` (don't forget the `-u` option, or your working directories will not get updated)
32 > cd ~/projects/jpf-core
36 If you want - and are allowed - to push back your changes, you use **`https://`**`babelfish.arc.nasa.gov/hg/jpf/<project>` as the URL, which will require entering your user-name and password. Before pushing the changes you have to commit the changes from your working directory to your local repository.
39 > cd ~/projects/jpf-core
40 > hg commit -m "this commits to the local repository"
43 The changes now can be pushed to the central repository using the following command
46 > hg push https://babelfish.arc.nasa.gov/hg/jpf/jpf-core
49 ## Mercurial Support within NetBeans ##
51 There is no need to install any plugins, NetBeans is distributed with Mercurial support.
54 ## Mercurial Plugin for Eclipse ##
56 To work within Eclipse
58 * Download and install the [MercurialEclipse](http://javaforge.com/project/HGE) plugin, which at the time of this writing is available from the update site: http://cbes.javaforge.com/update (the usual Eclipse spiel: **Help** -> **Install New Software...** -> **add site**, enter the update URL above)
60 * In the eclipse menu: **File** -> **Import** -> **Mercurial** -> **Clone repository using Mercurial** -> **Next**
62 * In the repository location, URL, specify http://babelfish.arc.nasa.gov/hg/jpf/jpf-core
64 * Check the box for 'Search for .project files in clone and use them to create projects'
68 The steps listed above will clone the repository in your workspace. Right clicking on the project will show a 'Team' option that allows to perform all the version control operations.