Commit Graph

44 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer
54c6cdc1d8 Expand '~' in path to extensions. 2006-06-01 15:53:43 -07:00
TK Soh
633f958ebe hgweb: add allow_archive support to [web] section of hgrc 2006-06-01 10:02:24 -05:00
FUJIWARA Katsunori
421983dd06 If HOME is defined on Windows, Mercurial uses it. Document this. 2006-05-18 22:52:19 -07:00
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
aa621a0ae1 remove non-prefixed environment variables from hooks. 2006-05-15 09:13:00 -07:00
Daniel
0520dde5e6 Add more specific documentation about defaults for the [paths] section
of the hgrc(5) document.
2006-05-13 20:41:53 +02:00
Vadim Gelfer
1f1118a083 hooks: add preupdate and update hooks.
preupdate run before working dir updated. can prevent update.
update run after working dir updated.
2006-05-11 10:14:48 -07:00
Vadim Gelfer
3b1041b988 document [extensions] in doc/hgrc.5.txt. 2006-05-04 22:38:14 -07:00
Vadim Gelfer
b2130fb2d5 document hgignore syntax in new file doc/hgignore.5.txt.
fix issue 162.
2006-05-04 22:20:02 -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
901f2c1543 define standard name for base url to use when printing hgweb urls.
useful for bugzilla integration, email notifications, other stuffs.
2006-05-04 11:32:00 -07:00
Vadim Gelfer
2607813e53 support hooks written in python.
to write hook in python, create module with hook function inside.
make sure mercurial can import module (put it in $PYTHONPATH or load it
as extension).  hook function should look like this:

def myhook(ui, repo, hooktype, **kwargs):
   if hook_passes:
      return True
   elif hook_explicitly_fails:
      return False
   elif some_other_failure:
      import util
      raise util.Abort('helpful failure message')
   else:
      return
      # implicit return of None makes hook fail!

then in .hgrc, add hook with "python:" prefix:

[hooks]
commit = python:mymodule.myhook
2006-04-28 15:50:22 -07: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
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
Vadim Gelfer
49cb97855a make --style=compact look for map-cmdline.compact.
change name of key in map file from changelog to changeset.
rename command map files to start with map-cmdline.
rename ui.logmap to ui.style in hgrc.

now --style=foo does this:
tries to open foo as file.
tries as map-cmdline.foo in template path.
tries as foo in template path.
2006-03-04 15:15:18 -08:00
Vadim Gelfer
b5016aab02 let commands that show changesets use templates.
mechanism is same as hgweb templates.

old show_changeset code is still used for now if no template given,
because it is faster than template code when verbose or debug.

simple template can be given on command line using -t, --template.

example:

  hg log -t '{author|person}\n'

complex template can be put in template map file, given on command line
using --map-file.

we give two example map files:
map-log.compact prints 3 lines of output for every change.
map-log.verbose prints exact same output as default "hg log -v".

map files are searched where user says, then in template path as backup.

example:

  hg log --map-file map-log.compact

defaults can be set in hgrc with ui.logtemplate and ui.logmap.
2006-02-27 13:18:57 -08:00
Benoit Boissinot
1a125a9178 change the default timeout to 600 seconds 2006-02-21 23:50:53 +01:00
Benoit Boissinot
25acc6be22 add a timeout when a lock is held (default 1024 sec)
- change the wait keyword from lock.lock to timeout,
  a negative timeout of means "wait forever"
