Mercurial 管理多个存储库
我们有一个存储库 myproject
- 由于该存储库即将发布,我们正在创建 myproject-1_0
。版本 2 开发将在 myproject
中继续,而细微的调整和错误修复将在 myproject-1_0
中进行。将 myproject-1_0
更改合并到 myproject
的最佳方法是什么?
这是最好的方法吗:
$ cd myproject
$ hg pull ../myproject-1_0
$ hg merge
$ hg commit -m 'Merge bugfix from 1.0 branch'
$ hg push
?
如果我们在 2 月 1 日进行合并,然后在 myproject-1_0
中进行更多更改,会发生什么情况?我们是否会再次按照这些步骤操作,hg pull ../myproject-1_0
只会拉取 2 月 1 日拉取后完成的变更集?
在 myproject
存储库中,有没有办法执行 hg log
并确定哪些变更集来自 myproject-1_0
以及哪些变更集来自 <代码>我的项目?
关于这种一般方法还有其他建议吗?
We have a repository myproject
- as the repo is nearly ready for release we are creating myproject-1_0
. Version 2 dev will continue in myproject
while minor tweaks and bug fixes will go in myproject-1_0
. What is the best way to merge myproject-1_0
changes into myproject
?
Is this the best approach:
$ cd myproject
$ hg pull ../myproject-1_0
$ hg merge
$ hg commit -m 'Merge bugfix from 1.0 branch'
$ hg push
?
What would happen if we did this merge on Feb 1st, then we made more changes in myproject-1_0
? Would we follow the steps again and the hg pull ../myproject-1_0
would just pull the changesets done after the pull on Feb 1st?
In the myproject
repo, is there a way to do an hg log
and determine which changesets came from myproject-1_0
and which ones came from myproject
?
Are there any other recommendations about this general approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
按顺序提问:
hg日志
并确定哪些变更集来自myproject-1_0
? - 否不幸的是,除非您开始处理命名分支,否则源自其他存储库的变更集看起来与主存储库中的变更集没有什么不同。
Questions in sequence:
hg log
and determine which changesets came frommyproject-1_0
? - noUnfortunately, unless you start mucking about with named branches, changesets that originate in the other repository looks no different from the ones in your main repository.
这就是 Mercurial 的设计目的,
我建议您查看 http://www.hginit.com 。但是您要问的是,当您拉取更改时,它是否只会拉取自上次拉取以来的更改,是的。不过,您无法分辨哪些变更集来自不同的克隆,在您正在考虑的想法中仅跟踪用户名。
如果您想知道事情来自哪里,您可以在提交消息中执行此操作。
So this is what Mercurial is designed to do
I would suggest taking a look at http://www.hginit.com. But what you're asking if when you pull changes will it only pull the changes since the last pull, yes. You can't tell which changesets came from a different clone though, only user names are tracked in the idea that you are thinking about.
If you want to know where things are coming from this is something you can do in commit messages.