changeset 9797:0c5714a4920f

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Sun, 08 Nov 2009 10:40:51 -0600
parents ee00ef6f9be7 (current diff) e5b79eb5b84a (diff)
children 8b7d4ab33b2b
files
diffstat 17 files changed, 157 insertions(+), 172 deletions(-) [+]
line wrap: on
line diff
--- a/doc/gendoc.py	Sun Nov 08 10:29:52 2009 -0600
+++ b/doc/gendoc.py	Sun Nov 08 10:40:51 2009 -0600
@@ -61,12 +61,12 @@
         ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s)))
 
     # print options
-    section(_("OPTIONS"))
+    section(_("Options"))
     for optstr, desc in get_opts(globalopts):
         ui.write("%s\n    %s\n\n" % (optstr, desc))
 
     # print cmds
-    section(_("COMMANDS"))
+    section(_("Commands"))
     h = {}
     for c, attr in table.items():
         f = c.split("|")[0]
@@ -104,7 +104,7 @@
         for name in names:
             ui.write(".. _%s:\n" % name)
         ui.write("\n")
-        section(sec.upper())
+        section(sec)
         if callable(doc):
             doc = doc()
         ui.write(doc)
--- a/doc/hg.1.txt	Sun Nov 08 10:29:52 2009 -0600
+++ b/doc/hg.1.txt	Sun Nov 08 10:40:51 2009 -0600
@@ -16,16 +16,16 @@
    :class: htmlonly
 
 
-SYNOPSIS
+Synopsis
 --------
 **hg** *command* [*option*]... [*argument*]...
 
-DESCRIPTION
+Description
 -----------
 The **hg** command provides a command line interface to the Mercurial
 system.
 
-COMMAND ELEMENTS
+Command Elements
 ----------------
 
 files...
@@ -46,7 +46,7 @@
 
 .. include:: hg.1.gendoc.txt
 
-FILES
+Files
 -----
 
 ``.hgignore``
@@ -70,20 +70,20 @@
 if the ``.orig`` file already exists and is not tracked by Mercurial,
 it will be overwritten.
 
-BUGS
+Bugs
 ----
 Probably lots, please post them to the mailing list (see Resources_
 below) when you find them.
 
-SEE ALSO
+See Also
 --------
 |hgignore(5)|_, |hgrc(5)|_
 
-AUTHOR
+Author
 ------
 Written by Matt Mackall <mpm@selenic.com>
 
-RESOURCES
+Resources
 ---------
 Main Web Site: http://mercurial.selenic.com/
 
@@ -91,7 +91,7 @@
 
 Mailing list: http://selenic.com/mailman/listinfo/mercurial
 
-COPYING
+Copying
 -------
 Copyright (C) 2005-2009 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
--- a/doc/hgignore.5.txt	Sun Nov 08 10:29:52 2009 -0600
+++ b/doc/hgignore.5.txt	Sun Nov 08 10:40:51 2009 -0600
@@ -11,14 +11,14 @@
 :Manual section: 5
 :Manual group:   Mercurial Manual
 
-SYNOPSIS
+Synopsis
 --------
 
 The Mercurial system uses a file called ``.hgignore`` in the root
 directory of a repository to control its behavior when it searches
 for files that it is not currently tracking.
 
-DESCRIPTION
+Description
 -----------
 
 The working directory of a Mercurial repository will often contain
@@ -45,7 +45,7 @@
 To control Mercurial's handling of files that it manages, see the
 |hg(1)|_ man page. Look for the ``-I`` and ``-X`` options.
 
-SYNTAX
+Syntax
 ------
 
 An ignore file is a plain text file consisting of a list of patterns,
@@ -75,7 +75,7 @@
 and a regexp pattern of the form ``\.c$`` will do the same. To root a
 regexp pattern, start it with ``^``.
 
-EXAMPLE
+Example
 -------
 
 Here is an example ignore file. ::
@@ -91,17 +91,17 @@
   syntax: regexp
   ^\.pc/
 
-AUTHOR
+Author
 ------
 Vadim Gelfer <vadim.gelfer@gmail.com>
 
 Mercurial was written by Matt Mackall <mpm@selenic.com>.
 
-SEE ALSO
+See Also
 --------
 |hg(1)|_, |hgrc(5)|_
 
-COPYING
+Copying
 -------
 This manual page is copyright 2006 Vadim Gelfer.
 Mercurial is copyright 2005-2009 Matt Mackall.
--- a/doc/hgrc.5.txt	Sun Nov 08 10:29:52 2009 -0600
+++ b/doc/hgrc.5.txt	Sun Nov 08 10:40:51 2009 -0600
@@ -16,13 +16,13 @@
    :class: htmlonly
 
 
