Mercurial (hg) is a Source Code Management (SCM), a tool for software developers which supports collaborative development of software within a team, and the tracking of changes to software source code over time.
Mercurial is used by developers, and advanced users who need the very latest changes to the software (before releases occur). Software users generally do not need Mercurial; typically they will download official file releases made available by the project instead.
Developers should familiarize themselves with Mercurial by reading the Mercurial Documentation.
Here's a nice writeup of why you should consider using a Distributed Version Control System (DVCS), and a comparison of the major DVCSs: http://www.infoq.com/articles/dvcs-guide
SourceForge.net provides the following features in its Mercurial offering:
Login as a project administrator and click on the Admin icon in the navigation bar.
* Click on Tools.
* Click on Mercurial.
* Select a name for the label (this will determine the title of the link in the project navigation)
* Select a mountpoint (this will affect the URL for your repository)
Those instructions may be repeated using a different label and mountpoint to create multiple repositories.
Once Mercurial has been enabled, you may wish to adjust permission grants for your users, if you need to disable one or more user's ability to make changes in the Mercurial repository.
The standard way to modify the contents of your repository is using a Mercurial client as detailed in Distributed revision control with Mercurial. Refer to the Getting Started section for how to make your first commit to your new repository.
Administrators may also manually manipulate their repository via the site interactive shell service.
We strongly recommend that when modifying a repository, other committers be notified of the direct edit window and that you make your own backups prior to editing the content so you can restore it readily yourself in the case of an accident.
We provide read/write access to Git via ssh or https. ssh will provide better performance than https, and should be used whenever possible.
To access a Git repository, configure your Git client as follows (replace PROJECTNAME with the UNIX group name of the project, and the default MOUNTPOINT is "code"):
ssh://USERNAME@hg.code.sf.net/p/PROJECTNAME/MOUNTPOINT (read/write)
If ssh does not work for you, you may use https instead, however, access will be slower:
https://USERNAME@hg.code.sf.net/p/PROJECTNAME/MOUNTPOINT (read/write)
The read/write protocols detailed above can also be used for read-only access (just remove the "USERNAME@" portion). In addition, you may also use the http protocols with the same URLs.
For example:
http://hg.code.sf.net/p/PROJECTNAME/MOUNTPOINT/
The read-only access does not prompt for a password.
The read/write access uses your ssh password or ssh key to authorize your access. To perform write operations, your project administrator must have granted you write access to the repository.
Note: - For all examples below, "PROJECTNAME" represents a SourceForge.net project UNIX name and "USERNAME" represents your SourceForge.net user account.
Your project's Mercurial repository will be completely empty at the start, but since Mercurial allows you to clone a repository with no content, you can do a clone to get started:
$ hg clone ssh://USERNAME@hg.code.net/p/PROJECTNAME/MOUNTPOINT
That will create a PROJECTNAME directory with the hgrepository inside the .hg subdirectory. If you're starting fresh, use whatever combination of "hg add" and "hg commit" commands you want to create one or more commits in your local repository. When you are ready, run "hg push" to push your commits to our server.
Users should commit to their project repository using their SourceForge.net username or email address (USERNAME@users.sourceforge.net). Several methods are supported for configuring this, please refer to the Mercurial Documentation for the supported methods.
SourceForge.net performs routine backups for all of our servers and will restore from these backups in the event of catastrophic server failure. We encourage projects to make their own backups of Mercurial data as that data restore can be performed by the project in the event of accidental data destruction by a member of the project team.
Backups of a Mercurial repository may be made using rsync.
Example (replace PROJECTNAME with the UNIX group name of your project):
$ rsync -av hg.code.sf.net::p/PROJECTNAME/MOUNTPOINT .