简体   繁体   English

版本控制:一台远程服务器上的中央存储库和分支

[英]Version Control: Central repository and Branches on ONE remote server

There is a lot of reading regarding Centralized and Distributed Version Control, and i am now thinking about using Mercurial (or Git..) to serve a sort of 'Centralized Version Control' for one of our applications. 关于集中式和分布式版本控制,有很多读物,我现在正在考虑使用Mercurial(或Git ..)为我们的一个应用程序提供某种“集中式版本控制”。 One of the problems i face is, that due to the fact that our application's IP is registered with several Banks, and other PCI regulations involved, my developers would struggle to test their changes locally, it would just don't work. 我面临的问题之一是,由于我们的应用程序的IP已在数家银行注册,并且涉及其他PCI法规,因此我的开发人员将很难在本地测试其更改,否则将无法正常工作。 (Testing Payment Gateways implementation and other stuff) So, my only solution (correct me if i'm wrong) would be to setup a Centralized repository and developers owned repositories on the same (remote) server and file editing via ftp (or SSH)...where commits, clones, pushes and branches would take place remotely, not locally... and developers would test their changes in real time. (测试支付网关的实现及其他功能)因此,我唯一的解决方案(如果我错了,请纠正我)是在同一(远程)服务器上设置集中式存储库,开发人员拥有的存储库,并通过ftp(或SSH)进行文件编辑...提交,克隆,推送和分支将在远程而不是本地进行...,开发人员将实时测试其更改。 I am not even sure if any Version Control system would satisfy my needs. 我什至不确定是否有任何版本控制系统能够满足我的需求。 You guys always have great ideas, what would be my best bet for such situation? 你们总是有好主意,在这种情况下我最好的选择是什么?

I think, you went The Wrong and The Bad way with FTP|SSH 我认为,您使用FTP | SSH进入了“错误和错误的方式”

For any DVCS it's natural to have any amount of clones for repository(ies). 对于任何DVCS,为存储库提供任意数量的克隆都是很自然的。 It can be used in your case also with easy. 它也可以轻松用于您的情况。

Recipe (Mercurial in mind, still usable as idea for Git probably) will use clones+pushes+hooks 配方(考虑到水银,可能仍然可以用作Git的想法)将使用克隆+推子+挂钩

In deep: 在深处:

  • every team|developer have the usual local repository, in which local work have to be done and remote work collected with pulls from other team|Central Repo 每个团队|开发人员都有通常的本地存储库,必须在其中进行本地工作,并通过其他团队的拉动来收集远程工作| Central Repo
  • commits to local repo have to be replicated in hook into Central Repo, where all tests must be performed in Central Repository working dir, updated to tip state. 提交给本地仓库的提交必须通过钩子复制到中央仓库中,在该仓库中,所有测试都必须在中央仓库工作目录中进行,并更新为提示状态。 Due to 2-nd condition, hook on DEV-repo must be able to login to Central Repo in order to perform hg pull + hg up (because hg push doesn't update remote working dir after operation - maybe can be solved by hook on Cenral Repo and in this case only push from Dev will be OK in Dev-hook) 由于第二种情况,DEV-repo上的钩子必须能够登录到中央仓库才能执行hg pull + hg up (因为hg push在操作后不会更新远程工作目录-也许可以通过钩子解决Cenral Repo,在这种情况下,只能在Dev-hook中从Dev推送)

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

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