Where is .hgrc




















Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Is it possible to refer to an external. Ask Question. Asked 10 years, 11 months ago.

Active 9 years, 10 months ago. Viewed times. Improve this question. Martin Geisler 1, 9 9 silver badges 23 23 bronze badges. Joshua Enfield Joshua Enfield 3, 8 8 gold badges 39 39 silver badges 57 57 bronze badges. Add a comment. Active Oldest Votes. You could place one in the root of your home directory. Improve this answer. Overriding a site-wide hook can be done by changing its value or setting it to an empty string.

Hooks can be prioritized by adding a prefix of priority. The default priority is 0. Most hooks are run with environment variables set that give useful additional information. They contain the type of hook which triggered the run and the full name of the hook in the config, respectively. It is generally better to use standard hooks rather than the generic pre- and post- command hooks, as they are guaranteed to be called in the appropriate contexts for influencing transactions.

Also, hooks like "commit" will be called in all contexts that generate a commit e. Environment variables with empty values may not be passed to hooks on platforms such as Windows. Python hooks are run within the Mercurial process. Each hook is called with at least three keyword arguments: a ui object keyword ui , a repository object keyword repo , and a hooktype keyword that tells what kind of hook is used.

If a Python hook returns a "true" value or raises an exception, this is treated as a failure. Use [hostsecurity] 's fingerprints options instead. A HTTPS connection to a server with a fingerprint configured here will only succeed if the servers certificate matches the fingerprint. This is very similar to how ssh known hosts works. Multiple values can be specified separated by spaces or commas. This can be used to define both old and new fingerprints while a host transitions to a new certificate.

This setting is for advanced users only. Setting to incorrect values can significantly lower connection security or decrease performance. You have been warned. Allowed values are: tls1. When running on an old Python version, only tls1. When running a Python that supports modern TLS versions, the default is tls1. However, this weakens security and should only be used as a feature of last resort if a server does not support TLS 1.

Options in the [hostsecurity] section can have the form hostname : setting. This allows multiple settings to be defined on a per-host basis. Values have the form algorithm : fingerprint. In addition, colons : can appear in the fingerprint part. Use of sha or sha is preferred. If a fingerprint is specified, the CA chain is not validated for this host and Mercurial will require the remote certificate to match one of the fingerprints specified.

This means if the server updates its certificate, Mercurial will abort until a new fingerprint is defined. This can provide stronger security than traditional CA-based validation at the expense of convenience. This option takes precedence over verifycertsfile. Path to file a containing a list of PEM encoded certificates used to verify the server certificate. The server certificate or the certificate's certificate authority CA must match a certificate from this file or certificate verification will fail and connections to the server will be refused.

If defined, only certificates provided by this file will be used: web. This option has no effect if the per-host fingerprints option is set. To change the default minimum protocol version to TLS 1. This section specifies merge tools to associate with particular file patterns. Tools matched here will take precedence over the default merge tool. Patterns are globs by default, rooted at the repository root.

This section configures external merge tools to use for file-level merges. This section has likely been preconfigured at install time. Use hg config merge-tools to check the existing configuration. Also see hg help merge-tools for more details. Setting used to control when to paginate and with what external tool.

See hg help pager for details. If neither pager. Settings used when applying patches, for instance through the 'import' command or with Mercurial Queues extension. Options are symbolic names defining the URL or directory that is the location of the repository. These symbolic names can be used from the command line. Options containing colons : denote sub-options that can influence behavior for that specific path.

When hg push is executed without a -r argument, the revset defined by this sub-option is evaluated to determine what to push.

For example, a value of. Specifies default handling of phases. See hg help phases for more information about working with phases. Specifies profiling type, format, and file output.

Two profilers are supported: an instrumenting profiler named ls , and a sampling profiler named stat. In this section description, 'profiling data' stands for the raw data collected during profiling, while 'profiling report' stands for a statistical text report generated from the profiling data. The profiling is done using lsprof. This is equivalent to passing --profile on the command line.

