开发者

Mercurial managing multiple repositories

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 mypro开发者_开发知识库ject-1_0 and which ones came from myproject?

Are there any other recommendations about this general approach?


Questions in sequence:

  • Is this the best approach? - yes, unless you want to use named branches and keep everything in one repository
  • would just pull the changesets done after the pull on Feb 1st? - yes
  • is there a way to do an hg log and determine which changesets came from myproject-1_0? - no

Unfortunately, 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