- refactor the two lock functions from localrepo.py
- make them use the timeout (default 1024, can be changed
  with ui.timeout in the config file
- update the doc
2006-02-21 23:21:15 +01:00
Vadim Gelfer
d1f78f49f0 add preoutgoing and outgoing hooks.
preoutgoing lets prevent pull over http or ssh.
outgoing lets notify after pull.
2006-02-17 08:26:21 -08:00
Vadim Gelfer
b843092d88 tests for new hooks. fix things i found when writing tests. 2006-02-16 09:56:31 -08:00
Vadim Gelfer
e6a0476599 merge with crew. 2006-02-16 08:51:24 -08:00
Vadim Gelfer
31409d2048 fix names of parent changeset ids in hooks.
fix hook part of man page.
2006-02-16 08:48:31 -08:00
Vadim Gelfer
db9761a152 prefix hook env var names with HG_.
old names are still provided, but doc says they deprecated.
2006-02-16 08:40:47 -08:00
Vadim Gelfer
aa223c7048 add prechangegroup and pretxnchangegroup hooks.
prechangegroup lets you stop push, pull or unbundle before it begins.
pretxnchangegroup lets you inspect changegroup before transaction is
committed, and roll back if you not like it.
2006-02-15 10:49:30 -08:00
Vadim Gelfer
f15e0c4fd0 add pretxncommit hook.
hook allows check of changeset after create, but before transaction
is committed.  hook failure rolls transaction back.

makes place for local policies like commit message must contain bug id
or reviewer signoff.

change also adds parent changeset ids to commit hook environment,
because is cheap and useful.
2006-02-14 17:13:18 -08:00
Vadim Gelfer
554cbfdbf8 add pretag and tag hooks.
pretag hook lets hook decide how tags can be named.  tag hook is
notifier.
2006-02-14 15:47:25 -08:00
Vadim Gelfer
977a337f0c fix hgrc doc hook descriptions. 2006-02-11 00:31:52 -08:00
Vadim Gelfer
c9f1399932 make mercurial look in more places for config files.
now it searches <install dir>/etc/mercurial, /etc/mercurial, and user
hgrc.

this allows site-wide configuration to be shared over automounted nfs
partition, instead of chenging on every system.  option of having local
configuration on every system remains.

old code for searching /etc/mercurial/hgrc.d never worked, this code
is tested and works.
2005-11-04 11:51:01 -08:00
Benoit Boissinot
6d70377b33 mention running multiple hooks in the doc 2005-10-31 10:47:27 -08:00
mpm@selenic.com
49021bbf3c Hook fixups
Pass the first new changeset node to the changegroup hook
Call commit for each changeset in a pull changegroup
Improve hook docs
2005-09-22 10:12:42 -07:00
mpm@selenic.com
9282c26f18 Merge with TAH 2005-09-22 09:41:34 -07:00
Bryan O'Sullivan
3bd7c6fdcc Update hgrc documentation to refer to Windows paths. 2005-09-21 15:44:35 -07:00
Bryan O'Sullivan
ffb420798b Enhance the file filtering capabilities.
We now allow filtering through either pipes or pairs of temporary
files.  The latter appear to be mandatory for use on Windows.
2005-09-21 11:44:08 -07:00
Thomas Arendsen Hein
455a56454d Cleanup of tabs and trailing spaces. 2005-09-21 07:56:19 +02:00
mpm@selenic.com
eac251ef7c Add file encoding/decoding support 2005-09-15 02:59:16 -05:00
Bryan O'Sullivan
790e0fb244 Sort items in each hgrc section. Add web/description. 2005-08-30 23:16:15 -07:00
mpm@selenic.com
bba79f0fb3 Document archive download options 2005-08-26 20:56:50 -07:00
mpm@selenic.com
731055ffd1 Add web:style option 2005-08-21 15:00:02 -07:00
mpm@selenic.com
21802a4ed9 hgweb: Make maxfiles, maxchanges, and allowpull proper config options 2005-08-19 22:12:40 -08:00
mpm@selenic.com
d16c6b156d Doc updates for push, pull, hooks, local tags, and ssh options 2005-08-19 21:47:46 -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
211f1e3677 hgweb: add [web] section to hgrc
This makes almost all of the hgweb settings available in hgrc.
2005-08-17 17:57:37 -08:00
Thomas Arendsen Hein
cc2b6ea71d Fix default values and add interactive setting to [ui] section of hgrc docs.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix default values and add interactive setting to [ui] section of hgrc docs.

manifest hash: 211eea218970b45b2a0cdc822d5b6610a89ffbd7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC1pE8W7P1GVgWeRoRAof+AJ4mpm3DCRqh+9To3Gn4bpC7UGcTnQCfVIWN
5VT9pqdP6/06tH8nYgW55f4=
=uNyy
-----END PGP SIGNATURE-----
2005-07-14 17:22:20 +01:00
Bryan O'Sullivan
a2873f02e1 Move hgrc documentation out to its own man page, hgrc(5).
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Node ID 5076cf1fd6a1b8eb410e5e03cb004ca6a52a30f9
# Parent  d5198e5dd8087ca487031662f0908a6296512e5d
Move hgrc documentation out to its own man page, hgrc(5).
The new man page expands on the existing documentation by describing
the file format and the purpose of each section and field.
2005-07-10 16:14:06 -08:00