autohook

Software Screenshot:
autohook
Software Details:
Version: 1.1.0
Upload Date: 14 Apr 15
Developer: Fredrik Haard
Distribution Type: Freeware
Downloads: 10

Rating: 1.0/5 (Total Votes: 1)

autohook can be configured in any hgrc (system, user, repo) and trigger for a push (pretxnchangegroup) into any repository that uses that hgrc. Can load external (Python) hooks that needs to accept parameters repo, user, start revison, end revision

Contains two built-in hooks, adds_branch and has_multiple_heads, and users that can bypass hooks can be defined. Depends on hgapi (https://bitbucket.org/haard/hgapi).

Configuration variables under the [autohook] group:

debug
 More verbose.
loadpath
 Path to add to system path before trying to load modules from loadmodules
loadmodules
 Modules to load before running hooks
tests
 List of tests to run for all repositories
superuser
 List of users who are allowed to bypass tests
repos
 List of repository names
< reponame >.path
 Path to the repository named < reponame >
< reponame >.tests
 Tests to run for the repository named < reponame >


Custom hooks are expected to take five arguments (check the example hook):

repo - hg repo object from hgapi
user - username
start - first revision (number) pushed
end - last revision pushed


Sample config:

[hooks]
pretxnchangegroup = python:path/to/autohook/autohook.py:hook

[autohook]
debug=True
loadpath=/path/to/hooks
loadmodules=hookmodule1 hookmodule2
tests = adds_branch hookmodule1.myhook
repos = orig
orig.path = /path/to/repo
orig.tests = has_multiple_heads hookmodule2.hook

Requirements:

  • Python

Similar Software

bzr-git-1480
bzr-git-1480

14 Apr 15

SCCS
SCCS

11 May 15

Onzen
Onzen

20 Feb 15

CrossVC XXL
CrossVC XXL

14 Apr 15

Other Software of Developer Fredrik Haard

Comments to autohook

Comments not found
Add Comment
Turn on images!