关于Mercurial Security +子库的递归签入

时间:2011-02-28 00:28:23

标签: mercurial subrepos

这将是一个很长的帖子......对不起我。

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

现在,似乎

  • 可以递归签入代码 嵌套签到虽然hg状态 没有提供太多的文件信息 嵌套回购中的更改
  • 它 似乎我 - 和每个团队 想要同样工作的会员 项目 - 必须手工编辑他们的 subrepositoies'.hgrc文件按顺序 使签到无痛 尽可能自动化。
  • 能 递归检查,但递归 不支持结帐。

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

我真的希望不是,因为那是一个很多更多的移位编码(即命令提示摆弄整个地方),而不是我见过的普通开发团队可以处理的,而保持生产力。正如我所理解的那样,重构一个程序集可能会让团队陷入停顿,因为他们停止编辑.hgrc文件以添加位置,用户和密码。否?

我真的想仔细检查一下Hg不能递归拉?听起来像是一个遗漏,我觉得我一定错过了什么。

谢谢!

PS: 对于勇敢或愚蠢的(以及万一有帮助),我在处理引用其他库模块的库模块的项目问题时一直保留的注释如下(注意????问题穿插在他们身上......

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:pwd@bitbucket.org/xact/liba"
        # "default-push = https://user:pwd@bitbucket.org/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:pwd@bitbucket.org/xact/libb"
        # "default-push = https://user:pwd@bitbucket.org/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:pwd@bitbucket.org/xact/liba"
                # "default-push = https://user:pwd@bitbucket.org/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:pwd@bitbucket.org/xact/proja"
        # "default-push = https://user:pwd@bitbucket.org/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:pwd@bitbucket.org/xact/liba"
                # "default-push = https://user:pwd@bitbucket.org/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:pwd@bitbucket.org/xact/libb"
                # "default-push = https://user:pwd@bitbucket.org/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

1 个答案:

答案 0 :(得分:0)

我会尝试回答你的一些问题,虽然我真的认为你应该和我们讨论这个问题,而不是在这里做Q& A.

  

现在,似乎

     
      
  • 可以递归签入嵌套签到的代码,尽管hg status没有提供有关嵌套repos中文件更改的详细信息
  •   

简要说明hg status --subreposhg status -S

  
      
  • 看来我 - 以及每个想要在同一个项目上工作的团队成员 - 都必须亲自编辑他们的子存储库.hgrc文件,以便尽可能轻松地自动检查。< / LI>   

无需将用户名和密码放入.hg/hgrc文件中 - 您应该改为配置caching of HTTP credentials in Mercurial

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

结帐,即更新,是递归的。当您hg clone获取本地存储库时,Mercurial会注意到.hgsub.hgsubstate文件,它将递归克隆那里引用的子存储库。

  

我真的想仔细检查一下Hg不能递归拉?听起来像这样的遗漏,我觉得我一定错过了什么。

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