2011-02-28 17 views
2

这将是一个很长的帖子...对不起前期。关于Mercurial Security +子库的递归签名

我在试图围绕如何将每个项目分支的存储库放在一起,以及这对团队的影响。

眼下,似乎

  • 可以递归签的 嵌套签入代码虽然汞柱状态 没有给出太多信息的文件嵌套式回购
  • 内 改变它 看来,我 - - 以及想要在相同的 项目上工作的每个团队成员 - 必须手动编辑他们的 子存款'.hgrc文件,以便按照 的顺序进行检查s和 尽可能自动化。
  • 可以 递归签入,但递归的 签出不受支持。

这是对汞能力的正确分析吗?

我真的希望不是,因为这是一个很多更棒移编码(即命令提示符下摆弄所有的地方),比一般的开发团队我见过可以处理,而其余的生产力。正如我所了解的那样,重构单个程序集可能会导致团队停止编辑.hgrc文件以添加位置,用户和密码。没有?

我真的想仔细检查汞是否无法递归拉动?听起来像这样的遗漏,我觉得我一定错过了什么。

谢谢!我为解决引用其他库模块的引用库模块的项目问题而一直保留的注意事项如下所示(对于勇敢或愚蠢的(以及有用的情况下)注意???? ???质询中穿插其中......

MERCURIAL 

# requires an .hgsub with a ref to either 
# an Hg Repo for only one Bin...? 
# a website download...is that possible? 
# an svn repo that allow referencing just one folder in it 
# eg: "BIN/A3rdParty = svn:^/BinCache/A3rdParty/bin" 


LibA\ 
    hg\ 
     .hgrc 
     # ??? QUESTION ??? 
     # does each user have to edit their own files by hand 
     # to allow automatic push/pull? 
     # "default = https://user:[email protected]/xact/liba" 
     # "default-push = https://user:[email protected]/xact/liba" 
    .hgsub 
    # Map of nested repos as follows: 
    # "BIN/A3rdParty = svn:^/BinCache/A3rdParty/bin" 
    # "EXT/LibA = https://bitbucket.org/xact/liba" 
    # "EXT/LibB = https://bitbucket.org/xact/libb" 
    LibA.sln 
    BIN\ 
     [A3rdParty\SomeLib.dll] 
    EXT\ 
    SRC\ 
     LibA\LibA.csproj 
     # ...which References "..\..\BIN\A3rdParty\SomeLib.dll" 
     LibA.Tests\LibA.Tests.csproj 
     # ...which References "..\LibA\LibA.csproj" 


LibB\ 
    hg\ 
     .hgrc 
     # ??? QUESTION ??? 
     # does each user have to edit their own files by hand 
     # to allow automatic push/pull? 
     # "default = https://user:[email protected]/xact/libb" 
     # "default-push = https://user:[email protected]/xact/libb" 
    .hgsub 
    # that contains: 
    # "BIN/A3rdParty = svn:^/BinCache/A3rdParty/bin" 
    # "EXT/LibA = https://bitbucket.org/xact/liba" 
    # ??? QUESTION ??? 
    # do end users add user/pwd info here? or in the 
    # nested repos .hgrc file? 
    LibB.sln 
    BIN\ 
     [A3rdParty\SomeLib.dll] 
    EXT\ 
     LibA\ 
       hg\ 
       .hgrc 
       # ??? QUESTION ??? 
       # does each user have to edit their own files by hand 
       # to allow automatic push/pull? 
       # "default = https://user:[email protected]/xact/liba" 
       # "default-push = https://user:[email protected]/xact/liba" 
       LibA.csproj 
       # ...which References "..\..\BIN\A3rdParty\SomeLib.dll" 
       LibA.Tests\LibA.Tests.csproj 
       # ...which References "..\LibA\LibA.csproj" 
    SRC\ 
     LibB\LibB.csproj 
     # ...which References "..\..\EXT\LibA\LibA.csproj" 
     LibB.Tests\LibB.Tests.csproj 
     # ...which References "..\LibB\LibB.csproj" 


ProjA\ 
     hg\ 
     .hgrc 
     # ??? QUESTION ??? 
     # does each user have to edit their own files by hand 
     # to allow automatic push/pull? 
     # "default = https://user:[email protected]/xact/proja" 
     # "default-push = https://user:[email protected]/xact/proja" 
     .hgsub 
     # that contains: 
     # "BIN/A3rdParty = svn:^/BinCache/A3rdParty/bin" 
     # "EXT/LibA = https://bitbucket.org/xact/liba" 
     # "EXT/LibB = https://bitbucket.org/xact/libb" 
     # ??? QUESTION ??? 
     # do end users add user/pwd info here? or in the 
     # nested repos .hgrc file? 
     BIN\ 
      [A3rdParty\SomeLib.dll] 
     EXT\ 
      LibA\ 
       hg\ 
       .hgrc 
       # ??? QUESTION ??? 
       # does each user have to edit their own files by hand 
       # to allow automatic push/pull? 
       # "default = https://user:[email protected]/xact/liba" 
       # "default-push = https://user:[email protected]/xact/liba" 
       LibA.csproj 
       # ...which References "..\..\BIN\A3rdParty\SomeLib.dll" 
       LibA.Tests\LibA.Tests.csproj 
       # ...which References "..\LibA\LibA.csproj" 
      LibB\ 
       hg\ 
       .hgrc 
       # ??? QUESTION ??? 
       # does each user have to edit their own files by hand 
       # to allow automatic push/pull? 
       # "default = https://user:[email protected]/xact/libb" 
       # "default-push = https://user:[email protected]/xact/libb" 
       LibB\LibB.csproj 
      # ...which References "..\..\EXT\LibA\LibA.csproj" 
      # Important: note that it is same path offset 
      # as when within context of LibB.sln 
      LibB.Tests\LibB.Tests.csproj 
      # ...which References "..\LibB\LibB.csproj" 
     SRC\ 
      ProjA\ProjA.csproj 
      ProjA.Tests\ProjA.Tests.csproj 
+0

你是什么意思的“递归结帐”? – 2011-02-28 07:05:26

+0

您可以在系统上存储您的凭证一次,但除非您安装密钥环扩展并使其工作,否则密码将以明文形式显示。如果这没关系,让我知道,我会告诉你如何做到这一点。这将删除任何需要编辑存储库中的hgrc文件以添加身份验证。 – 2011-02-28 07:06:36

+1

这听起来像是你应该在[email protected]与我们讨论的东西,而不是放在这里。 StackOverflow不是访问Mercurial社区的正确方法。 – 2011-02-28 09:50:23

回答

0

我会尽量回答大家的一些问题,虽然我真的觉得你应该跟我们讨论这个问题,而不是在做问答&一个here 。

现在看来,

  • 可以递归嵌套签签入的代码虽然汞地位并没有给嵌套式回购中对文件的更改很多信息

见短hg status --subreposhg status -S

  • 看来,我 - 谁希望在同一个项目,每一个团队成员 - 具有手动编辑,以使签为无痛性和自动化尽可能他们subrepositoies' .hgrc文件。

没有必要把usernamed和密码进入.hg/hgrc文件 - 您应该改为配置caching of HTTP credentials in Mercurial

  • 可以递归签入,但不支持递归签出。

签出即更新是递归的。当您执行hg clone以获取本地存储库时,则Mercurial将注意到.hgsub.hgsubstate文件,并且它将递归克隆其中引用的子存储库。

而且我真的想仔细检查Hg是否无法递归拉动?听起来像这样一个遗漏,我觉得我一定错过了什么。

是的,你错过了Mercurial如何知道你想要的子库。请参阅文档on the wikithe Kick Start guide

+0

编辑hgrc文件,可能会添加验证,以避免在每次推送时输入用户名/密码X次。 – 2011-02-28 10:01:31

+0

感谢Lasse,我刚刚在问题结尾处阅读了关于笔记的大博客,这让我得出了同样的结论。 – 2011-02-28 10:02:35

+0

@Martin:谢谢你的回应。 **关于hg状态-S ** 昨晚发现命令切换。太好了:现在可以看到我在subrepos中做了什么。 – Ciel 2011-02-28 20:35:21