TortoiseHg



  1. Tortoisehg Git
  2. Tortoisehg Tutorial
  3. Tortoisehg Hggit

This chapter describes Mercurial extensions that are shipped withTortoiseHg binary packages for Windows. These external extensions areincluded as a convenience to users, so they can be easily enabled assoon as they are needed.

8.1. Hgfold¶

hgfold is aMercurial extension that helps Windows users deal with filename casecollisions on VFAT and NTFS.

It adds options to the following Mercurial commands. Typehg help <command> for more information:

Tortoisehg Git

The latest version of TortoiseHg for Debian based OS is 4.8.1-0.1 (as per Debian search results). The same version is available in Ubuntu's pool of archives (and can be found by searching on Ubuntu Packages.) and the dependencies can still be satisfied in Eoan Ermine (19.10) without any extra work. This chapter describes Mercurial extensions that are shipped with TortoiseHg binary packages for Windows. These external extensions are included as a convenience to users, so they can be easily enabled as soon as they are needed.

The extension does not currently do anything to prevent filenamecollisions. See discussion on the Mercurial Wiki

Installation

To test the use of this plugin, you can specify it on the Mercurialcommand line like this:

You may want to add it to your Mercurial.ini or a repository’s hgrc like this:

If you do this, you can omit the –config command-line option.

Warnings

Like all merge operations, fold.py has to change the parents of theworking directory. It is still in early testing, so use with caution.

If you get an error about an unknown changeset after runninghg recover tryhg debugsetparents <number of tip revision>.You can find the number of the tip revision by running hg log -l 2.

8.2. Perfarce¶

Perfarce homepage.

This extension is documented in Perfarce (Perforce) section ofUse with other VCS systems chapter.

8.3. Mercurial-Keyring¶

  • Mercurial Keyring home page
  • Keyring Extension wiki page

Keyring extension uses services of the keyring library to securely saveauthentication passwords (HTTP/HTTPS and SMTP) using system specificpassword database (Gnome Keyring, KDE KWallet, OSXKeyChain, dedicatedsolutions for Win32 and command line).

What it does

The extension prompts for the HTTP password on the first pull/pushto/from given remote repository (just like it is done by default), butsaves the password (keyed by the combination of username and remoterepository url) in the password database. On the next run it checks forthe username in .hg/hgrc, then for suitable password in the passworddatabase, and uses those credentials if found.

Similarly, while sending emails via SMTP server which requiresauthorization, it prompts for the password on first use of given server,then saves it in the password database and reuses on successive runs.

In case password turns out incorrect (either because it was invalid, orbecause it was changed on the server) it just prompts the user again.

TortoiseHg

Installation

First, the extension must be enabled in your Mercurial.ini file as:

Tortoisehg

Tortoisehg Tutorial

Password backend configuration

The most appropriate password backend should usually be picked automatically,without configuration. Still, if necessary, it can be configured using~/keyringrc.cfg file (keyringrc.cfg in the home directory ofthe current user).Refer to keyring docsfor more details.

Note

On Windows XP and above, your encrypted passwords are stored in thecredentials subsystem usingCredRead and CredWrite

Note

On Windows 2K, the encrypted passwords are stored in the systemregistry under HKCUSoftwareMercurialKeyring.

Repository configuration (HTTP)

Edit repository-local .hg/hgrc and save there the remote repositorypath and the username, but do not save the password. For example:

Tortoisehg Hggit

Simpler form with url-embedded name can also be used:

Note

TortoiseHg

If both username and password are given in .hg/hgrc, extensionwill use them without using the password database. If username is notgiven, extension will prompt for credentials every time, alsowithout saving the password. So, in both cases, it is effectivelyreverting to the default behaviour.

Consult [auth]section documentation for more details.

Repository configuration (SMTP)

Edit either repository-local .hg/hgrc, or ~/.hgrc (the latteris usually preferable) and set there all standard email and smtp properties,including smtp username, but without smtp password. For example:

Just as in case of HTTP, you must set username, but must not set password hereto use the extension, in other cases it will revert to the default behaviour.

Usage

Configure the repository as above, then just pull and push (or email) Youshould be asked for the password only once (per every username +remote_repository_url combination).

8.4. projrc¶

