如何在命令行中跨多个外部执行单个 SVN 提交? [英] How can I do a single SVN commit across multiple externals at the command line?

查看:25
本文介绍了如何在命令行中跨多个外部执行单个 SVN 提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是不可能的,但我还是要问一下.

This may be impossible, but I'm going to ask anyway.

没有详细说明为什么会这样,我有两个主要的结帐工作,一个用于生产发布分支,一个用于主干.它们中的每一个都是 svn:externals 对子项目的引用的小集合,在检出的 svn 目录下没有直接内容.

Without going into the details of why it's like this, I have two primary checkouts that I work in, one for the production release branch, and one for trunk. Each of them is a small collection of svn:externals references to sub-projects, with no direct content under the checked-out svn directory.

也就是说,四个 svn:externals 指令添加了每个结帐目录中的所有内容.

That is, the four svn:externals directives add all of the content in each of the checkout directories.

当我通过 Eclipse(/Subclipse) 进行提交时,我可以一次性提交所有外部项目的更改,这很好,因为它们只是同一个存储库中的单独子项目,这使我能够避免连续对同一个 repo 进行 4 次单独的提交.

When I do a commit via Eclipse(/Subclipse) I can commit changes across all of the external projects in one go, which is good because they're just separate sub-projects in the same repository and this allows me to avoid doing 4 separate commits in a row to the same repo.

难道不能从命令行做同样的事情吗?每个外部的提交当然可以编写脚本并别名为一个命令,但如果可能的话,我宁愿避免将提交日志与相关更改的单独提交混淆.

Is it not possible to do the same thing from the command line? Commits for each of the externals could certainly be scripted and aliased to one command, but I'd rather avoid cluttering the commit log with separate commits for related changes if possible.

推荐答案

不幸的是,您的假设是正确的.当前的 subversion 命令行工具不会在提交期间递归到脱节的外部工作副本.Eclipse 可能会发现它的根都相同并调整了所有内容,以便它只执行单个提交事务.

Unfortunately, your assumption was correct. The current subversion command line tool will not recurse into disjointed externals working copies during a commit. Eclipse probably figures out that it's all rooted the same and adjusts everything so that it's only doing a single commit transaction.

客户端的这个缺点实际上被列为在您的项目中定义外部对象时需要注意的问题之一.从 1.6.1 客户端开始,此限制仍然存在.

This drawback of the client is actually listed as one of the issues to watch out for when defining externals in your project. As of the 1.6.1 client, this limitation still exists.

这篇关于如何在命令行中跨多个外部执行单个 SVN 提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