-SYNOPSIS
+Synopsis
 --------
 
 The Mercurial system uses a set of configuration files to control
 aspects of its behavior.
 
-FILES
+Files
 -----
 
 Mercurial reads configuration data from several files, if they exist.
@@ -83,13 +83,11 @@
     a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
     be read.
 
-SYNTAX
+Syntax
 ------
 
 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
@@ -110,7 +108,7 @@
 section, if it has been set previously.
 
 
-SECTIONS
+Sections
 --------
 
 This section describes the different sections that may appear in a
@@ -935,17 +933,17 @@
     Where to find the HTML templates. Default is install path.
 
 
-AUTHOR
+Author
 ------
 Bryan O'Sullivan <bos@serpentine.com>.
 
 Mercurial was written by Matt Mackall <mpm@selenic.com>.
 
-SEE ALSO
+See Also
 --------
 |hg(1)|_, |hgignore(5)|_
 
-COPYING
+Copying
 -------
 This manual page is copyright 2005 Bryan O'Sullivan.
 Mercurial is copyright 2005-2009 Matt Mackall.
--- a/doc/rst2man.py	Sun Nov 08 10:29:52 2009 -0600
+++ b/doc/rst2man.py	Sun Nov 08 10:40:51 2009 -0600
@@ -1048,6 +1048,8 @@
             raise nodes.SkipNode
         elif self.section_level == 1:
             self.body.append('.SH ')
+            for n in node.traverse(nodes.Text):
+                n.parent.replace(n, nodes.Text(n.astext().upper()))
         else:
             self.body.append('.SS ')
 
--- a/doc/style.css	Sun Nov 08 10:29:52 2009 -0600
+++ b/doc/style.css	Sun Nov 08 10:40:51 2009 -0600
@@ -1,32 +1,91 @@
+/*
+ * Styles for man pages, which suit with http://mercurial.selenic.com/
+ *
+ * Color scheme & layout are borrowed from
+ * http://mercurial.selenic.com/css/styles.css
+ *
+ * Some styles are from html4css1.css from Docutils, which is in the
+ * public domain.
+ */
 
 body {
+    margin: 0;
+    padding: 0;
     font-family: sans-serif;
-    /* adjustment for tt padding */
-    line-height: 140%;
+    color: #111;
 }
 
-tt, pre {
-    background-color: #EEE;
-    border: thin solid #CCC;
-    padding: 1px;
+.document {
+    position: relative;  /* be a top of absolute positioning */
+    margin: 1.5em 1.8em;
+    padding: 0;
+    line-height: 1.3;
+}
+
+/* layout: toc to right */
+#contents {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 26%;
 }
 
-pre {
-    padding: 0.25em;
+/* layout: others to left */
+h1.title, h2.subtitle, .section { width: 72%; }
+.section .section { width: auto; }
+table.docinfo { max-width: 72%; }
+
+/* headings */
+h1, h2, .topic-title, .admonition-title {
+    font-family: "MgOpen Cosmetica", "Lucida Sans Unicode", sans-serif;
+    font-weight: normal;
+}
+h1, h2, .topic-title, .admonition-title {
+    margin: 1em 0 0.5em;
+}
+h1.title { font-size: 300%; }
+h2.subtitle, h1 { font-size: 200%; }
+h2, .topic-title, .admonition-title { font-size: 140%; }
+
+/* override first/last margin */
+.first, h1.title, h2.subtitle { margin-top: 0 !important; }
+.last, .with-subtitle { margin-bottom: 0 !important; }
+
+blockquote, pre, dd .option-list, .field-list {
+    margin: 0.2em 0 1em 2em;
 }
 
-#contents tt, h2 tt {
-    background-color: inherit;
-    border: inherit;
+kbd, tt, pre { font-family: monospace; }
+
+dt { font-weight: bold; }
+dd { margin-bottom: 0.5em; }
+
+th, td { padding: 0.1em 0.2em; border: 0 none; }
+th { font-weight: bold; text-align: left; }
+
+a:link, a:visited { text-decoration: underline; }
+a:hover, a:focus { text-decoration: none; }
+a:link { color: #00b5f1; }
+a:visited { color: #5c9caf; }
+a:link.toc-backref, a:visited.toc-backref {
+    text-decoration: none;
+    color: #111;  /* `inherit' not supported by IE6 */
 }
 
-/* styles taken from html4css1.css from Docutils, which is in the
-   public domain */
+div.admonition, div.attention, div.caution,
+div.danger, div.error, div.hint, div.important,
+div.note, div.tip, div.warning {
+    border-top: 1px #ccc solid;
+    border-bottom: 1px #ccc solid;
+    padding: 0.3em 1em;
+    margin: 1em;
+}
 
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
-    border: 0;
-}
+
+/*
+ * The following styles are from docutils'.
+ * Please refine if necessary.
+ */
 
 table.borderless td, table.borderless th {
     /* Override padding for "table.docutils td" with "! important".
@@ -34,91 +93,24 @@
     padding: 0 0.5em 0 0 ! important;
 }
 
-.first {
-    /* Override more specific margin styles with "! important". */
-    margin-top: 0 ! important;
-}
-
-.last, .with-subtitle {
-    margin-bottom: 0 ! important;
-}
-
 .hidden {
     display: none;
 }
 
-a.toc-backref {
-    text-decoration: none;
-    color: black;
-}
-
 blockquote.epigraph {
-    margin: 2em 5em;;
+    margin: 2em 5em;
 }
 
-dl.docutils dd {
-    margin-bottom: 0.5em;
-}
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
-    font-weight: bold;
-}
-*/
-
 div.abstract {
     margin: 2em 5em;
 }
 
-div.abstract p.topic-title {
-    font-weight: bold;
-    text-align: center;
-}
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
-    margin: 2em;
-    border: medium outset;
-    padding: 1em;
-}
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
-    font-weight: bold;
-    font-family: sans-serif;
-}
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title {
-    color: red;
-    font-weight: bold;
-    font-family: sans-serif;
-}
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
-   compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
-    margin-bottom: 0.5em;
-}
-
-div.compound .compound-last, div.compound .compound-middle {
-    margin-top: 0.5em;
-}
-*/
-
 div.dedication {
     margin: 2em 5em;
     text-align: center;
     font-style: italic;
 }
 
