使用混帐,但推到mercurial? [英] using git but pushing to mercurial?
问题描述
我有一份新工作,但他们使用mercurial作为他们的版本控制,我的大部分经验都是使用git。我试图学习mercurial,但它分支的方式(即使像书签一样的扩展)对我来说完全没有意义。有谁知道在本地使用git的方法,但推到mercurial?
我已经尝试过hg-git插件,并且已经到了可以在git中提交的地步并将这些更改推送到远程mercurial回购,但我遇到的问题是,无论我发现什么教程,我似乎无法将新的更改从mercurial回到git(这使得整个事情在这一点上无用)。如果您有关于如何设置hg-git以推送到mercurial的链接,请让我知道。
解决方案(我认为)
根据Lazy Badger提出的评论,这是我认为的工作: http://ryanzec.com/index.php/blog/details/9
想一些时间,看看替代解决方案,同样的不平衡和弯曲,但不要自命不凡(我希望) - 3层架构链中的3个回购(2 Mercurial + 1 Git)
它们具有(本地)名称,如下所示:
调解员设置与解决方案1中的hg-repo几乎完全相同(hg-git,书签)在hgrc的[paths]部分中的详细信息 - 将成为Master和WorkHorse中的两个路径,以便能够在Master和WorkHorse中双向推送
工作流程:
- 调解员从主服务器拉出变更,推送到WorkHorse(变更集按原样呈现,没有折叠,与方案1相反) li>
- 全部(差不多?不确定是否合并)工作发生在WorkHorse上
- 调解员将WorkHorse中的变更推送至Master $ /
I have a new job however they use mercurial as their version control and most of my experience is with git. I try to learn mercurial but the way it does branching (even with extensions like bookmarks) just make absolutely no sense to me. Does anyone know of a way to use git locally but push to mercurial?
I have tried the hg-git plugin and have gotten to the point where I can commit in git and push those changes to a remote mercurial repo however the issue I am running into is that no matter what tutorial I have found, I can't seem to pull new changes from mercurial back into git (which makes the entire thing useless at this point). If you have a link on how to setup hg-git to work pushing to mercurial, please let me know of it.
The Solution (I think)
Base on the comments made by Lazy Badger, this is what I think will work : http://ryanzec.com/index.php/blog/details/9
解决方案Think some time, see alternative solution, same lopsided and crooked, but less pretentious (I hope) - 3 repos (2 Mercurial + 1 Git) in 3-tier architecture of chain
They have (local) names, used below:
- Master (hg) - central Mercurial repo of company
- Mediator (hg) - middleware for translating changesets, created as clone of Master
- WorkHorse (git) - final workplace, empty at start
Mediator have setting almost identical (hg-git, bookmarks) to hg-repo from solution 1, except one detail in [paths] section of hgrc - will be two path in in: Master and WorkHorse in order to be able pull|push in both direction, with Master and WorkHorse
Workflow:
- Mediator pull changes from Master, push to WorkHorse (changesets presented as is, without collapsing, contrary to solution 1)
- All (almost? not sure about merges) work happens on WorkHorse
- Mediator pull changes from WorkHorse, push to Master
这篇关于使用混帐,但推到mercurial?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!