Commit Graph

58 Commits

Author SHA1 Message Date
Vadim Gelfer
de0a3b422b allow to send email using sendmail.
default is still smtp.
update hgrc doc with sendmail info.
2006-05-15 10:25:17 -07:00
Vadim Gelfer
222b04bf94 do not set smtp host by default - raise error instead 2006-05-15 08:47:42 -07:00
Vadim Gelfer
2b273c6862 prompt user for http authentication info
in interactive mode, mercurial now asks the user for the username and
password when the server requires it. the previous behavior was to fail
with an http 401.

based on patch from eric jaffe <jaffe.eric@gmail.com>.
2006-05-14 17:37:17 -07:00
Stephen Darnell
df126198c9 Use text rather than binary mode for editing commit messages 2006-05-04 15:42:14 -07:00
Vadim Gelfer
f906ed16e7 move mail sending code into core, so extensions can share it.
document hgrc settings used.
2006-05-04 12:23:01 -07:00
Vadim Gelfer
b5e4f14fb3 do not check sys.argv from localrepo when running hooks.
instead add traceback field to ui class.
2006-04-30 16:30:39 -07:00
mason@suse.com
ed26ff0cae Implement revlogng.
revlogng results in smaller indexes, can address larger data files, and
supports flags and version numbers.

By default the original revlog format is used.  To use the new format,
use the following .hgrc field:

[revlog]
# format choices are 0 (classic revlog format) and 1 revlogng
format=1
2006-04-04 16:38:43 -04:00
Thomas Arendsen Hein
ee03ece428 Group changes done by the same developer on the same with --style=changelog
Changeset and tags are appended to the change message for non-quiet and
non-verbose output, so grouping works.

Fixes last bit of issue110.
2006-04-01 21:37:08 +02:00
Eung-Ju Park
e46cb8a4f8 Fix error on Windows if "hg log | more" exits. 2006-03-28 09:24:29 -08:00
mcmillen@cs.cmu.edu
dc6517d798 Implementation of per-user .hgignore.
Reference: http://www.selenic.com/mercurial/bts/issue166

If the [ui] section of .hgrc contains keys like "ignore" or
"ignore.something", the values corresponding to these keys are
treated as per-user hgignore files. These hgignore files apply to all
repositories used by that user.
2006-03-24 20:18:02 +01:00
Benoit Boissinot
a918bc84a6 ignore EPIPE in ui.err_write
It avoids not being able to abort a transaction when a push via ssh fails.
Maybe some other place should ignore EPIPE too.
2006-03-23 23:16:41 +01:00
Thomas Arendsen Hein
b54f0a71cb Adapted behaviour of ui.username() to documentation and mention it explicitly:
Searched in this order: $HGUSER, [ui] section of hgrcs, $EMAIL
and stop searching if one of these is set.
Abort if found username is an empty string to force specifying
the commit user elsewhere, e.g. with line option or repo hgrc.
If not found, use $LOGNAME or $USERNAME +"@full.hostname".
2006-03-21 15:33:29 +01:00
Thomas Arendsen Hein
590bf663b7 Improved ui.edit():
- Use descriptive name for temporary file: hg-editor-*.txt
- Don't import tempfile in the method, but use demandload()
- Remove tempfile file even if editor aborts.
2006-03-21 12:54:32 +01:00
Thomas Arendsen Hein
eb82c531cb Pass correct username as $HGUSER to hgeditor if "commit -u" is used.
And only use the new util.system parameter to set the environment.
2006-03-21 12:45:27 +01:00
Vadim Gelfer
9504f432e5 add HGRCPATH env var, list of places to look for hgrc files.
if set, override default hgrc search path.
if empty, only .hg/hgrc of current repo read.

for each element, if directory, all entries in directory with end in
".rc" are added to path.  else, element is added to path.

