开发者

Putting changesets into a new branch in Mercurial

开发者 https://www.devze.com 2022-12-18 11:54 出处:网络
I\'m having the foll开发者_StackOverflow中文版owing problem: I commited two changesets into the default branch, but now I think I should put them into a new branch. That means I want to branch of from

I'm having the foll开发者_StackOverflow中文版owing problem: I commited two changesets into the default branch, but now I think I should put them into a new branch. That means I want to branch of from the revision before these changes happened, put those changesets into the newly created branch and erase them from the default branch's history. What's the best way to do this in Mercurial?


hg rebase can probably do that.

Otherwise you can do it manually:

 hg clone -r <previous rev> old new
 cd new
 hg branch <branchname>
 hg export -R ../old <first cset>  |hg import
 hg export -R ../old <second cset> |hg import
0

精彩评论

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