zoukankan      html  css  js  c++  java
  • 在Windows下配置svn服务端钩子程序

    需求一,svn提交时必须填写log日志的需求

    @echo off
    ::
    :: Stops commits that have empty log messages.
    ::

    @echo off

    set svnlook="C:Program FilesVisualSVN Serverinsvnlook.exe" #根据实际情况而定
    setlocal

    rem Subversion sends through the path to the repository and transaction id
    set REPOS=%1
    set TXN=%2

    rem check for an empty log message
    %svnlook% log %REPOS% -t %TXN% | findstr . > nul
    if %errorlevel% gtr 0 (goto err) else exit 0

    :err
    echo. 1>&2
    echo 提交被阻止,请填写关于此次修改的log信息(需大于10个字符),然后再重新提交! 1>&2
    exit 1

    需求二:提交svn后,需要同步web目录

    @echo off
    SET REPOS=%1
    SET REV=%2
    SET DIR=%REPOS%/hooks
    SET PATH=%PATH%;
    SET WORKING_COPY=E:phpStudyPHPTutorialWWWzhonghuan #已经checkout出的web路径
    svn update %WORKING_COPY% --username test --password 123 #帐号和密码

  • 相关阅读:
    AJAX 跨域请求与 JSONP详解
    深入理解PHP的mvc框架
    读文文件md5值
    快速排序
    编写简单GUI程序
    简单的加减法
    rallway.py
    用列表构建栈结构
    模拟用户登陆注册
    密码生成
  • 原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/9789664.html
Copyright © 2011-2022 走看看