Commit Graph

508 Commits

Author SHA1 Message Date
Mads Kiilerich
e10e504454 url: 'ssh known host'-like checking of fingerprints of HTTPS certificates
Known fingerprints of HTTPS servers can now be configured in the
hostfingerprints section. That makes it possible to verify the identify of web
servers without configuring and trusting the CA chain.

Limitations:
* Portnumbers are ignored, just like with ordinary certificates.
* Host name matching is case sensitive.
2011-01-28 02:57:59 +01:00
Mads Kiilerich
adb37b3b39 merge with stable 2011-01-28 03:09:22 +01:00
Martin Geisler
54d45ad369 hgrc.5: mention that web.cacerts are run through util.expandpath 2011-01-05 10:57:52 +01:00
Martin Geisler
dc8a50e193 merge with stable 2011-01-05 15:56:03 +01:00
Zhigang Wang
5376237d45 smtp: fix for server doesn't support starttls extension
Currently we only support enabling TLS by using SMTP STARTTLS extension. But
not all the servers support it.

With this patch, user can choose which way to enable TLS:

* Default:

      tls = none
      port = 25

* To use STARTTLS:

      tls = starttls
      port = 465

* To use SMTP over SSL:

      tls = smtps
      port = 465

To keep backward compatibility, when tls = true, we use STARTTLS to enable TLS.

Signed-off-by: Zhigang Wang <w1z2g3@gmail.com>
2010-12-20 16:56:54 +08:00
Adrian Buehlmann
cdc2598f17 hgrc.5: mention new 'case collision' handling for ui.portablefilenames 2011-05-02 00:04:49 +02:00
Brodie Rao
92f1644187 pushkey: add hooks for pushkey/listkeys 2011-05-01 11:12:36 +02:00
Yun Lee
c6804b1629 help: move hgignore man page into built-in help (issue2769) 2011-04-17 23:08:35 +08:00
Steven Stallion
6daa9da6c9 hgweb: support disabling page cache
By default, hgweb_mod supports caching via the ETag header. This can
cause some confusion with browsers which cache aggressively. This change
preserves existing behavior while giving the administrator a knob to
disable the ETag header.
2011-04-20 00:01:50 -04:00
Steven Stallion
239482dbab hgweb: support alternate logo url
Clicking on the logo image/text in the hgweb interface brings the
user to the Mercurial project page. The majority of users expect that
this would bring them to the top level index. I have added a new template
variable named `logourl' which allows an administrator to change this
behavior. To stay compatible with existing behavior, `logourl' will
default to http://mercurial.selenic.com/. This change is very useful in
large installations where jumping to the index is common.
2011-04-19 23:37:06 -04:00
Adrian Buehlmann
fc7e20743c add: introduce a warning message for non-portable filenames (issue2756) (BC)
On POSIX platforms, the 'add', 'addremove', 'copy' and 'rename' commands now
warn if a file has a name that can't be checked out on Windows.

Example:

  $ hg add con.xml
  warning: filename contains 'con', which is reserved on Windows: 'con.xml'
  $ hg status
  A con.xml

The file is added despite the warning.

The warning is ON by default. It can be suppressed by setting the config option
'portablefilenames' in section 'ui' to 'ignore' or 'false':

  $ hg --config ui.portablefilenames=ignore add con.xml
  $ hg sta
  A con.xml

If ui.portablefilenames is set to 'abort', then the command is aborted:

  $ hg --config ui.portablefilenames=abort add con.xml
  abort: filename contains 'con', which is reserved on Windows: 'con.xml'

On Windows, the ui.portablefilenames config setting is irrelevant and the
command is always aborted if a problematic filename is found.
2011-04-19 12:42:53 +02:00
Martin Geisler
be192b7fa4 merge with stable 2011-04-07 11:40:54 +02:00
Patrick Mezard
92074cd441 patch: deprecate ui.patch / external patcher feature
Why?
- Mercurial internal patcher works correctly for regular patches and git
  patches, is much faster at least on Windows and is more extensible.
- In theory, the external patcher can be used to handle exotic patch formats. I
  do not know any and have not heard about any such use in years.
- Most patch programs cannot handle git format patches, which makes the API
  caller to decide either to ignore ui.patch by calling patch.internalpatch()
  directly, or take the risk of random failures with valid inputs.