projrc is an extensionthat makes Mercurial look for and parse .hg/projrc for additionalconfiguration settings.The file is transferred on clone and on pull(but never on push), after confirmation by the user, from a list of serversthat ‘’’must’’’ be configured by the user. For security reasons the user‘’’must’’’ also select which ‘’projrc’’ configuration settings will betransferred (i.e. no settings are transferred from any servers by default).The user can also configure the extension to automatically accept all changesto the .hg/projrc file.

This is useful for centralized setups where you want to distributeconfiguration settings to all repositories with a minimum amount of setup.In particular, it can be used to remap subrepository sources, as explainedon Mercurial’sSubrepoRemappingPlan.

Configuration

This extension (as most other extensions) is disabled by default. To useand configure you must first enable it on the Settings/Extensions panel.

When the extension is enabled you will see a new entry, “Projrc” on thesettings dialog. This let’s you configure the extension by setting thefollowing settings:

Request confirmationIf True (the default) you’ll get a prompt wheneverthe extension detects changes to the remote server’s.hg/projrc file.If false, the extension will automatically accept any change to theremote .hg/projrc file.
Servers
This setting is a comma separated list of glob patterns matchingthe server names of the servers that the projrc file will be pulled from.Unless this setting is set, no .hg/projrc files will be evertransferred from any servers.
Include

This key lets you control which sections and which keys will be acceptedfrom the remote projrc files. This is a a comma separated list of globpatterns that match the section or key names that will be included.Keys names must be specified with their section name followed by a ‘.’followed by the key name (e.g. “’’diff.git’’”).

To allow all sections and all keys you can set this setting to “*”(without the quotes).

Exclude

This setting is similar to the “’’Include’’” setting but it has theopposite effect. It sets an “exclude list” of settings that will notbe transferred from the common projrc files.

The exclude list has the same syntax as the include list. If an exclusionlist is set but the inclusion list is empty or not set all non excludedkeys will be included.

Update on incoming

Control whether the .hg/projrc file will be updated on incoming.It can have the following values:

  • never: The default. Show whether the remote projrc file has changed,but do not update (nor ask to update) the local projrc file.
  • prompt: Look for changes to the projrc file.If there are changes _always_ show a confirmation prompt,asking the user if it wants to update its local projrc file.
  • auto: Look for changes to the projrc file.Use the value of the “’’projrc.confirm’’” configuration key todetermine whether to show a confirmation dialog or notbefore updating the local projrc file.

If False (the default) you’ll get a prompt wheneverthe extension detects changes to the remote server’s.hg/projrc file.If false, the extension will automatically accept any change to theremote .hg/projrc file.

If both an include and an exclude lists are set, and a key matches boththe include and the exclude list, priority is given to the most explicitkey match, in the following order:

  • full key, exact matches are considered the most explicit (e.g.“’’ui.merge’’”);
  • pattern (glob) matches are considered next (e.g.“’’auth.bitbucket.com.*’’”), with the longest matching pattern being themost explicit;
  • section level matches (e.g. “’’ui’’”);
  • global (”’’*’’”) matches.

If a key matches both an include and an exclude (glob) pattern of the samelength, the key is ‘’included’’ (i.e. inclusion takes precedence overexclusion).

Usage

Once enabled and properly configured, the extension will look for.hg/projrc files whenever you clone or pull from one of the repositoriesspecified on its “servers” configuration key.

Whenever the extension detects changes to the remote projrc file (e.g. whenyou do not have a .hg/projrc file yet, or when the contents of said filehave changed on the server), you’ll receive a warning unless you have set the“Require confirmation” setting to False (in which case the extension assumesthat you accept the changes). If you accept the changes your local .hg/projrcfile will be updated, and its settings will be taken into account by mercurialand TortoiseHg.

If a local repository has a .hg/projrc file, you’ll see an extra panelon the setting dialog. The title of the extra panel is “project settings(.hg/projrc)”.

The “project settings” panel is a read-only panel that shows the settings thatare set on the local .hg/projrc file. Although you can update your localversion of the .hg/projrc file, the panel is read only to indicate thatyou cannot change the remote repository’s settings, and that if the remoterepository settings change your local copy will be updated on the next pull(if you allow it).

The “project settings” settings panel is shown between the “global settings” paneland the “repository settings” panel, indicating that its settings are applied_after_ the global settings but _before_ the local repository settings (i.ethe settings specified in the repository .hg/hgrc file).

Additional Information

For the most up to date information regarding this extension, to see severaldetailed usage examples and to learn how to use it and configure it from thecommand line, please go to the extension’sWiki.