|Version 5 (modified by hinojosa, 5 years ago)|
What is Mercurial?
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.
- All 1.1.2 features of Mercurial are supported.
- Developer (read/write) access is provided via ssh.
- anonymous (read-only) access are provided via hgweb over HTTP ("http://").
- Several Mercurial clients are supported, including:
- The official Mercurial client (MS Windows, Mac OS X, Linux, BSD).
- The Windows shell extention client, TortoiseHG (MS Windows).
- Repositories may be viewed via web browser using the hgweb.
- Existing repositories may be imported via a normal Mercurial push (since Mercurial is a distributed SCM).
- Repository access may be granted or revoked from a developer using the Project Admin interface.
- The normal set of hook scripts are supported, and may be changed by using adminrepo in our interactive shell service.
- Repository backups and mirroring may be performed using rsync or Mercurial clone.
- Service usage is not restricted by quotas.
- A single repository per project is currently supported.
Mercurial service may be enabled for your project as follows:
- Login as a project administrator and go to the Project Summary page for your project.
- Select the Project Admin menu, and click on "Feature Settings".
- Select "Available Features".
- Select the checkbox to the left of the "Mercurial" heading. Your repository will be instantly enabled.
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.
Details for using this feature can be found via the Shell service. Issue the help command for details:
To access a Mercurial repository, configure your Mercurial client as follows (replace PROJECTNAME with the UNIX group name of the project):
- http://PROJECTNAME.hg.sourceforge.net:8000/hgroot/PROJECTNAME (read-only)
- ssh://USERNAME@PROJECTNAME.hg.sourceforge.net/hgroot/PROJECTNAME (read/write)
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@PROJECTNAME.hg.sourceforge.net/hgroot/PROJECTNAME
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 PROJECTNAME.hg.sourceforge.net::hgroot/PROJECTNAME/* .
Initial draft finished 2009-02-18