- One thing a patch program could do Mercurial patcher cannot is applying with
  --reverse. Apparently several shelve like extensions try to use that,
  including passing the "reverse" option to Mercurial patcher, which has been
  removed mid-2009. I never heard anybody complain about that, and would prefer
  reimplementing it anyway.

And from the technical perspective:
- The external patcher makes everything harder to maintain and implement. EOL
  normalization is not implemented, and I would bet file renames, if supported
  by the patcher, are not correctly recorded in the dirstate.
- No tests.

How?
- Remove related documentation
- Clearly mark patch.externalpatch() as private
- Remove the debuginstall check. This deprecation request was actually
  triggered by this last point. debuginstall is the only piece of code patching
  without a repository. When migrating to an integrated patch() + updatedir()
  call, this was really a showstopper, all workarounds were either ugly or
  uselessly complicated to implement. If we do not support external patcher
  anymore, the debuginstall check is not useful anymore.
- Remove patch.externalpatch() after 1.9 release.
2011-03-24 10:28:29 +01:00
Martin Geisler
d16a27529b hgrc.5: expand introduction for [web] section 2010-12-01 10:52:31 +01:00
Martin Geisler
b5a68ead0a hgrc.5: describe what the [auth] section is for 2010-12-01 10:21:40 +01:00
Thomas Arendsen Hein
16ae1c2ebb coding style: fix yield used as a function 2010-12-03 12:22:56 +01:00
Martin Geisler
e8fe71a94d merge with stable 2010-12-01 11:04:50 +01:00
Nicolas Dumazet
269e64900b runrst: add RSTARGS Makefile variable to allow customization
In particular, we can ask users to run
make RSTARGS='--traceback' doc
when we need debugging information
2010-12-01 09:46:11 +09:00
Martin Geisler
f6008443c8 doc/Makefile: docs now also depend on extensions
After 782257d279ce the hg(1) manpage contains a section with help
extracted from the extensions, so we should depend on them too.
2010-11-04 17:52:40 +01:00
Dan Villiom Podlaski Christiansen
f385faac7a *: kill all unnecessary shebangs. 2010-10-26 12:18:39 +02:00
Martin Geisler
549ae660d7 doc/Makefile: do not include hg.1.gendoc.txt in MANIFEST
It is an intermediate file used to produce the hg.1 and .hg.1.html
files and is not useful for people who download the tarball. It will
be regenerated automatically by the Makefile if users want to rebuild
the documentation.
2010-10-23 20:10:18 +02:00
Martin Geisler
ce3f69d067 doc/Makefile: cleanup clean target 2010-10-23 20:02:46 +02:00
Patrick Mezard
e03174184a hgrc: document [subpaths] section 2010-10-24 18:39:02 +02:00
Martin Geisler
63ce42a571 gendoc: do not strip 'hg ' from synopsis
This was an old left-over from when the synopsis line was used as a
header. We now have the command name by itself as the header and the
synopsis as a literal block immediately after..
2010-10-23 00:18:10 +02:00
Martin Geisler
526cbba402 gendoc: support multi-line synopses 2010-10-23 00:11:39 +02:00
Martin Geisler
fc7340c8f7 gendoc: re-add indentation to global option table
The indentation was lost in 5a8c9ce7fb90.
2010-10-23 00:01:09 +02:00
Martin Geisler
7e2dd66daa merge-tools: fixed typos
Spotted by Patrick Mézard.
2010-10-21 21:34:30 +02:00
Erik Zielke
40bca26fc6 gendoc: added styling for extension TOC
Uses CSS3 columns for the list of extensions, so it is not just a long
list of extension names.
2010-10-20 17:47:46 +02:00
Erik Zielke
efadd693cc gendoc: automatically create help for default extensions.
Adds a section in the hg.1 manpage and corresponding hg.1.html
file. Each extension is listed with its module docstring, followed by
the commands defined by that extendsion.

