changeset 9795:8eacee85d019

merge with stable
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 08 Nov 2009 17:03:24 +0100
parents 79e749b26b2b (diff) eccc8aacd6f9 (current diff)
children e5b79eb5b84a
files
diffstat 11 files changed, 51 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hgrc.5.txt	Sat Nov 07 16:31:43 2009 -0600
+++ b/doc/hgrc.5.txt	Sun Nov 08 17:03:24 2009 +0100
@@ -87,9 +87,7 @@
 ------
 
 A configuration file consists of sections, led by a ``[section]`` header
-and followed by ``name: value`` entries; ``name=value`` is also accepted.
-
-::
+and followed by ``name = value`` entries::
 
     [spam]
     eggs=ham
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/help/config.txt	Sun Nov 08 17:03:24 2009 +0100
@@ -0,0 +1,37 @@
+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``
+- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
+- ``<install-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``
+
+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
+
+This 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
--- a/mercurial/help.py	Sat Nov 07 16:31:43 2009 -0600
+++ b/mercurial/help.py	Sun Nov 08 17:03:24 2009 +0100
@@ -80,6 +80,7 @@
     return loader
 
 helptable = (
+    (["config"], _("Configuration Files"), loaddoc('config')),
     (["dates"], _("Date Formats"), loaddoc('dates')),
     (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
     (['environment', 'env'], _('Environment Variables'), loaddoc('environment')),
--- a/mercurial/hg.py	Sat Nov 07 16:31:43 2009 -0600
+++ b/mercurial/hg.py	Sun Nov 08 17:03:24 2009 +0100
@@ -9,7 +9,7 @@
 from i18n import _
 from lock import release
 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
-import lock, util, extensions, error
+import lock, util, extensions, error, encoding
 import merge as _merge
 import verify as _verify
 import errno, os, shutil
@@ -320,7 +320,8 @@
                     except error.RepoLookupError:
                         continue
                 bn = dest_repo[uprev].branch()
-                dest_repo.ui.status(_("updating to branch %s\n") % bn)
+                dest_repo.ui.status(_("updating to branch %s\n")
+                                    % encoding.tolocal(bn))
                 _update(dest_repo, uprev)
 
         return src_repo, dest_repo
--- a/mercurial/ui.py	Sat Nov 07 16:31:43 2009 -0600
+++ b/mercurial/ui.py	Sun Nov 08 17:03:24 2009 +0100
@@ -186,7 +186,7 @@
             except KeyError:
                 pass
         if not user:
-            raise util.Abort(_("Please specify a username."))
+            raise util.Abort(_('no username supplied (see "hg help config")'))
         if "\n" in user:
             raise util.Abort(_("username %s contains a newline\n") % repr(user))
         return user
--- a/tests/test-branchmap	Sat Nov 07 16:31:43 2009 -0600
+++ b/tests/test-branchmap	Sun Nov 08 17:03:24 2009 +0100
@@ -13,7 +13,7 @@
 hg -R a ci -Am foo
 
 hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
-hg clone http://localhost:$HGPORT1 b
+hg --encoding utf-8 clone http://localhost:$HGPORT1 b
 hg --encoding utf-8 -R b log
 echo bar >> b/foo
 hg -R b ci -m bar
--- a/tests/test-branchmap.out	Sat Nov 07 16:31:43 2009 -0600
+++ b/tests/test-branchmap.out	Sun Nov 08 17:03:24 2009 +0100
@@ -6,7 +6,7 @@
 adding manifests
 adding file changes
 added 1 changesets with 1 changes to 1 files
-updating working directory
+updating to branch æ
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 changeset:   0:867c11ce77b8
 branch:      æ
--- a/tests/test-committer.out	Sat Nov 07 16:31:43 2009 -0600
+++ b/tests/test-committer.out	Sun Nov 08 17:03:24 2009 +0100
@@ -22,7 +22,7 @@
 date:        Mon Jan 12 13:46:40 1970 +0000
 summary:     commit-1
 
-abort: Please specify a username.
+abort: no username supplied (see "hg help config")
 No username found, using user@host instead
 transaction abort!
 rollback completed
--- a/tests/test-globalopts.out	Sat Nov 07 16:31:43 2009 -0600
+++ b/tests/test-globalopts.out	Sun Nov 08 17:03:24 2009 +0100
@@ -202,6 +202,7 @@
 
 additional help topics:
 
+ config       Configuration Files
  dates        Date Formats
  patterns     File Name Patterns
  environment  Environment Variables
@@ -270,6 +271,7 @@
 
 additional help topics:
 
+ config       Configuration Files
  dates        Date Formats
  patterns     File Name Patterns
  environment  Environment Variables
--- a/tests/test-help.out	Sat Nov 07 16:31:43 2009 -0600
+++ b/tests/test-help.out	Sun Nov 08 17:03:24 2009 +0100
@@ -95,6 +95,7 @@
 
 additional help topics:
 
+ config       Configuration Files
  dates        Date Formats
  patterns     File Name Patterns
  environment  Environment Variables
@@ -159,6 +160,7 @@
 
 additional help topics:
 
+ config       Configuration Files
  dates        Date Formats
  patterns     File Name Patterns
  environment  Environment Variables
--- a/tests/test-install.out	Sat Nov 07 16:31:43 2009 -0600
+++ b/tests/test-install.out	Sun Nov 08 17:03:24 2009 +0100
@@ -13,6 +13,6 @@
 Checking patch...
 Checking commit editor...
 Checking username...
- Please specify a username.
+ no username supplied (see "hg help config")
  (specify a username in your .hgrc file)
 1 problems detected, please check your install!