如何把多个文件到同一个文件夹使用svn:外部 [英] How to bring in multiple files into the same folder using svn:externals

查看:311
本文介绍了如何把多个文件到同一个文件夹使用svn:外部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一对夫妇的Subversion版本库的看起来像:

I have a couple of Subversion repositories that look like:

/Core
  /trunk
    /External
      /LibraryA
        - LibraryA.dll
        - LibraryA.pdb
      /LibraryB
        - LibraryB.dll
        - LibraryB.pdb

/Website
  /trunk
    /Website
      ...
      /Bin
      ...

我想包含在/核心/主干/外部/ LibraryA的和文件,使/核心/主干/外部/ LibraryB到该文件夹​​/网站/主干/网站/斌使用svn:外部使用下面几行:

I would like to bring in the files contained in /Core/trunk/External/LibraryA and /Core/trunk/External/LibraryB into the folder /Website/trunk/Website/Bin using svn:externals using the following lines:


  • / SVN /核心/主干/外部/ LibraryA的@ HEAD斌

  • / SVN /核心/主干/外部/ LibraryB @ HEAD斌

当我添加上面行的svn:外部的/网站/主干/网站文件夹的属性,从后者行带来了文件覆盖文件从原线带来的,所以我结束了:

When I add the above lines to the svn:externals property of the /Website/trunk/Website folder, the files brought in from the latter line overwrite the files brought in from the former line, so I end up with:

/Website
  /trunk
    /Website
      ...
      /Bin
        - LibraryB.dll
        - LibraryB.pdb
      ...

有人建议可以做它的正确方法吗?我想直到结束:

Can someone suggest the right way of doing it? I would like to end up with:

/Website
  /trunk
    /Website
      ...
      /Bin
        - LibraryA.dll
        - LibraryA.pdb
        - LibraryB.dll
        - LibraryB.pdb
      ...

如果我可以在网站转换成一个ASP.NET Web应用程序项目,我可以以不同处理它。就目前情况来看,该项目必须保持一个ASP.NET网站项目,所以这是我与工作的约束。

If I could convert the Website into an ASP.NET Web Application project, I could have dealt with it differently. As things stand, this project has to remain an ASP.NET Web Site project, so that's a constraint I am working with.

更新:

要实现我想要实现的,我有一个库文件夹,这样我结束了以下结构下,中拉两个库到自己的文件夹:

To achieve what I wanted to achieve, I have pulled in the two libraries into their own folders under a Libraries folder such that I end up with the following structure:

/Website
  /trunk
    /Website
      ...
      /Bin
          - LibraryA.dll *
          - LibraryA.pdb *
          - LibraryA.dll.refresh +
          - LibraryB.dll *
          - LibraryB.pdb *
          - LibraryB.dll.refresh +
      /Libraries
        /LibraryA
          - LibraryA.dll +
          - LibraryA.pdb +
        /LibraryB
          - LibraryB.dll +
          - LibraryB.pdb +
      ...

我接着又说了两个库的网站作为参考,按照需要提取所有的库。当一个增加的库作为一个ASP.NET网站项目引用,系统会创建.REFRESH文件(如上图所示)。只有那些.REFRESH文件应该从/ Bin文件夹进行签到。其他所有文件和文件夹应该添加到Subversion通过SVN忽略列表:忽略

I have then added the two libraries to the website as references, which pulls in all of the libraries as needed. When one adds libraries as references to a ASP.NET Web Site project, the system creates .refresh files (as shown above). Only those .refresh files should be checked in from the /Bin folder. All other files and folders should be added to the Subversion ignore list via svn:ignore.

需要明确的是:在标有星号上面的上市文件应该被添加到SVN:忽略,而标有+的文件应该被添加到Subversion

To be clear: the files in the above listing marked with an asterisk should be added to svn:ignore, whereas the files marked with a + should be added to Subversion.

推荐答案

我怀疑这可能是简单地使用外部。外部基本上只是说自动检查了这一点,在这里和更新它,当我更新资源库的其余部分。如果你能做到这一点,你需要能够存储大约两个仓库在同一目录中的信息,和SVN不允许。

I doubt this is possible simply using externals. An external is basically just saying "automatically check this out here and update it when I update the rest of the repository". If you could do this, you would need to be able to store information about two repositories in the same directory, and SVN doesn't allow that.

您的有什么能的考虑这样做是创建 NTFS符号链接以这些文件,签出别的地方(可以使用外部来完成)。您可以使用该MKLINK在Windows Vista和更高版本。 2000年/ XP / 2003中,可以使用 CreateHardLink ,以创建硬链接,而不是 - 可能有这样做的一个工具,但我不知道任何特定的一个

What you could consider doing is to create NTFS symlinks to those files, checked out somewhere else (which could be done using externals). You can use the mklink for that on Windows Vista and later. On 2000/XP/2003, you can use the CreateHardLink to create a hard link instead - there's probably a tool to do that, but I'm not aware of any specific one.

当然,你也可以用在Vista硬链接以后,如果你preFER - MKLINK允许这一点。但是请注意,该硬链接只能指向文件相同的体积,它的符号链接不需要上

Of course, you can also use hard links on Vista and later, if you prefer - mklink allows that as well. Note, however, that hard links can only point to files on the same volume, which symbolic links do not require.

这篇关于如何把多个文件到同一个文件夹使用svn:外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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