hgrc
author Cameron McCormack <cam@mcc.id.au>
Fri Apr 05 20:07:00 2013 -0700
changeset 26 3ae536c8545f
parent 24 24b281304c33
permissions -rw-r--r--
Make all specs on a push.
     1 
     2 
     3 # THIS IS LIVE! - This file is %include'ed from each WG repo's .hg/hgrc,
     4 # including our own! (New repos have to have the %include line added to their
     5 # .hg/hgrc manually.)
     6 
     7 
     8 # Hooks for any given hook type are run in the order in which they are seen
     9 # during parsing of the Mercurial configuration files:
    10 #
    11 #   http://www.selenic.com/mercurial/hgrc.5.html#files
    12 #
    13 # That means that the hooks for each given hook type below are run in the order
    14 # in which the appear. Furthermore, hooks of a given type in more general
    15 # configuration files run before hooks of the same types in more specific
    16 # configuration files (because the more specific files are parsed after the
    17 # more general configuration files so that their settings override those that
    18 # have already been seen). Be aware of this if you're going to include this
    19 # file from a configuration file other than a repository's .hg/hgrc file -
    20 # we depend on being able to define the last hook to run so we can rollback
    21 # if necessary!!
    22 
    23 
    24 # TODO:
    25 #
    26 # Does Mercurial have built-in protection against two pushes occurring at the
    27 # same time and corrupting the repository? Or should we write a hook?
    28 #
    29 # To encourage rebasing rather than merging (and thus avoid the broken diffs
    30 # that come with people merging with the parents the wrong way around) we
    31 # could have a hook to check that no unmerged branches are being pushed. Or
    32 # even than no branches are being created at all. Or something.
    33 
    34 
    35 [extensions]
    36 
    37 hgext.eol = 
    38 hgext.notify =
    39 
    40 
    41 [email]
    42 from = SVG Working Group repository <cam+svgwgrepo@mcc.id.au>
    43 
    44 
    45 [smtp]
    46 host = localhost
    47 
    48 
    49 [web]
    50 baseurl = https://svgwg.org/hg/
    51 
    52 
    53 [notify]
    54 sources = serve push pull bundle
    55 config =
    56 maxsubject = 72
    57 test = False
    58 
    59 # Number of path components to strip.
    60 strip = 6
    61 
    62 template =
    63   details:   {baseurl}{webroot}/rev/{node|short}
    64   branches:  {branches}
    65   changeset: {rev}:{node|short}
    66   user:      {author}
    67   date:      {date|date}
    68   description:
    69   {desc}\n
    70 maxdiff = 10000
    71 
    72 [usersubs]
    73 public-svg-wg@w3.org = *
    74 
    75 
    76 [hooks]
    77 
    78 # Before committing a new changeset (for lock completeness - no one should be
    79 # committing directly on the server):
    80 
    81 precommit =
    82 # First hook must lock! See long comment in hooks.py!
    83 precommit.lock_repo = python:$SVG_HOOKS_DIR/hooks.py:get_full_repo_lock
    84 
    85 # Before sending out changesets in response to a pull request:
    86 
    87 preoutgoing =
    88 # First hook must lock! See long comment in hooks.py!
    89 preoutgoing.lock_repo = python:$SVG_HOOKS_DIR/hooks.py:get_full_repo_lock
    90 
    91 # Before beginning an incoming push transaction:
    92 
    93 prechangegroup =
    94 # First hook must lock! See long comment in hooks.py!
    95 prechangegroup.lock_repo = python:$SVG_HOOKS_DIR/hooks.py:get_full_repo_lock
    96 prechangegroup.no_local_changes = python:$SVG_HOOKS_DIR/hooks.py:check_no_local_changes
    97 prechangegroup.working_dir_uptodate = python:$SVG_HOOKS_DIR/hooks.py:check_wd_uptodate
    98 
    99 # Before committing an incoming push transaction:
   100 
   101 pretxnchangegroup =
   102 pretxnchangegroup.block_uppercase_ext = python:$SVG_HOOKS_DIR/hooks.py:check_file_extensions
   103 pretxnchangegroup.block_bad_file_names = python:$SVG_HOOKS_DIR/hooks.py:check_file_names
   104 pretxnchangegroup.block_bad_eols = python:$SVG_HOOKS_DIR/hooks.py:check_file_line_endings
   105 pretxnchangegroup.block_bad_users = python:$SVG_HOOKS_DIR/hooks.py:check_commit_users
   106 # currently not requiring review-before-push
   107 #pretxnchangegroup.block_bad_messages = python:$SVG_HOOKS_DIR/hooks.py:check_commit_messages
   108 pretxnchangegroup.block_blacklisted_rev = python:$SVG_HOOKS_DIR/hooks.py:check_rev_blacklist
   109 pretxnchangegroup.block_blacklisted_user = python:$SVG_HOOKS_DIR/hooks.py:check_user_blacklist
   110 # pretxnchangegroup.block_new_unmerged_branches = python:$SVG_HOOKS_DIR/hooks.py:check_no_new_unmerged_branches
   111 pretxnchangegroup.block_unpermitted_users = python:$SVG_HOOKS_DIR/hooks.py:check_https_access
   112 
   113 # After committing an incoming push transaction:
   114 
   115 changegroup =
   116 changegroup.update_working_copy = python:$SVG_HOOKS_DIR/hooks.py:update_wd
   117 changegroup.rebuild_svg2 = python:$SVG_HOOKS_DIR/hooks.py:rebuild_svg2
   118 changegroup.notify = python:hgext.notify.hook
   119 # THESE MUST COME LAST so we don't log/sync if other hooks block the changegroup:
   120 changegroup.write_pushlog = python:$SVG_HOOKS_DIR/hooks.py:write_pushlog
   121 # THIS MUST COME ABSOLUTE LAST SINCE IT HAS TO UNLOCK THE REPOSITORY:
   122 changegroup.sync_dvcs_w3_org = python:$SVG_HOOKS_DIR/hooks.py:sync_dvcs_w3_org
   123