Creates help for extensions by extracting doc strings from the extension modules
and its commands.
2010-10-20 17:45:09 +02:00
Erik Zielke
6a81d064ce gendoc: dedent documentation from docstrings
When getting docstrings from the source they are indented to look good
in the code. This indentation interferes with how the text is parsed
by rst. Therefore this indentation is removed.
2010-10-19 13:50:03 +02:00
Martin Geisler
d6c5b6360c gendoc: add subsection for each command 2010-10-20 18:08:37 +02:00
Martin Geisler
6cbb755d15 gendoc: move section commands to module scope 2010-10-20 18:07:50 +02:00
Erik Zielke
9ef6ae89b7 help: help topic for merge tools
I have made a help topic for merge tools. The text in the topic is
based on the http://mercurial.selenic.com/wiki/MergeProgram page from
the wiki, along with some extra information on the internal merge tools.
2010-10-20 16:54:34 +02:00
Erik Zielke
b55d97e2ae gendoc: refactor get_cmd
Refactors the get_cmd to take the table as argument, instad
of just referencing the global table, thereby enabling reuse
for extension command tables.
2010-10-18 14:37:52 +02:00
Adrian Buehlmann
bdf7d7f1bc doc: add [format] dotencode description 2010-10-10 23:32:09 +02:00
Mads Kiilerich
665d2722d8 doc: clarify that https cert verification requires web.cacerts 2010-10-01 00:48:50 +02:00
Anthony Foiani
5a82d7f2a7 doc: clarify smtp.password usage 2010-09-23 00:27:04 -06:00
Martin Geisler
db0d34b21b url: limit expansion to safe auth keys (Issue2328)
Mads Kiilerich pointed out that 1e4ade283b02 was too eager since the
prefix and password keys may contain $-signs. So this only add the
username to the list of keys that are expanded.

This also updates the documentation to match.
2010-08-13 10:53:10 +02:00
Martin Geisler
a7c1749596 hgrc.5: fix "hg hg status" -> "hg status" 2010-08-13 10:13:38 +02:00
Nicolas Dumazet
0e9b05da3e runrst: try to be more helpful if docutils is not installed 2010-07-30 14:41:47 +09:00
Nicolas Dumazet
4a63431eda doc: remove has_key usage in hgmanpage 2010-07-22 14:33:50 +09:00
Nicolas Dumazet
0616cfa31f gendoc: remove callable usage (check-code) 2010-07-22 14:30:29 +09:00
Mads Kiilerich
8a38c3ba07 doc: make sure we use our own code for generating man pages
docutils would in some situations pick up its own manpage.py instead of
doc/manpage.py. Renaming to hgmanpage.py makes it less ambiguous.
2010-07-21 17:51:37 +02:00
Chad Dombrova
22bbfbd44a provide pre- and post- hooks with parsed command line arguments.
python hooks are passed two new keyword arguments:
- opts: a dict of options; unsepcified options are set to their default
- pats: a list of arguments

shell hooks receive two new variables containing string representations
of the above data:
- $HG_OPTS
- $HG_PATS

for example, the opts and pats for 'hg -f v1.1' would be:
{'force': True, 'message': '', 'rev': '', 'user': '', 'date': '', 'local': None, 'remove': None, 'mq': None}
['v1.1']
2010-06-10 09:32:19 -07:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Matt Mackall
3daed7cd59 hgrc: improve docs for the trusted section 2010-06-04 20:13:51 -05:00
Martin Geisler
ae18c6a910 win32text: mark this extension as deprecated 2010-06-02 14:54:25 +02:00
Martin Geisler
bb828f2f9b doc: document expansion of %include and ui.username 2010-05-27 10:37:14 +02:00
Martin Geisler
f8280fc5b0 Merge with stable 2010-05-25 18:45:44 +02:00
Angel Ezquerra
9be5ff2737 doc: clarify that sections can be split 2010-05-25 18:19:40 +02:00
Angel Ezquerra
08d2753759 doc: clarify that keys can be overridden 2010-05-25 18:19:16 +02:00
David Champion
b8cccccefd merge: tool.check = prompt will force an interactive merge check
tool.check = prompt can be used when the exit status of a merge
tool is unreliable but an explicit user signoff on the merge result is
acceptable.
2010-05-10 11:04:56 -05:00
David Champion
884303ae82 merge: introduce tool.check parameter
tool.check is a list of check options, and can be used in place of
tool.checkchanged and tool.checkconflicts:

