svn – 从Subversion提交相对外部

我们的Subversion存储库有几个子目录,包含共享文件以及每个项目的子目录.使用相对svn:externals属性设置项目,以将共享目录拉出存储库并将其设置为子目录.

所以,例如,我们的repostory看起来像这样:

client
shared
portable
app1
app2

和app1有svn:externals

../shared shared
../portable portable

因此,在结账时,便携式和共享可用作app1的子目录.

TortoiseSVN有一个很好的功能,即在app1上进行提交将自动检测外部子目录,意识到它们都是同一个存储库的一部分,并且
将所有更改作为同一提交的一部分提交.但是,我无法弄清楚如何从命令行客户端获取相同的行为.有什么建议?

最佳答案 此功能尚未实现.以下内容摘自
SVN ver. 1.5 book

Perhaps most disappointingly, the
working copies created via the
externals definition support are still
disconnected from the primary working
copy (on whose versioned directories
the svn:externals property was
actually set). And Subversion still
truly operates only on nondisjoint
working copies. So, for example, if
you want to commit changes that you’ve
made in one or more of those external
working copies, you must run svn
commit explicitly
on those working
copies—committing on the primary
working copy will not recurse into any
external ones.

我还检查了SVN 1.6 release notes,只有两个改进
已经制作了与svn:externals相关的内容.它们是:支持svn:externals中的文件,并支持外部定义中的常见shell引用规则.

也许,这不是一个值得实现的功能(这也是我的看法).通常,svn:externals用于将相对稳定的头/文件包含到某些依赖于它们的项目/应用程序中.通常它们引用某些修订的标签或路径.这是一个很大的问题,没有特别的答案,在这种情况下svn客户端应该做什么.

点赞