有没有办法'extend' svn命令行预处理源文件

is there a way to 'extend' svn command line to preprocess source files

问题:我需要检查一些未完成的工作,以便团队可以开始测试。有一堆东西我不想提交。

这不是 git 或 svn 的解决方案。

Ignore specific changes to a file in git, but not the entire file

嗯...我可以在 shell 脚本中实现它,如果有办法 'extend' svn 添加 'preprocessor' shell 脚本。

基本上,编写一个 shell 脚本,在执行 'svn commit'.

之前去除由某个灵活符号界定的行

超出我的想象:

#pragma mark nocommit
#pragma mark endnocommit

有人做过吗?

我将#warning 放在我的工作副本中,出于多种原因我不需要其他人看到。但是,到了提交的时候,我不得不费力地编辑掉这些注释,然后在提交之后再把它们放回去。

示例:

示例:

我很乐意用 git/svn/etc 标记我的工作副本。将识别为我永远不想提交的内容,如下所示:

#pragma mark nocommit
#warning TODO... figure out why this mismatch happens when you drag/drop a clip?
##pragma mark endnocommit

与建议的其他 'non-solutions' 相比,这会节省我 soooooo 很多时间。

嗯...有人建议这个:

http://rpm.pbone.net/index.php3/stat/4/idpl/30087865/dir/opensuse_13.x/com/perl-App-GitHooks-Plugin-BlockNOCOMMIT-1.0.2-4.1.noarch.rpm.html

Git 支持一些钩子 explained here。对于您的情况, pre-commit 挂钩似乎是合适的。在提交到本地克隆之前,此挂钩会在本地计算机上运行。

Subversion 客户端 不支持挂钩,仅支持 Subversion 服务器 here and here。在中央服务器上添加这种挂钩通常不是轻而易举的事。因此,对于 SVN,您可以使用 shell 脚本包装器包装 svn 客户端,该包装器拦截 svn ci 和类似内容并执行检查。但这很容易被直接使用 SVN API 的 IDE 示例绕过。