##// END OF EJS Templates
commit: abort if a subrepo is modified and ui.commitsubrepos=no...
commit: abort if a subrepo is modified and ui.commitsubrepos=no The default behaviour is to commit subrepositories with uncommitted changes. In my experience this is usually undesirable: - Changes to dependencies are often debugging leftovers - Real changes should generally be applied on the source project directly, tested then committed. This is not always possible, subversion subrepos may include only a small part of the source project, without the tests. Setting ui.commitsubrepos=no will now abort commits containing such modified subrepositories like: $ hg --config ui.commitsubrepos=no ci -m msg abort: uncommitted changes in subrepo sub I ruled out the hook solution because it does not easily take --include/exclude options in account. Also, my main concern is whether this flag could cause problems with extensions. If there are legitimate reasons for callers to override this behaviour (I could not find any), they might either override at ui level, or we could add an argument to localrepo.commit() later. v2: - Renamed ui.commitsubs to ui.commitsubrepos - Mention the configuration entry in hg help subrepos

File last commit:

r11408:534c6949 default
r13411:d4de90a6 default
Show More
config.txt
51 lines | 1.8 KiB | text/plain | TextLexer
Mercurial reads configuration data from several files, if they exist.
Below we list the most specific file first.
On Windows, these configuration files are read:
- ``<repo>\.hg\hgrc``
- ``%USERPROFILE%\.hgrc``
- ``%USERPROFILE%\mercurial.ini``
- ``%HOME%\.hgrc``
- ``%HOME%\mercurial.ini``
- ``C:\mercurial\mercurial.ini`` (unless regkey or hgrc.d\ or mercurial.ini found)
- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (unless hgrc.d\ or mercurial.ini found)
- ``<hg.exe-dir>\hgrc.d\*.rc`` (unless mercurial.ini found)
- ``<hg.exe-dir>\mercurial.ini``
On Unix, these files are read:
- ``<repo>/.hg/hgrc``
- ``$HOME/.hgrc``
- ``/etc/mercurial/hgrc``
- ``/etc/mercurial/hgrc.d/*.rc``
- ``<install-root>/etc/mercurial/hgrc``
- ``<install-root>/etc/mercurial/hgrc.d/*.rc``
If there is a per-repository configuration file which is not owned by
the active user, Mercurial will warn you that the file is skipped::
not trusting file <repo>/.hg/hgrc from untrusted user USER, group GROUP
If this bothers you, the warning can be silenced (the file would still
be ignored) or trust can be established. Use one of the following
settings, the syntax is explained below:
- ``ui.report_untrusted = False``
- ``trusted.users = USER``
- ``trusted.groups = GROUP``
The configuration files for Mercurial use a simple ini-file format. A
configuration file consists of sections, led by a ``[section]`` header
and followed by ``name = value`` entries::
[ui]
username = Firstname Lastname <firstname.lastname@example.net>
verbose = True
The above entries will be referred to as ``ui.username`` and
``ui.verbose``, respectively. Please see the hgrc man page for a full
description of the possible configuration values:
- on Unix-like systems: ``man hgrc``
- online: http://www.selenic.com/mercurial/hgrc.5.html