开发者

How to ignore some folder depending on the platform in SVN

开发者 https://www.devze.com 2023-02-02 00:41 出处:网络
We have an SVN tree which is used to compile our software on a variety of platforms (Win, OSX, Linux, Iphone, Android).

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:

  1. 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 :(
  2. Using the svn:ignore tag: I don't think this can be platform dependant. Can it?
  3. Have 开发者_Go百科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!


You can use svn co --depth and svn --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.

C> svn co --depth immediates %URL% mydir
C> cd my dir
C> helpcheckout.bat
Checking out tree for Windows...
[...]

$ svn co --depth immediates $URL mydir
$ helpcheckout.sh --platform linux
$ Checking out tree for Linux development...

Checkout these options under Sparse Directories in the Subversion online manual.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号