Profiling format. Specific to the ls instrumenting profiler. Profiling format for the stat profiler. Minimum fraction of samples an entry must have for it to be displayed. Can be specified as a float between 0. For the hotpath format, default is 0. For the chrome format, default is 0. Maximum fraction of samples an entry can have before it is ignored in display. Values format is the same as showmin. Mercurial commands can draw progress bars that are as informative as possible. Some progress bars only offer indeterminate information, while others have a definite end point.

Valid entries for the format field are topic , bar , number , unit , estimate , speed , and item. Alias definitions for revsets.

See hg help revsets for details. The order of compression engines determines their priority, the first having the highest priority. If a compression engine is not listed here, it won't be advertised to clients. If not set the default , built-in defaults are used.

Run hg debuginstall to list available compression engines and their default wire protocol priority. Older Mercurial clients only support zlib compression and this setting has no effect for legacy clients. This requires compatible client version 4. Old client will use 'strict'. Like bundle1. Large repositories using the generaldelta storage format should consider setting this option because converting generaldelta repositories to the exchange format required by the bundle1 data format can consume a lot of CPU.

Integer between -1 and 9 that controls the zlib compression level for wire protocol commands that send zlib compressed output notably the commands that send repository history data. The default -1 uses the default zlib compression level, which is likely equivalent to 6.

Setting this option allows server operators to make trade-offs between bandwidth and CPU used. Lowering the compression lowers CPU utilization but sends more bytes to clients.

Integer between 1 and 22 that controls the zstd compression level for wire protocol commands. The default 3 should be significantly faster than zlib while likely delivering better compression ratios. Subrepository source URLs can go stale if a remote server changes name or becomes temporarily unavailable. This section lets you define rewrite rules of the form:. Groups can be matched in pattern and referenced in replacements. For instance:. Relative subrepository paths are first made absolute, and the rewrite rules are then applied on the full absolute path.

If pattern doesn't match the full path, an attempt is made to apply it on the relative path alone. The rules are applied in definition order. This section contains options that control the behavior of the subrepositories feature. See also hg help subrepos. Security note: auditing in Mercurial is known to be insufficient to prevent clone-time code execution with carefully constructed Git subrepos.

It is unknown if a similar detect is present in Subversion subrepos. Both Git and Subversion subrepos are disabled by default out of security concerns. These subrepo types can be enabled using the respective options below. When false, commands involving subrepositories like hg update will fail for all subrepository types.

Whether Git subrepositories are allowed in the working directory. This option only has an effect if subrepos. Whether Subversion subrepositories are allowed in the working directory. Alias definitions for templates. See hg help templates for details. Use the [templates] section to define template strings. Mercurial will not use the settings in the. This issue is often encountered when configuring hooks or extensions for shared repositories or servers.

However, the web interface will use some safe settings from the [web] section. This section specifies what users and groups are trusted. The current user is always trusted. When enabled, hg clone may download and apply a server-advertised bundle file from a URL instead of using the normal exchange mechanism. Whether failure to apply an advertised "clone bundle" from a server should result in fallback to a regular clone. This is disabled by default because servers advertising "clone bundles" often do so to reduce server load.

If advertised bundles start mass failing and clients automatically fall back to a regular clone, this would add significant and unexpected load to the server since the server is expecting clone operations to be offloaded to pre-generated bundles.

Failing fast the default behavior ensures clients don't overwhelm the server when "clone bundle" application fails. Servers advertising "clone bundles" may advertise multiple available bundles.

Each bundle may have different attributes, such as the bundle type and compression format. This option is used to prefer a particular bundle over another. The template used to print the commit description next to each conflict marker during merge conflicts. See hg help templates for the template format. Defaults to showing the hash, tags, branches, bookmarks, author, and the first line of the commit description.

If the encoding of the merge markers is different from the encoding of the merged files, serious problems may occur. An optional external tool that hg import and some extensions will use for applying patches. By default Mercurial uses an internal patch utility. The external tool must work as the common Unix patch program. In particular, it must accept a -p argument to strip patch headers, a -d argument to specify the current directory, a file name to patch, and a patch file to take from stdin.

It is possible to specify a patch tool together with extra arguments. For example, setting this option to patch --merge will use the patch program with its 2-way merge option. Check for portable filenames. Can be warn , ignore or abort. The committer of a changeset created when running "commit". Typically a person's name and email address, e. Environment variables in the username are expanded. If the username in hgrc is empty, e. Web interface configuration. The settings in this section apply to both the builtin webserver started by hg serve and the script you run through a webserver hgweb.

