20070731 commit-email.pl FAIL 中文
http://www.yippeesoft.com
[quote]
官方网站的http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/下提供了一些有用的钩子脚本下载,我们下载http://svn.collab.net/repos/svn/ … /commit-email.pl.in。
将commit-email.pl.in重命名为commit-email.pl,存放在D:\\svnroot\\下,然后找到下面这一行:
my $svnlook = "@SVN_BINDIR@/svnlook";
修改为:
my $svnlook = "D:/Subversion/bin/svnlook.exe";
然后来到D:\\svnroot\\project1\\hooks下,创建一个post-commit.bat文件,内容如下:
set REPOS=%1
set REV=%2
D:\\svnroot\\commit-email.pl "%REPOS%" "%REV%" rocksun@127.0.0.1 –from daijun@gmail.com
[/quote]
但是EMAIL格式古怪了,把邮件头放到邮件正文里面了
死活汉字变成了 ?\\227 之类的鬼东西
改天再弄吧
[quote]
post-commit
它在事务完成后运行,创建一个新的修订版本。大多数人用这个钩子来发送关于提交的描述性电子邮件,或者作为版本库的备份。版本库传给程序两个参数:到版本库的路径和被创建的新的修订版本号。退出程序会被忽略。
Subversion分发版本中包括mailer.py和commit-email.pl脚本(存于Subversion源代码树中的tools/hook-scripts/目录中)可以用来发送描述给定提交的email(并且或只是追加到一个日志文件),这个mail包含变化的路径清单,提交的日志信息、日期和作者以及修改文件的GNU区别样式输出。
Subversion提供的另一个有用的工具是hot-backup.py脚本(在Subversion源代码树中的tools/backup/目录中)。这个脚本可以为Subversion版本库进行热备份(Berkeley DB数据库后端支持的一种特性),可以制作版本库每次提交的快照作为归档和紧急情况的备份。
~
为SVN加入Email通知
可以通过Subversion的Hook脚本的方式为SVN加入邮件列表功能
编译安装了Subversion后 在源码的tools 下有一个comm-email.pl的Perl脚本,在你的档案目录下有一个hooks目录,进入到hooks目录把post-commit.tmpl 改名为post-commit并给它可执行的权限。
更改post-commit脚本 把comm-email.pl脚本的决对路径加上,否则 SVN找不到comm-email.pl
REPOS="$1"
REV="$2"
/usr/local/svn/resp/commit-email.pl "$REPOS" "$REV" email@address1.com email@address2.com
#log-commit.py –repository "$REPOS" –revision "$REV"
最后一行是用来记日志的 我不用这个功能 所以注释掉了
[/quote]
> Dmitry Y. Labutin wrote:
>
>> When I commit files with Russian filename I receive log message by
>> e-mail looks like this:
>> ———————————————————————
>> —
>> Author: kornyakov
>> Date: 2007-05-12 14:29:15 +0400 (Sat, 12 May 2007)
>> New Revision: 76
>>
>> Modified:
>> Working Versions/?\\208?\\162?\\208?\\181?\\209?\\133?\\208?\\189?\\208?
>> \\190?\\208?\\187?\\208?\\190?\\208?\\179?\\208?\\184?\\208?\\184/ITP/New Text
>> Document.txt
>> ———————————————————————
>> —
>>
>> I use commit-email.pl script.
>>
>> How can I fix this ?
>
> I don\’t know why svn log spits out this homegrown, half-baked Unicode
> encoding, it isn\’t documented anywhere, but I can tell you what it
> does: Non-ascii code points are encoded as the byte values of the
> utf-8 encoding in the form of three decimal digits, prefixed with \\?.
20070731 SVNNOTIFY post-commit
http://www.yippeesoft.com
[quote]
集成SVN源码管理和Mantis缺陷跟踪
集成SVN源码管理和Mantis缺陷跟踪
要集成Mantis和SVN,需要几个工具:
SVN客户端,有个windows下的很不错的工具,TortoiseSVN,完全集成在explorer里,下载地址: http://tortoisesvn.net/
SVN服务端,这个应该都有吧。
Mantis缺陷跟踪系统,用php开发。轻量级的缺陷跟踪系统。 http://www.mantisbt.org/
首先先在TortoiseSVN里设置一下项目的属性,右键点击目录,属性,在subversion一栏里,加入这几个属性
bugtraq:label = issue
bugtraq:url = my@email.address
reply_to =
generate_diffs = add copy modify
suppress_deletes = yes
如果不指定 from_addr 的話,From: 就會填入 committer 的使用者名稱。
[/quote]
标签:com, commit, not, post, svn, svnnotify0215 svn commit failed svnserve.conf
奇怪的问题
SVN1.3 +TSVN 1.30 本来好好的
今天升级了一下 TSVN1.31
结果本机的不能用了,可以增加,但是提交失败 没有详细信息
然而访问远端的却仍然OK
无论怎么卸载 重装 还是不行
有人提示:
重启机器,清空TSVN的密码缓存,禁用repository配置文件(svnserve.conf)的authz-db命令,再看看。
看了半天,COMMIT FAILED ,然而 DETAIL MORE又没有
跑到DOS下试验
svn: 提交失败(细节见下):
svn: 无法使用外部编辑器取得日志信息;请尝试设定 $SVN_EDITOR 环境变数,或是使用 -
-message (-m) 或 –file (-F) 选项
svn: 没有一个 SVN_EDITOR,VISUAL 或 EDITOR 环境变数被设定,执行时期的设定中也没
有 \’editor-cmd\’ 选项
然后加上-message 看到
svn: 提交失败(细节见下):
svn: 授权失败
看到这个 svnserve.conf – snvserve 的仓库配置文件
每个代码仓库都有一个 svnserve.conf 文件来控制 svnserve 守护进程的行为。这个文件位于仓库的 conf 子目录。
文件的结构与 Subversion 用户配置文件的结构类似。顶层是段落 (section),以方括号中的词指定;每个段落之中是 “variable=value\’\’ 形式的变量定义。以 `#\’ 开头的行被忽略。svnserve.conf 当前只使用一个段落,称为 “general\’\',并且支持如下变量:
anon-access = none&line;read&line;write
决定非授权用户的访问级别。write 访问允许所有的仓库操作。read 访问允许所有操作,除了提交和修改版本属性。none 不允许任何访问。默认级别是 read。
auth-access = none&line;read&line;write
决定授权用户的访问级别,使用与上面相同的访问级别。默认级别是 write。
password-db = filename
设置密码数据库的位置。filename 可能是相对仓库中 conf 目录的位置。没有默认值。密码数据库的格式与本文件相似。它只有一个段落 “users\’\';段落中的每个变量是一个用户名,每个值是一个密码。
realm = realm-name
设置仓库的授权域 (realm)。如果两个仓库拥有相同的密码数据库,它们应当在同一个域中,反之亦然;这样的关联可以允许客户端为多个仓库使用单一的密码缓存。默认域的值是仓库的路径,相对于服务器进程的虚根目录。
然后想起以前我都是用的 FILE:///,然而最近试验 SVN://,不知道是不是这个原因,打开 svnserve.conf
看到:### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
看意思好像是说 HTTP 和 FILE 方式不需要这个文件,那么SVN方式就是需要了
修改
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = write
OK。
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = write
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file\’s location is relative to the conf directory.
### Uncomment the line below to use the default password file.
# password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file\’s location is relative to the conf
### directory. If you don\’t specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository\’s uuid.
# realm = My First Repository
然而那个DB.LOCK很奇怪
This file is not used by Subversion 1.3.x or later.
However, its existence is required for compatibility with
Subversion 1.2.x or earlier.
Updating your Sandbox 更新你的沙盒www.yippeesoft.com
Occasionally you may want changes done by others to get incorporated in your local working copy. The process of getting changes from the server to your local copy is known as Updating. Updating may be done on single files, a set of selected files, or recursively on entire folder hierarchies. To update, highlight the files and/or folders you want, right-click and select CVS Update. The Progress Dialog will pop up displaying the progress of the update as it runs. 有时候你可能需要把别人的修改合并到你的本地拷贝当中来。这个从服务器获得修改合并到你的本地拷贝的过程称之为更新。你可以只对一个文件更新,也可以对多个文件,或者是整个文件夹递归更新。你首先选择你想要更新的文件或者文件夹,点击鼠标右键,选择 CVS更新。www.yippeesoft.com当在更新的时候,TCVS将弹出一个状态对话框显示过程。Figure 2.3. Updating Files and Folders 更新文件和文件夹
Changes done by others will be merged into your files, keeping any changes you may have done to the same files. The repository is not affected by performing an update. 别人的修改将合并到你的文件,你的修改仍然保留在同一个文件中,仓库不会受到更新操作的影响。If you receive reports of conflicts during the update, please read Resolving Conflicts. 如果你在更新过程中看到冲突的信息,请阅读 解决冲突 For more information see Getting Other People\’s Changes: CVS Update. 请参见 获得别人的修改:CVS更新获得更多资料www.yippeesoft.com
Committing your Changes to the Repository 提交你的修改到仓库中去
Making local modifications available in the repository is known as committing the changes. Before committing, you should do an update to make sure there are no conflicts (see Updating your Sandbox). www.yippeesoft.com让本地的修改同样体现到仓库中去,我们称之为 提交修改。在提交之前,你应该首先进行更新,确保文件没有冲突。To commit your changes start by selecting the file(s) or folder(s) that you want to commit. Right-click on the selection, and choose the CVS Commit… menu item. 同样选择文件或者文件夹,右键,选择提交对话框 Figure 2.4. Commit Dialog 提交对话框
You will then be presented with the Commit Dialog where you can enter a brief summary of what was changed. You can also exclude changed files from the commit by unchecking their checkboxes. Once you are satisfied with what you are committing, click the OK on the dialog to go ahead with the commit operation. 你可以在提交对话框中输入简要的修改说明,去掉文件的勾选,表示排除这些文件提交。如果你已经确认OK,www.yippeesoft.com那么点击确定按钮开始提交吧。
Please note that committing changes will not automatically add new files that you have created to the repository. See Adding Files and Directories to the Repository on how to add files. 请注意提交修改不能知道增加你创建的新文件,www.yippeesoft.com请参见 增加文件和文件夹到仓库
Resolving Conflicts 合并冲突
Sometimes, the CVS server will report a conflict when you update your files from the repository. A conflict occurs when two or more developers have changed the same lines of a file. As CVS knows nothing of your project, it leaves resolving the conflicts to the developers. 有时候当你从仓库更新你的文件的时候,CVS服务器将会报告文件冲突。如果两个或多个程序员修改了同一个文件的同一行,冲突就会产生。由于CVS对你的项目毫不知情,www.yippeesoft.com所以它只能让程序员自己解决冲突Each conflicting file is marked with a "C" in the progress dialog (see Progress Dialog). When the update is complete, the Resolve Conflicts dialog is shown: 每个冲突的文件会打上C标志显示在过程对话框中,当更新完成后,解决冲突对话框将会弹出 Figure 2.5. Resolve Conflicts Dialog
Right-click on the conflicting file(s) and select Merge Conflicts…. TortoiseCVS will now invoke the merge application that you have selected in Preferences/Tools/Merge application. Resolve each conflict, save the resulting file, and exit the merge application. TortoiseCVS will ask you to confirm that you want to save the result of the merge. 在冲突的文件上点击右键,选择合并冲突对话框,TCVS将调用你在 参数-工具-www.yippeesoft.com合并程序中指定的应用程序。解决完冲突,保存最终文件,退出合并程序,TCVS将询问你是否保存合并结果。
You can also bring up this dialog after closing the progress dialog by right-clicking in the sandbox and selecting the CVS → Resolve Conflicts… menu item. 你可以在关闭更新状态对话框后右键点击沙盒选择CVS -合并冲突 菜单项 www.yippeesoft.com再次显示 合并冲突对话框
标签:com, commit, tortoisecvs, update, 中文, 帮助