-div.dedication p.topic-title {
-    font-weight: bold;
-    font-style: normal;
-}
-
 div.figure {
     margin-left: 2em;
     margin-right: 2em;
@@ -174,23 +166,11 @@
     font-weight: bold;
 }
 
-div.topic {
-    margin: 2em;
-}
-
 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
     margin-top: 0.4em;
 }
 
-h1.title {
-    text-align: center;
-}
-
-h2.subtitle {
-    text-align: center;
-}
-
 hr.docutils {
     width: 75%;
 }
@@ -252,21 +232,6 @@
     text-align: center;
 }
 
-p.sidebar-title {
-    font-family: sans-serif;
-    font-weight: bold;
-    font-size: larger;
-}
-
-p.sidebar-subtitle {
-    font-family: sans-serif;
-    font-weight: bold;
-}
-
-p.topic-title {
-    font-weight: bold;
-}
-
 pre.address {
     margin-bottom: 0;
     margin-top: 0;
@@ -315,34 +280,11 @@
     margin-left: 1px;
 }
 
-table.docinfo {
-    margin: 2em 4em;
-}
-
-table.docutils {
-    margin-top: 0.5em;
-    margin-bottom: 0.5em;
-}
-
 table.footnote {
     border-left: solid 1px black;
     margin-left: 1px;
 }
 
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
-    padding-left: 0.5em;
-    padding-right: 0.5em;
-    vertical-align: top;
-}
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
-    font-weight: bold;
-    text-align: left;
-    white-space: nowrap;
-    padding-left: 0;
-}
-
 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
     font-size: 100%;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/help/config.txt	Sun Nov 08 10:40:51 2009 -0600
@@ -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/hgext/relink.py	Sun Nov 08 10:29:52 2009 -0600
+++ b/hgext/relink.py	Sun Nov 08 10:40:51 2009 -0600
@@ -135,7 +135,7 @@
             relinked += 1
             savedbytes += sz
         except OSError, inst:
-            ui.warn(_('%s: %s\n') % (tgt, str(inst)))
+            ui.warn('%s: %s\n' % (tgt, str(inst)))
 
     ui.status(_('relinked %d files (%d bytes reclaimed)\n') %
               (relinked, savedbytes))
--- a/mercurial/help.py	Sun Nov 08 10:29:52 2009 -0600
+++ b/mercurial/help.py	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/mercurial/hg.py	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/mercurial/ui.py	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/tests/test-branchmap	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/tests/test-branchmap.out	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/tests/test-committer.out	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/tests/test-globalopts.out	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/tests/test-help.out	Sun Nov 08 10:40:51 2009 -0600
@@ -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	Sun Nov 08 10:29:52 2009 -0600
+++ b/tests/test-install.out	Sun Nov 08 10:40:51 2009 -0600
@@ -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!