我可以检出 svn:externals 到父目录的根目录吗? [英] Can I check out svn:externals to the root of the parent directory?

查看:37
本文介绍了我可以检出 svn:externals 到父目录的根目录吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个 svn 存储库,一个用于 iOS 和 Android 版本的移动应用程序.该应用程序的两个版本共享相同的 SQLite 数据库.目前每个 repo 都有自己的数据库副本,这意味着更改必须应用两次.

I have two svn repositories, one each for the iOS and Android versions of a mobile app. Both versions of the app share an identical SQLite database. At present each repo has its own copy of the database, which means changes have to be applied twice.

相反,我想添加第三个包含数据库的存储库,并使用 svn:externals 在结账时将副本拉入工作文件夹中,以获取给定版本的应用程序.我能够设置外部文件,但是在结帐时它会在我的工作目录中创建一个子文件夹并将外部文件放在那里.我希望它在不创建子文件夹的情况下下拉外部文件.

Instead, I would like to add a third repo containing the database and use svn:externals to pull a copy into the working folder on checkout for a given version of the app. I was able to set up externals, but on checkout it creates a subfolder in my working directory and places the external file there. I want it to pull down the external file without creating a subfolder.

我尝试使用 ../ 作为外部定义中的本地路径,但没有成功.

I tried using . and ./ as the local path in the externals definition without success.

这是可能的还是我应该寻找其他方法?

Is this possible or should I look for another approach?

编辑 - 感谢 Manojlds 的一个很好的回答,我能够在它自己的单独存储库中使用数据库进行这项工作.我仍然有点困惑,因为 TortoiseSVN 文档特别指出:

Edit - Thanks to a good answer from Manojlds I was able to make this work with the database in its own separate repository. I'm still a little confused because the TortoiseSVN documentation specifically states that:

外部文件的 URL 必须与 URL 位于同一存储库中外部文件将被插入;存储库间文件不支持外部.

The URL for a file external must be in the same repository as the URL that the file external will be inserted into; inter-repository file externals are not supported.

我所指的文档可以在此处. 我添加了一个链接,以防有人遇到这个问题并且和我一样困惑.

The documentation I'm referring to can be found here. I'm adding a link in case someone comes across this question and is as confused as I was.

推荐答案

你应该能够做到:

svn propset svn:externals "^/path/sqlite.db sqlite.db" .

(上面的完整路径,如果它是一个不同的 repo - 为什么你需要一个不同的 repo?它可以是同一个 repo 中的不同文件夹,iPhone 和 Android 应用程序也是同一个 repo 中的单独项目.但是这是一个单独的讨论)

(full path above if it is a different repo - why do you need a different repo though? It can be a different folder within the same repo, with iPhone and Android apps being separate projects within the same repo as well. But that is a separate discussion)

这篇关于我可以检出 svn:externals 到父目录的根目录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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