The Mercurial webserver does no authentication it does not prompt for usernames and passwords to validate who users are , but it does do authorization it grants or denies access for authenticated users based on settings in this section. You must either configure your webserver to do authentication for you, or disable the authorization checks. For a quick setup in a trusted environment, e. Note that this will allow anybody to push anything to the server and that this should not be used for public servers.

Path to file containing a list of PEM encoded certificate authority certificates. If specified on the client, then it will verify the identity of remote HTTPS servers with these certificates.

To disable SSL verification temporarily, specify --insecure from command line. Otherwise you will have to generate this file manually.

The form must be as follows:. Number of lines of context to show in side-by-side file comparison. If negative or the value full , whole files are shown. This setting can be overridden by a context request parameter to the comparison command, taking the same values.

Note: lots of HTML content sent by the server is derived from repository data. Please consider the potential for malicious repository data to "inject" itself into generated HTML content as part of your security threat model. Labels are exposed as a template keyword and can be used to customize output. How frequently directory listings re-scan the filesystem for new repositories, in seconds.

This is relevant when wildcards are used to define paths. See hg help config. Where multiple paths are given below, settings from earlier paths override later ones. This file is not version-controlled, and will not get transferred during a "clone" operation. Options in this file override options in all other configuration files. On Plan 9 and Unix, most of this file will be ignored if it doesn't belong to a trusted user or to a trusted group.

Per-user configuration file s are for the user running Mercurial. Options in these files apply to all Mercurial commands executed by this user in any directory. Options in these files override per-system and per-installation options.

Per-installation configuration files are searched for in the directory where Mercurial is installed. Options in these files apply to all Mercurial commands executed by any user in any directory. Per-installation configuration files are for the system on which Mercurial is running.

Mercurial checks each of these locations in the specified order until one or more configuration files are detected. Per-system configuration files are for the system on which Mercurial is running. Options in these files override per-installation options. Mercurial comes with some default configuration.

The default configuration files are installed with Mercurial and will be overwritten on upgrades. Default configuration files should never be edited by users or administrators but can be overridden in other configuration files.

So far the directory only contains merge tool configuration but packagers can also put other default configuration there. If the lines that follow are indented, they are treated as continuations of that entry. Leading whitespace is removed from values. Empty lines are skipped. Lines beginning with or ; are ignored and may be used to provide comments. Configuration keys can be set multiple times, in which case Mercurial will use the value that was configured last.

It is also possible to define a section multiple times. As you can see there only thing that matters is the last value that was set for each of the configuration keys. If a configuration key is set multiple times in different configuration files the final value will depend on the order in which the different configuration files are read, with settings from earlier paths overriding later ones as described on the Files section above.

The inclusion is recursive, which means that included files can include other files. The values are either free-form text strings, lists of text strings, or Boolean values. Boolean values can be set to true using any of "1", "yes", "true", or "on" and to false using "0", "no", "false", or "off" all case insensitive.

Only quotation marks at the beginning of a word is counted as a quotation e. SECTIONS This section describes the different sections that may appear in a Mercurial configuration file, the purpose of each section, its possible keys, and their possible values.

Aliases allow you to define your own commands in terms of other commands or aliases , optionally including arguments. This is almost always a bad idea!

An alias can start with an exclamation point! A shell alias is executed with the shell and will let you run arbitrary commands.

Unmatched arguments are removed. These expansions happen before the command is passed to the shell. This is useful when you want to call further Mercurial commands in a shell alias, as was done above for the purge alias.

Note Some global configuration options such as -R are processed before shell aliases and will thus not be passed to aliases. All values are Booleans and default to False.

This section allows you to store usernames and passwords for use when logging into HTTP servers. The following options apply to all hosts. Cookies matching a host will be sent automatically. The file format uses the Mozilla cookies. For more info, do an Internet search for "Netscape cookies. You will need to remove ports from the domain for the cookie to be recognized. This could result in a cookie being disclosed to an unwanted server.

