Mercurial回购中文件的不同版本 [英] Different version of file in Mercurial repo

查看:60
本文介绍了Mercurial回购中文件的不同版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个服务器具有相同的克隆Mercurial存储库,但是此存储库中的某些文件中的配置行不同.如何通过Mercurial控制此文件,但在服务器之间进行拉/按时没有问题?

I have 2 servers with same cloned Mercurial repo but with different config lines in some files in this repo. How can I control this files via Mercurial but haven't problem when pull/puss between servers?

推荐答案

您应该受版本控制:

  • 一个配置文件模板
  • 两个配置文件(每个环境一个)
  • 一个脚本能够获取配置文件模板,并根据环境使用正确的值填充它.
  • one config file template
  • two config file values (one per environment)
  • one script able to take the config file template and fill it with the right values depending on the environment.

那样,在拉/推过程中没问题.

That way, no problem during pull/push.

这篇关于Mercurial回购中文件的不同版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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