hgrc
author Cameron McCormack <cam@mcc.id.au>
Fri, 05 Apr 2013 20:07:00 -0700
changeset 26 3ae536c8545f
parent 25 8176118fac4b
permissions -rw-r--r--
Make all specs on a push.


# THIS IS LIVE! - This file is %include'ed from each WG repo's .hg/hgrc,
# including our own! (New repos have to have the %include line added to their
# .hg/hgrc manually.)


# Hooks for any given hook type are run in the order in which they are seen
# during parsing of the Mercurial configuration files:
#
#   http://www.selenic.com/mercurial/hgrc.5.html#files
#
# That means that the hooks for each given hook type below are run in the order
# in which the appear. Furthermore, hooks of a given type in more general
# configuration files run before hooks of the same types in more specific
# configuration files (because the more specific files are parsed after the
# more general configuration files so that their settings override those that
# have already been seen). Be aware of this if you're going to include this
# file from a configuration file other than a repository's .hg/hgrc file -
# we depend on being able to define the last hook to run so we can rollback
# if necessary!!


# TODO:
#
# Does Mercurial have built-in protection against two pushes occurring at the
# same time and corrupting the repository? Or should we write a hook?
#
# To encourage rebasing rather than merging (and thus avoid the broken diffs
# that come with people merging with the parents the wrong way around) we
# could have a hook to check that no unmerged branches are being pushed. Or
# even than no branches are being created at all. Or something.


[extensions]

hgext.eol = 
hgext.notify =


[email]
from = SVG Working Group repository <cam+svgwgrepo@mcc.id.au>


[smtp]
host = localhost


[web]
baseurl = https://svgwg.org/hg/


[notify]
sources = serve push pull bundle
config =
maxsubject = 72
test = False

# Number of path components to strip.
strip = 6

template =
  details:   {baseurl}{webroot}/rev/{node|short}
  branches:  {branches}
  changeset: {rev}:{node|short}
  user:      {author}
  date:      {date|date}
  description:
  {desc}\n
maxdiff = 10000

[usersubs]
public-svg-wg@w3.org = *


[hooks]

# Before committing a new changeset (for lock completeness - no one should be
# committing directly on the server):

precommit =
# First hook must lock! See long comment in hooks.py!
precommit.lock_repo = python:$SVG_HOOKS_DIR/hooks.py:get_full_repo_lock

# Before sending out changesets in response to a pull request:

preoutgoing =
# First hook must lock! See long comment in hooks.py!
preoutgoing.lock_repo = python:$SVG_HOOKS_DIR/hooks.py:get_full_repo_lock

# Before beginning an incoming push transaction:

prechangegroup =
# First hook must lock! See long comment in hooks.py!
prechangegroup.lock_repo = python:$SVG_HOOKS_DIR/hooks.py:get_full_repo_lock
prechangegroup.no_local_changes = python:$SVG_HOOKS_DIR/hooks.py:check_no_local_changes
prechangegroup.working_dir_uptodate = python:$SVG_HOOKS_DIR/hooks.py:check_wd_uptodate

# Before committing an incoming push transaction:

pretxnchangegroup =
pretxnchangegroup.block_uppercase_ext = python:$SVG_HOOKS_DIR/hooks.py:check_file_extensions
pretxnchangegroup.block_bad_file_names = python:$SVG_HOOKS_DIR/hooks.py:check_file_names
pretxnchangegroup.block_bad_eols = python:$SVG_HOOKS_DIR/hooks.py:check_file_line_endings
pretxnchangegroup.block_bad_users = python:$SVG_HOOKS_DIR/hooks.py:check_commit_users
# currently not requiring review-before-push
#pretxnchangegroup.block_bad_messages = python:$SVG_HOOKS_DIR/hooks.py:check_commit_messages
pretxnchangegroup.block_blacklisted_rev = python:$SVG_HOOKS_DIR/hooks.py:check_rev_blacklist
pretxnchangegroup.block_blacklisted_user = python:$SVG_HOOKS_DIR/hooks.py:check_user_blacklist
# pretxnchangegroup.block_new_unmerged_branches = python:$SVG_HOOKS_DIR/hooks.py:check_no_new_unmerged_branches
pretxnchangegroup.block_unpermitted_users = python:$SVG_HOOKS_DIR/hooks.py:check_https_access

# After committing an incoming push transaction:

changegroup =
changegroup.update_working_copy = python:$SVG_HOOKS_DIR/hooks.py:update_wd
changegroup.rebuild_svg2 = python:$SVG_HOOKS_DIR/hooks.py:rebuild_svg2
changegroup.notify = python:hgext.notify.hook
# THESE MUST COME LAST so we don't log/sync if other hooks block the changegroup:
changegroup.write_pushlog = python:$SVG_HOOKS_DIR/hooks.py:write_pushlog
# THIS MUST COME ABSOLUTE LAST SINCE IT HAS TO UNLOCK THE REPOSITORY:
changegroup.sync_dvcs_w3_org = python:$SVG_HOOKS_DIR/hooks.py:sync_dvcs_w3_org