svn:鉤子post-commit
# The post-commit hook is invoked(呼叫) after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with(使用) the
# following ordered(命令) arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] REV (the number of the revision(版本) just committed)
#
# The default working directory for the invocation(呼叫) is undefined, so
# the program should set one explicitly(明確的) if it cares(真的在乎).
#
# Because the commit has already completed and cannot be undone,
# the exit(退出) code of the hook program is ignored. The hook program
# can use the 'svnlook' utility(工具) to help it examine the
# newly-committed tree.
#
# On a Unix system, the normal procedure is to have 'post-commit'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-commit' must be executable(可執行) by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'post-commit.bat' or 'post-commit.exe',
# but the basic idea is the same.
#
# The hook program typically(一般) does not inherit(繼承) the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch(啟用) unless invoked via absolute(絕對) path.
# If you're having unexpected problems with a hook program, the
# culprit(罪魁禍首) may be unusual(異常) (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter(解釋).
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
REPOS="$1"
REV="$2"
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with(使用) the
# following ordered(命令) arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] REV (the number of the revision(版本) just committed)
#
# The default working directory for the invocation(呼叫) is undefined, so
# the program should set one explicitly(明確的) if it cares(真的在乎).
#
# Because the commit has already completed and cannot be undone,
# the exit(退出) code of the hook program is ignored. The hook program
# can use the 'svnlook' utility(工具) to help it examine the
# newly-committed tree.
#
# On a Unix system, the normal procedure is to have 'post-commit'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-commit' must be executable(可執行) by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'post-commit.bat' or 'post-commit.exe',
# but the basic idea is the same.
#
# The hook program typically(一般) does not inherit(繼承) the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch(啟用) unless invoked via absolute(絕對) path.
# If you're having unexpected problems with a hook program, the
# culprit(罪魁禍首) may be unusual(異常) (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter(解釋).
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
REPOS="$1"
REV="$2"
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
總結:
1、post-commit的作用
The post-commit hook is invoked after a commit.
2、引數
# [1] REPOS-PATH (the path to this repository)
# [2] REV (the number of the revision just committed)
3、svnlook
4、使用的user對post-commit可執行許可權和對要操作的庫有access許可權。
5、windows下重新命名為'post-commit.bat' or 'post-commit.exe'。
6、子程式不能繼承父程式的環境變數。
1、post-commit的作用
The post-commit hook is invoked after a commit.
2、引數
# [1] REPOS-PATH (the path to this repository)
# [2] REV (the number of the revision just committed)
3、svnlook
4、使用的user對post-commit可執行許可權和對要操作的庫有access許可權。
5、windows下重新命名為'post-commit.bat' or 'post-commit.exe'。
6、子程式不能繼承父程式的環境變數。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23890223/viewspace-2143094/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 手把手教SVN鉤子自動更新專案
- React Hooks 鉤子特性ReactHook
- 新建鉤子檔案
- PHP系列之鉤子PHP
- Vue 生命週期鉤子Vue
- vue-router的鉤子Vue
- JVM鉤子函式的使用JVM函式
- Vue的鉤子函式[路由導航守衛、keep-alive、生命週期鉤子]Vue函式路由Keep-Alive
- Python 類變動的鉤子方法Python
- before-after-hook鉤子函式Hook函式
- Vue 元件生命週期:探索鉤子Vue元件
- 新增表單請求後鉤子
- Vue生命週期鉤子簡介Vue
- Vue生命週期鉤子函式Vue函式
- Vue路由鉤子 afterEach beforeEach區別Vue路由
- 理解 Vue 的 setup 應用程式鉤子Vue
- 12.1 使用鍵盤滑鼠監控鉤子
- Vue 生命週期與鉤子函式Vue函式
- Vue例項的生命週期鉤子Vue
- 外掛移植後,鉤子不起作用。
- 鉤子函式的執行機理函式
- wordpress的save_post鉤子注意點
- Sequelize 中文文件 v4 – Hooks – 鉤子Hook
- 談談 React 新的生命週期鉤子React
- React setState和修改props觸發的鉤子React
- wordpress 當更新主題時候的鉤子
- Nuxt.js 應用中的 request 事件鉤子UXJS事件
- Nuxt.js 應用中的 beforeResponse 事件鉤子UXJS事件
- Nuxt.js 應用中的 webpackConfigs 事件鉤子UXJSWeb事件
- Nuxt.js 應用中的 error 事件鉤子UXJSError事件
- Nuxt.js 應用中的 close 事件鉤子UXJS事件
- 10個有用的自定義鉤子vue.jsVue.js
- SpringBoot2.x入門:使用CommandLineRunner鉤子介面Spring Boot
- 輕鬆學會 React 鉤子:以 useEffect() 為例React
- [BUG反饋]模板裡面沒有documentDetailBefore鉤子AI
- Hive Query生命週期 —— 鉤子(Hook)函式篇HiveHook函式
- pre-commit鉤子,程式碼質量檢查MIT
- vue[原始碼]生命週期鉤子的實現Vue原始碼
- [BUG反饋]OneThink1.1 禁用外掛之後鉤子狀態仍然有效,鉤子仍在發揮作用。禁用其實無效