

- #MERCURIAL TORTOISEHG TUTORIAL UPDATE#
- #MERCURIAL TORTOISEHG TUTORIAL FULL#
- #MERCURIAL TORTOISEHG TUTORIAL DOWNLOAD#
- #MERCURIAL TORTOISEHG TUTORIAL WINDOWS#
When using commands like " update," it is useful to refer to changesets.
#MERCURIAL TORTOISEHG TUTORIAL FULL#
A full changeset in a local repository can be represented by "revision:changeset". They are mainly provided for convenience and usability. These are local to a repository and have no meaning in other repositories. Mercurial also uses local revision numbers which are sequential IDs. These are represented in hexadecimal (for example, fae5f33a1bb3). Instead, Mercurial uses 160-bit changeset identifiers. This is because sequential IDs may be duplicated across repositories. Unlike Subversion, Mercurial can't use version numbers to uniquely identify a changeset. For more information about this, visit the Mercurial documentation. If you are using SSH with logical paths, you only need one slash. For example:ĭefault-push = ssh:// Mercurial uses double slashes to specify an absolute file-system path. If you are going to be pushing to one main repository fairly often, you may want to set up a default push. You can change that location by opening up \.hg\hgrc and looking at the "" section. Look for a "" section (or add a new one), and configure something like this:īy default, all "pull" operations on a repository occur from the original location you cloned from. To set up your identity, open either your hgrc file (either the main or local one). Many projects (AlliedModders included) use "Firstname Lastname " instead. By default it uses the name of the account your computer is logged in as. Mercurial lets you configure an identity to associate with your changesets. Per-repository configuration is done in \.hg\hgrc. If the file does not exist, you can create it.
#MERCURIAL TORTOISEHG TUTORIAL WINDOWS#
On Windows Vista, it is C:\Users\\Mercurial.ini. On Windows 2003/XP and prior, it is C:\Documents and Settings\\Mercurial.ini. On Linux, the main configuration file is ~/.hgrc. Mercurial lets you configure default settings for all repositories and settings specific to one repository. This will create a blank repository and initialize it with Mercurial. Hg clone sourcemod-central sourcemod-copy You can clone a repository from any location, even locally. You can clone a local or remote repository. To retrieve a repository, you must use the "clone" command.
#MERCURIAL TORTOISEHG TUTORIAL DOWNLOAD#
You can download both the command line tools at the Mercurial Site, and there is a TortoiseHg graphical tool for those who would like to try it. The author of this article uses command line Mercurial (on both Linux and Windows). merge - Merges two repositories together (explained later).push - Pushes your changesets to a remote repository.
#MERCURIAL TORTOISEHG TUTORIAL UPDATE#


For example, AlliedModders has a "sourcemod-central" repository where developers push their changesets. There is no difference between your copy and the master copy - how it is managed is simply a matter of permissions and policy. For some projects it is ideal to have a reference copy. Now for the contradiction: You CAN have a master repository with Mercurial. This means you can make as many commits as you want before pushing. You only need Internet access if want to push changesets to a remote repository. One very noticeable side effect is that when you commit changes in Mercurial, you do not need Internet access. Users can share changesets by pulling from other people's repositories, or pushing to other repositories (which may require special privileges). Unlike Subversion, Mercurial has no concept of a "master repository." Each user owns a complete local copy of the repository, and they can commit to it without needing any permissions. A repository is the sum of all changesets committed over time. When you commit changes, they are wrapped into a changeset. Changes to the source code are made inside the repository and are periodically committed. Mercurial keeps source code in repositories.
