这个 awk 脚本有什么替代品可以减轻颠覆之痛吗?
在我的开发服务器上,我运行 svn update 来部署错误修复或对 Web 应用程序代码的更改。通常我运行:
svn stat --show-updates
然后有选择地选择要更新的文件;将选定的文件附加到 svn update 命令的末尾。
我怀念 GIT 的命令行界面,作为让步,我只是想提高执行更新的速度(但仅限于没有冲突的文件)。
例如,在下面的示例中,我只想更新 Country.properties
* 5602 conf/country/Country.properties
M 5331 conf/META-INF/MANIFEST.MF
M * 5451 conf/scripts/changes.rb
这是对我有用的 awk 代码片段。
#!/usr/bin/awk -f
/*/ { if( NF == 3 ) { system( "svn up " $3 ); } }
我的问题:是否有 subversion 的扩展,其作用类似于 GIT 的 git add -i 命令?或者人们做我正在做的事情是很正常的吗?
On my development server, I run svn updates to deploy bug fixes or changes to the webapp's code. Normally I run:
svn stat --show-updates
and then selectively chose which files to update; appending the selected files to the end of a svn update command.
I miss GIT's command line interface and as a concession, I just want to improve the speed of performing the updates (but limited to files which do not have conflicts).
e.g. In the following example, I only want to update Country.properties
* 5602 conf/country/Country.properties
M 5331 conf/META-INF/MANIFEST.MF
M * 5451 conf/scripts/changes.rb
This is the awk snippet that does the trick for me.
#!/usr/bin/awk -f
/*/ { if( NF == 3 ) { system( "svn up " $3 ); } }
My question: Is there an extension to subversion that will act like GIT's git add -i command ? Or is it pretty normal for people to do what I'm doing ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确的话,您需要一个交互式 UI(类似于 git add -i),它可用于选择工作副本中的哪些文件要从中央存储库更新。如果是这样的话,那么我必须同意 unwind 的评论,即通常不应该进行部分树更新(无论使用哪种 VCS)。因此,我认为我从未见过可以轻松进行部分更新的 SVN UI,更不用说使用一组远程更改的文件作为起始基础的部分更新了。
If I understand you correctly, you want an interactive UI (a la
git add -i
) which can be used to select which files in your working copy to update from the central repository. If that's the case, then I have to agree with unwind's comment that one shouldn't generally be doing partial tree updates (regardless of which VCS is being used). Accordingly, I don't think I've ever seen an SVN UI that makes it easy to do partial updates, let alone partial updates that use the set of remotely changed files as a starting base.