big thing about this change is that user "~/.hgrc" and system hgrc not
longer breaks tests.  run-tests makes HGRCPATH empty now.
2006-03-14 21:40:46 -08:00
Vadim Gelfer
ad2e396d0d merge with crew. 2006-03-13 08:25:33 -08:00
Vadim Gelfer
03ca08b56f merge with crew. 2006-03-12 16:21:59 -08:00
Thomas Arendsen Hein
df5b337b83 Don't expand empty [paths] so later interpolation can do the right thing.
Example:
[paths]
default =
default-push = %(default)s
2006-03-12 20:34:09 +01:00
Thomas Arendsen Hein
cb1befe216 Read paths specified in .hg/hgrc relative to repo root, otherwise to home dir. 2006-03-12 20:13:58 +01:00
Thomas Arendsen Hein
c61039ce71 Directory names take precedence over symbolic names consistently.
Previously this was only done for clone.
2006-03-12 18:05:13 +01:00
Vadim Gelfer
97a9d5c4ee merge util.esystem and util.system. 2006-03-10 22:42:59 -08:00
Thomas Arendsen Hein
1a56073d58 Catch hgrc interpolation errors nicely. 2006-03-10 11:34:02 +01:00
Thomas Arendsen Hein
009dc70ef5 Inherit config from real parentui and don't use ConfigParser internals.
Added comments for the meaning of parentui.
2006-03-10 11:06:45 +01:00
Vadim Gelfer
78c4823c69 inherit hgrc so "%" interpolation works. 2006-03-08 14:53:57 -08:00
Thomas Arendsen Hein
85c11080a4 Merge with crew 2006-03-06 17:53:11 +01:00
Thomas Arendsen Hein
ed3a95a497 Create local ui object per repository, so .hg/hgrc don't get mixed.
This is needed for hooks, but may be important for other settings, too.
Fixes issue113, also integrated push-hook-lock.sh as a test case for this.
2006-03-06 17:47:41 +01:00
Vadim Gelfer
6fe3d3306f make ui flush output. this makes error happen if printing to /dev/full.
before this change, error happened with some pythons, but not others.
now always happens.
fixes issue 155.
2006-03-06 08:35:15 -08:00
Vadim Gelfer
75d0535141 move shortuser into util module. 2006-02-27 11:32:10 -08:00
mason@suse.com
7bc44b52d9 Add new bdiff based unidiff generation. 2006-01-24 15:02:10 +13:00
Vadim Gelfer
ff1f653af7 eliminate backtrace when piping output on windows.
this fixes issue 54.
2006-01-02 15:25:33 -08:00
Benoit Boissinot
5cdaee582b quote the filename when calling HGEDITOR 2005-12-14 20:38:11 -06:00
Eric Hopper
dd6718fc31 Convert all classes to new-style classes by deriving them from object. 2005-11-18 22:48:47 -08:00
Soh Tk-r28629
d46c7428a7 Fix traceback on bad system hgrc files 2005-10-31 09:57:54 -08:00
Benoit Boissinot
e25f65575b make readconfig take a filename instead of a file pointer as argument
catch parse error while reading a config file
add a testcase for parse error
2005-10-27 13:40:56 -07:00
tonfa@arakou.lan
c039642ffc Fix relative pull in a subdir 2005-10-24 17:41:45 -07:00
Benoit Boissinot
06e39e559b i18n part2: use '_' for all strings who are part of the user interface 2005-10-18 18:38:39 -07:00
Benoit Boissinot
e38e94088a i18n first part: make '_' available for files who need it 2005-10-18 18:37:48 -07:00
Bryan O'Sullivan
1cc739dd2e Use platform-appropriate rc file names. 2005-09-21 09:56:30 -07:00
bos@serpentine.internal.keyresearch.com
d8c746ea08 Merge with TAH. 2005-08-29 10:31:41 -07:00
Thomas Arendsen Hein
9129755767 Move generating short username to display in hg/hgweb annotate to ui module. 2005-08-28 17:29:28 +02:00
mason@suse.com
777af4d76b Add support for extension modules
This adds support for an [extensions] section to hgrc.  This has the form of:

