Mercurial 和特定文件分支
上下文:我有一个项目,其中包含 configs/
目录,其中包含(惊喜!)一组配置文件:database.php
、facebook .php
、twitter.php
、cache.php
等
我在 svn 中所做的事情:我为每个特定文件创建了分支并在那里进行了更改(更改了数据库连接、Facebook API 密钥等)。所以它们存储在我的私人分支中。
现在我正在尝试迁移到“现代”DSCM - Mercurial。我不可能做同样的事情。
有什么想法吗?
The context: i have a project, that contains configs/
directory, which contains (surprise-surprise!) a set of config files: database.php
, facebook.php
, twitter.php
, cache.php
, etc
What I did in svn
: I have created branches per specific file and made changes there (changed database connections, facebook API keys, etc). So they were stored in my private branch.
Now I'm trying to migrate to "modern" nowadays DSCM - Mercurial. And I cannot get any possibility of doing the same.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 #mercurial at irc.freenode.org 的建议,我提到修改我的代码,以便可以从存储在另一个存储库中的单独目录加载个人配置。
According to advices from #mercurial at irc.freenode.org i mentioned to modify my code so personal configs could be loaded from separate directory which is stored in another repo.
我将使用 hgbranch 来创建私有测试分支以及开发分支和发布分支。
hgbranchmock_settings
hgbranchdev
在 mock_settings 上进行私有测试更改,从 dev 合并到 mock_settings 进行设置测试。
这将测试设置从开发到发布分开。
I would use
hg branch
to create a private testing branch as well as a development branch and a release branch.hg branch mock_settings
hg branch dev
Make your private testing changes on mock_settings, merging from dev to mock_settings to do a settings test.
This compartmentalizes test settings from development from release.