如何在SVN中根据平台忽略某些文件夹
我们有一个 SVN 树,用于在各种平台(Win、OSX、Linux、Iphone、Android)上编译我们的软件。
我们对所有应用程序使用相同的树,以保持简单和干净。
这很有效,但签出时间开始成为一个问题,因为我们需要签出每个平台的所有依赖项(依赖项位于嵌套子文件夹中)。
是否可以配置 SVN 以忽略某些文件夹,具体取决于执行结帐的平台?
我们有一些想法:
- 在每个平台客户端中使用不同配置的全局忽略模式,排除树的一部分。缺点:我们需要改变我们的树以获得一种不排除确实需要的东西的单一模式。我们目前不:(
- 使用 svn:ignore 标签:我认为这与平台无关。可以吗?
- 为每个平台使用不同的根文件夹,然后使用“externals”仅链接所需的内容(这有很多工作需要维护)
有人有这方面的经验吗?
谢谢!
We have an SVN tree which is used to compile our software on a variety of platforms (Win, OSX, Linux, Iphone, Android).
We use the very same tree for all applications in order to keep things simple and clean.
This works great but checkout times is starting to be an issues since we need to checkout all dependencies for each and every platform (dependencies are in nested subfolders).
Is it possible to configure SVN in order to ignore some folders depending on the platform that is performing checkout?
Some ideas we have:
- Using a global ignore pattern configured differently in every platform client which excludes part of the tree. Drawback: we would need to change our tree in order to have one single pattern which does not exclude something that is indeed needed. We currently don't :(
- Using the svn:ignore tag: I don't think this can be platform dependant. Can it?
- Have a different root folder for each platform and then use "externals" to link only what is required (this is a lot of work to be maintained)
Does anyone have experience with this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 svn co --deep 和 svn --set-deep 来规避您不想签出的内容。指定每个目录可能会有点乏味,但您可以将 shell 和批处理脚本放在工作目录的根目录中以帮助您完成此任务。
查看 Subversion 在线手册中稀疏目录下的这些选项。
You can use
svn co --depth
andsvn --set-depth
to circumvent stuff you don't want to checkout. It can get a bit tedious specifying each directory, but you could put shell and batch scripts in the root of the working directory to help you in this endeavor.Checkout these options under Sparse Directories in the Subversion online manual.