Equivalences:
tool.checkchanged = yes
tool.checkconflicts = no
tool.check = changed

tool.checkchanged = no
tool.checkconflicts = yes
tool.check = conflicts

tool.checkchanged = yes
tool.checkconflicts = yes
tool.check = changed, conflicts

Add _toollist() wrapper for ui.configlist() to implement this consistently.

checkchanged and checkconflicts are still supported, but check is
preferred for implementing new check options.
2010-05-10 11:04:56 -05:00
David Champion
14b32f640c merge: tool.premerge=keep will leave premerge markers in $local 2010-04-21 11:57:45 -05:00
Matt Mackall
ae3b272f12 docs: document default for web.encoding 2010-04-26 11:03:40 -05:00
Henrik Stuart
1c5ca1f5d8 ui: support quotes in configlist (issue2147)
Several places that use ui.configlist, predominantly in authentication
scenarios need to interface with systems that can contain spaces in usernames
(e.g. when client certificates are usernames, or Windows usernames).

This changeset introduces a parser that supports quoting of strings, and
escape quotation marks that get decoded into a single quotation mark that
adopts the usual behavior one would expect from quoting strings. The Python
library shlex module is not used, on purpose, as that raises if it cannot
match quotation marks in the given input.
2010-04-25 17:38:41 +02:00
Martin Geisler
68483a49bd Merge with stable 2010-04-25 17:11:50 +02:00
Martin Geisler
aa7bc3741f hgrc.5: mention lists as well 2010-04-25 17:11:36 +02:00
Martin Geisler
e334ff8231 Merge with stable 2010-04-25 16:46:44 +02:00
Martin Geisler
61ede1530c hgrc.5: describe form of config values 2010-04-25 16:46:26 +02:00
Martin Geisler
886975f7a6 doc: add links from hgrc.5 to hg.1 2010-04-23 09:55:47 +02:00
Martin Geisler
7f5b9a0a43 doc: make links for hg role
The system has a bit of smartness:

  :hg:`update`     -> links to hg.1.html#update
  :hg:`help diffs` -> links to hg.1.html#diffs
2010-04-23 09:53:25 +02:00
Martin Geisler
1d06245892 doc, minirst: support hg interpreted text role 2010-04-22 10:04:53 +02:00
Martin Geisler
ce3c2717e9 doc: add generic frontend to rst2man and rst2html
This will allow us to easily register new roles and directives.
2010-04-22 09:57:04 +02:00
Nicolas Dumazet
7f1a963829 pylint, pyflakes: remove unused or duplicate imports 2010-04-14 17:58:10 +09:00
Martin Geisler
01d542a46d doc/ja: remove old Japanese man page translations
They were added way back in 2005 and haven't been updated since. They
are no longer referenced by the Makefiles at upper levels and have not
been shipped with a recent version of Mercurial.
2010-03-02 21:34:24 +01:00
Wagner Bruna
7733a703e9 doc/Makefile: fix doc generation when LANGUAGE is set 2010-02-24 13:47:59 -03:00
Steve Borho
aad9ecf6aa hgrc.5: document use of environment variables on Windows
This feature was introduced in c7a5a2c7063a
2010-02-15 20:28:42 -06:00
Matt Mackall
f4a529722f hgrc: update docs for the server section 2010-02-11 17:13:22 -06:00
Henrik Stuart
534ea9a0f8 doc: add missing documentation for http_proxy.always 2010-02-11 21:11:59 +01:00
Matt Mackall
a2acbc421b fix up a bunch of check-code warnings 2010-02-09 14:12:22 -06:00
Henrik Stuart
2d2f851cb8 url: SSL server certificate verification using web.cacerts file (issue1174) 2010-02-10 20:27:46 +01:00
Steve Borho
4bb4d09720 hgrc.5: Fix a typo 2010-02-08 06:24:34 -06:00
Steve Borho
9a5cb3aaab win32: allow hgrc.d on Windows 2010-02-07 05:34:22 -06:00
Martin Geisler
8664a6b426 Merge with stable. 2010-01-29 01:04:38 +01:00
Christian Ebert
42dde8faf8 hgrc.5: whether bcc is prompted for is up to the extension
There is no code in mail.py that forbids an extension to prompt for bcc.
2010-01-28 10:38:29 +00:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Mads Kiilerich
3b9db3f9d9 Update test and man page for multiple matching encode/decode filters 2010-01-05 03:20:45 +01:00
Pascal Quantin
9e8542ebfd Update copyright year to 2010 2010-01-04 23:45:45 +01:00
Mads Kiilerich
30c9ad5ebc doc/Makefile: Fix rst2html detection
Displaying the output from the failing call to "which" didn't prevent
make from doing stupid things later. We now only search for "rst2html"
and fallback to "rst2html.py". If neither name is found, make will
eventually abort when we try to use $(RST2HTML).
2009-12-16 23:59:50 +01:00
Martin Geisler
b076a1e802 doc/Makefile: ensure C locale
The man pages can actually be translated by building them in a
different locale. However, the man pages contain internal links to
certain sections, and when the section titles are translated, the
links change too. So it is currently not recommended to build the man
pages in anything by the "C" locale.
2009-12-01 00:43:21 +01:00
Nicolas Dumazet
eb99c4418d doc/style: add orange border color to notes 2009-11-11 21:52:02 +01:00
Martin Geisler
8053426d1c hgrc.5: mark some words as inline literals 2009-11-11 21:45:13 +01:00
Martin Geisler
e4de4738b7 hgignore.5: fix typo 2009-11-11 21:29:35 +01:00
Martin Geisler
0d2ce52580 doc/style: fix typo in comment (by timeless) 2009-11-11 21:16:20 +01:00
Yuya Nishihara
4a0e94b4d0 doc/style: use default font color specified by user
* it's bad to specify only foreground color:
  http://www.w3.org/QA/Tips/color