[extensions]
mod=[path]

If a path is specified, the python module found at that path is load.
Otherwise, __import__ is used to find the module.

Each module must implement a dict called cmdtable where the command line
options for that module live.  Each module must also implement a reposetup
function:

cmdtable = {}
def reposetup(ui, repo): pass

Index: hg/mercurial/ui.py
===================================================================
2005-08-26 14:05:52 -07:00
benoit.boissinot@ens-lyon.fr
95b97f01ed pep-0008 cleanup
- Don't use spaces around the '=' sign when used to indicate a
      keyword argument or a default parameter value.
2005-08-26 13:06:58 +02:00
Bryan O'Sullivan
c575ae97dc Add commands.debugconfig.
This lets us both view the actual config data that hg is using, and
drive editors that need to see this information.
2005-08-23 21:30:12 -07:00
mpm@selenic.com
8fe07a9a3f Add ui.setconfig overlay
This can simplify option passing
2005-08-19 21:25:25 -08:00
Thomas Arendsen Hein
40a409ddd8 Read global config file /etc/mercurial/hgrc and fix reading hgrc on Windows. 2005-08-18 21:35:36 +01:00
mpm@selenic.com
09e51635fb HG environment variables take precedence over hgrc
manifest hash: c128b53429f861c0b75c2a81c6ad4907e4779810
2005-07-13 01:48:03 -08:00
Radoslaw "AstralStorm" Szkodzinski
f70194b3b9 Pass username to hgeditor, remove temporary file
# HG changeset patch
# User Radoslaw "AstralStorm" Szkodzinski <astralstorm@gorzow.mm.pl>
# Node ID 5c5d1484b51a53918575a199ab8985160f0ce2d7
# Parent  5155a0b6300820be38eb7e04d26525be39307df2
Pass username to hgeditor, remove temporary file
2005-07-10 16:00:17 -08:00
Bryan O'Sullivan
920a086a80 Demand-load most modules in the commands and ui modules.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Node ID 059c6e42fc4221816e26a72bef8cf780891989ca
# Parent  4309b0a5a6010dd2e5811b77d2bc29a51acf290f
Demand-load most modules in the commands and ui modules.

This improves response times for a number of simple commands, as the
Python interpreter doesn't end up loading modules that it never uses.

There's less benefit to demand-loading in other modules.
2005-07-04 12:16:27 -08:00
Matt Mackall
c77de876fa Add username/merge/editor to .hgrc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add username/merge/editor to .hgrc

These take priority over the equivalent environment vars
Deprecate HGMERGE, HGUSER, and HGEDITOR in docs
Add ui section to docs
Remove undocumented HG_OPTS
Raise username code out of changelog class
Make tests ignore ~/.hgrc

manifest hash: d127ef02bc5266036b4c77a55319519e91bd475b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCyM5NywK+sNU5EO8RAuU7AJ9zKk1TFrJXHM04jOOJJeBSp8jlTgCeP+tr
qwGFd+WaNqTepZ0wun5g9Uc=
=QEBu
-----END PGP SIGNATURE-----
2005-07-03 21:51:09 -08:00
mpm@selenic.com
3f8a95f419 [PATCH] Make ui.warn write to stderr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Make ui.warn write to stderr

From: Bryan O'Sullivan <bos@serpentine.com>

> Someone is probably using ui.write instead of ui.warn.

Actually, ui.warn uses ui.write.  So hg never prints to stderr right
now.  Here's a patch to fix that.

[mpm: add sys.stdout.flush()]

manifest hash: c09c645a5985b640a7ad884afb0eeb11fcffbb19
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCxcEaywK+sNU5EO8RAhWUAJ9vVteAodKC9zIhIWUuPqVl2d915QCePp5S
asuv62w4Zv+o0gB3SoucYdQ=
=NYrs
-----END PGP SIGNATURE-----
2005-07-01 14:18:02 -08:00