The cookies file is read-only. Example: foo. If the prefix doesn't include a scheme, the match is performed against the URI with its scheme stripped as well, and the schemes argument, q. Username to authenticate with.

If not given, and the remote site requires basic or digest authentication, the user will be prompted for it. Environment variables are expanded in the username letting you do foo. If the URI includes a username, only [auth] entries with a matching username or without a username will be considered.

Password to authenticate with. PEM encoded client certificate key file. Environment variables are expanded in the filename. PEM encoded client certificate chain file. Space separated list of URI schemes to use this authentication entry with.

Only used if the prefix doesn't include a scheme. Supported schemes are http and https. They will match static-http and static-https respectively, as well. For details about how to define your custom effect and style see hg help color. One of auto , ansi , win32 , terminfo or debug.

Any invalid value will disable color. On some systems, terminfo mode may cause problems when using color with less -R as a pager program. You can work around this by either using ansi mode or auto mode , or by using less -r which will pass through all terminal control codes, not just color control codes. On some systems such as MSYS in Windows , the terminal may support a different color mode than the pager program. Valid values are abort , none , linear , and noconflict.

For example, hg update. In addition to pre-defined template keywords, commit log specific one below can be used for customization: extramsg String: Extra message typically 'Leave message empty to abort commit. This may be changed by some commands or extensions. Lines beginning with 'HG:' are removed. HG: Everything below will be removed. For example, if a multibyte character ending with backslash 0x5c is followed by the ASCII character 'n' in the customized template, the sequence of backslash and 'n' is treated as line-feed unexpectedly and the multibyte character is broken, too.

For example, changeset. When the external editor is invoked for a commit, the corresponding dot-separated list of names without the changeset. In this section, items other than changeset can be referred from others. Filters consist of a filter pattern followed by a filter command. Filter patterns are globs by default, rooted at the repository root. For example, to match any file ending in.

To match any file ending in. For each file only the first matching filter applies. The filter command can start with a specifier, either pipe: or tempfile:. If no specifier is given, pipe: is used by default. A pipe: command must accept data on stdin and return the transformed data on stdout.

We suggest you use the eol extension for convenience. Don't use them. Use aliases instead. Use the [defaults] section to define command defaults, i. The command defaults will also be applied to the aliases of the commands defined.

Everything except for unified is a Boolean and defaults to False. Ignored in plain mode. Comma-separated list of recipients' email addresses. Comma-separated list of carbon copy recipients' email addresses. Comma-separated list of blind carbon copy recipients' email addresses.

Method to use to send email messages. If value is smtp default , use SMTP see the [smtp] section for configuration. Otherwise, use as name of program to run that acts like sendmail takes -f option for sender, list of recipients on command line, message on stdin. Comma-separated list of character sets considered convenient for recipients.

If correct conversion fails, the text in question is sent as is. To enable an extension, create an entry for it in this section. To explicitly disable an extension that is enabled in an hgrc of broader scope, prepend its path with! This provides significant improvement for repositories with branches.

Repositories with this on-disk format require Mercurial version 1. Enabled by default. Disabling this option will allow you to store longer filenames in some situations at the expense of compatibility.

Repositories with this on-disk format require Mercurial version 0. This section let you change graph elements display properties by branches, for instance to make the default branch stand out.

Example: [graph] 2px width default. Multiple hooks can be run for the same action by appending a suffix to the action. Overriding a site-wide hook can be done by changing its value or setting it to an empty string. Hooks can be prioritized by adding a prefix of priority. The default priority is 0. They contain the type of hook which triggered the run and the full name of the hook in the config, respectively.

Also see hg help config. Hook failure is ignored. If the hook returns failure, the command doesn't execute and Mercurial returns the failure code. Exit status 0 allows the changegroup to proceed. A non-zero status will cause the push, pull or unbundle to fail.

Exit status 0 allows the commit to proceed. A non-zero status will cause the commit to fail. A non-zero status will cause failure. It can also prevent propagating commits via local pull, push outbound or bundle commands , but not completely, since you can just copy files instead.

If "push", "pull" or "bundle", the operation is happening on behalf of a repository on same system. A non-zero status will cause the key to be rejected. Exit status 0 allows the tag to be created.



0コメント

  • 1000 / 1000