[英]Auto-commit directory tree to SVN with Java
I want autocommit directory tree with files to svn with java tool. 我想用文件自动提交目录树到用Java工具svn。
There are shell and bat script 有壳和蝙蝠脚本
bat 蝙蝠
for /f "tokens=2*" %%i in ('svn status %1 ^| find "?"') do svn add "%%i"
for /f "tokens=2*" %%i in ('svn status %1 ^| find "!"') do svn delete "%%i"
svn commit -m "Automatic commit" %1
bash: 重击:
#!/bin/bash
echo "processing files to add..."
svn status | grep “^?” | sed -r ’s/^\?[ ]+//’ | xargs -r svn add
echo "processing files to delete..."
svn status | grep “^!” | sed -r ’s/^\![ ]+//’ | xargs -r svn delete
echo "processing commit..."
svn commit
They works, but I want java implementation for these scripts (ANT script, for example). 它们可以工作,但是我想要这些脚本(例如ANT脚本)的Java实现。 Is there java implementation?
有java实现吗?
SVNKit is a pure Java SVN library. SVNKit是一个纯Java SVN库。 I'm sure using SVNKit you could re-implement your scripts in Java.
我确定使用SVNKit可以重新实现Java脚本。
Be careful doing wildcard adds (or explicit, scripted adds), as they will bypass svn:ignore and global ignores. 请谨慎执行通配符添加(或显式,脚本添加),因为它们将绕过svn:ignore和全局忽略。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.