简体   繁体   English

svn:外部和权限

[英]svn:externals and permissions

I am running an svn project with optional components - pulling from several external repositories, and a number of users with varying access permissions to these externals. 我正在运行一个带有可选组件的svn项目-从多个外部存储库中提取,并且许多用户对这些外部组件具有不同的访问权限。

The 'svn update' command aborts at the first project that it cannot retrieve. 'svn update'命令在无法检索的第一个项目中止。

Is there a better or standard methodology for svn:externals to allow successful checkouts for all users? svn:externals是否有更好或标准的方法来允许所有用户成功签出?

EDIT: I don't have ownership/control on the external projects to grant access, and mirroring the externals is not allowed by company policy. 编辑:我没有对外部项目的所有权/控制权以授予访问权限,并且公司政策不允许镜像外部。 Because the externals are in support of optional components, users with fewer permissions will obviously not be maintaining the optional components. 因为外部组件支持可选组件,所以权限较小的用户显然将不会维护可选组件。 However, they will still need to check out other externals, and 'svn up' is very order-dependent. 但是,他们仍然需要检查其他外部设备,并且“ svn up”与订单密切相关。

I realize fixing permissions and splitting into sub-repositories will make this a non-issue, but I am still interested to know if there is any middle ground. 我知道修复权限并拆分为子存储库将使其成为非问题,但是我仍然想知道是否存在任何中间立场。

What exactly do you want to happen if a user has access to a project, but not that project's externals? 如果用户有权访问一个项目,但不能访问该项目的外部,那么您究竟想发生什么? If the two are related strongly, then the user should have access to both. 如果两者密切相关,那么用户应该可以访问两者。 If the two aren't related strongly, then why are they being added as externals at all? 如果两者关系不强,那么为什么要将它们全部添加为外部对象呢?

You could perhaps give each user readonly access to all the externals, and write access only to those who need it. 您也许可以为每个用户提供对所有外部设备的只读访问权限,而仅将访问权限写给需要它的用户。

If this is a sufficiently huge problem, you could restructure your workspace so that you have a top level that consists just of externals references to the parts of the projects. 如果这是一个足够大的问题,则可以重组工作区,以便您拥有一个仅由对项目各部分的外部引用组成的顶层。 Then have different people use different top-levels to get the externals they need. 然后让不同的人使用不同的高层来获取所需的外部条件。

Needs a lot of management and thought tho. 需要大量的管理和思想。

Something like: 就像是:

/Projects
 /Project1
  /trunk
 /Project2External
  /tag1
/Workspaces
 /Project1
  /DevA - svn:external Project1/trunk Project2/tag1
  /DevB - svn:external Project1/trunk

But you'd have to be willing to restructure the project this way, and think about what to do when there's global changes to the externals. 但是您必须愿意以这种方式重组项目,并考虑在外部因素发生全局变化时该怎么做。 But, in this way, you'd still be working on the trunk of project1, so there's no additional fiddling around. 但是,以这种方式,您仍将在project1的主干上工作,因此没有其他麻烦。

I know this is an old thread, but I had a problem with externals from github with a different username and password from the svn repository. 我知道这是一个旧线程,但是我遇到了来自github的外部设备(使用与svn存储库不同的用户名和密码)的问题。 I do not want to lose the solution, so for posterity, here I go :) 我不想丢下解决方案,所以为了后代,我在这里:)

To update the local svn checkout: 要更新本地svn结帐:

svn switch --username <username> --password <password> http://svn.server/svn/exampleProject --ignore-externals

This will not update the externals! 这不会更新外部!

Now to update the externals using a different username and password: 现在使用其他用户名和密码更新外部设备:

svn up <path_to_external> --username <external_username> --password <external_password>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM