svn提交备注_SVN提交时强制填写备注

# If the hook program exits with success, the txn is committed; but

#if it exits with failure (non-zero), the txn is aborted, no commit

# takes place, and STDERR is returned to the client. The hook

# program can use the‘svnlook‘utility to help it examine the txn.

#

# On a Unix system, the normal procedure is to have‘pre-commit‘# invoke other programs todo the real work, though it may dothe

# work itself too.

#

#*** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT ***#*** FOR REVISION PROPERTIES (like svn:log or svn:author). ***#

# This is why we recommend using the read-only ‘svnlook‘utility.

# In the future, Subversion may enforce the rule that pre-commit

# hooks should not modify the versioned datain txns, or elsecome

# up with a mechanism tomake it safe to doso (by informing the

# committing client of the changes). However, right now neither

# mechanism is implemented, so hook writers just have to be careful.

#

# Note that‘pre-commit‘ must be executable by the user(s) whowill

# 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

#‘pre-commit.bat‘ or ‘pre-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 isforthe

# 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/shinterpreter.

# Formore 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"TXN="$2"# Make sure that the log message contains some text.

SVNLOOK=/usr/bin/svnlook

LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c`if [ "$LOGMSG" -lt 5];then

echo -e "注释信息不能为空且不少于5个字!" 1>&2exit1

fiexit0

回答: 在IDEA中修改已提交SVN版本备注是不直接支持的。SVN默认情况下不允许开发人员修改已提交版本的日志信息。如果你想修改已提交的版本备注,你需要联系SVN管理员安装pre revprop change hook。这个hook是一个钩子脚本,它可以在修改版本属性之前执行一些操作。通过这个hook,你可以实现修改已提交版本备注的功能。\[1\] 另外,如果你想重新输入新的SVN账号,你需要清除SVN的账号缓存。SVN会将你输入的账号信息缓存起来,导致认证失败。你可以找到SVN存储账号的目录,一般在~/.subversion/auth/svn.simple目录下,删除相应的账号文件即可重新输入新的账号信息。\[2\] 如果你想查看SVN修改的文件记录,可以使用一些SVN命令。比较常用的是svn log命令,它可以展示SVN的版本作者、日期、路径等信息。另外还有svn diff命令,用来显示特定修改的行级详细信息;svn cat命令,可以取得在特定版本的某文件并显示在当前屏幕;svn list命令,可以显示一个目录或某一版本存在的文件。这些命令可以帮助你查看SVN的修改记录。\[3\] #### 引用[.reference_title] - *1* *2* *3* [IntelliJ IDEA SVN的账号修改 信息清除](https://blog.csdn.net/weixin_29191761/article/details/113568313)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值