* some people prefer dark background
* `color: #111' is mostly the same as `color: black',
  which is the default of almost all popular browsers.

so it's preferable to delete `color: #111', rather than adding
`background-color: white'.
2009-11-10 21:48:10 +09:00
Martin Geisler
d8dd14a3aa hgrc.5: oft-requested "hg update" hook example 2009-11-11 20:08:26 +01:00
Martin Geisler
d1b18c5ccd doc: fix language in CSS comments (by timeless) 2009-11-09 23:47:24 +01:00
Martin Geisler
60d8cf780e doc: uppercase first letter in HTML man pages 2009-11-08 17:27:01 +01:00
Yuya Nishihara
d6d2fe0234 doc: styles for man page, which suit with the mercurial website
designed loosely based on:
http://mercurial.selenic.com/css/styles.css

with some modifications by intention:

 * visited links are colored differently
 * no fixed size
 * works without typeface.js

we keep most styles, which is from docutils, untouched.

tested with:

 * MSIE 6.0 on Windows
 * Firefox 3.5 on Linux
2009-11-09 00:00:47 +09:00
Martin Geisler
ba6e403c30 rst2man: more robust uppercasing of section titles
This handles section titles with child elements such as emphasis or
inline literals.
2009-11-08 16:16:21 +01:00
Martin Geisler
e2d8b0b8e1 doc: use titlecase in man page section titles 2009-11-08 11:46:38 +01:00
Martin Geisler
ddce3472aa rst2man: automatically write sections in uppercase
Man pages have uppercased section titles but other formats do not.
Letting rst2man handle the tranformation allows better reuse of text
between man pages and other formats.
2009-11-08 11:41:34 +01:00
Martin Geisler
a734140a12 hgrc.5: do not mention "name: value" syntax
This was supported in versions prior to 1.3 where we used the standard
Python ConfigParser. The new config parser never supported it.
2009-11-07 18:47:04 +01:00
Martin Geisler
38d09c8d4d hgrc.5: mark more inline literals 2009-11-07 15:51:32 +01:00
Martin Geisler
1b91a31aa9 hgrc.5: do not turn random URLs into links
URLs and email addresses are automatically turned into links. We don't
want that when talking about example links and addresses.
2009-11-07 14:41:03 +01:00
Martin Geisler
7285aa3ae7 hgrc.5: use enumerated list for email charsets 2009-11-07 14:30:58 +01:00
Christian Ebert
966f02c857 hgrc.5: order of email charsets is not a top level literal block
- it belongs under email charsets, not email in general
- enumerate order
2009-11-07 13:54:47 +01:00