Mercurial将默认合并到命名分支 [英] Mercurial merging default into named branch
问题描述
我有一个非常简单的Mercurial存储库,除了 default
分支外,还有一个命名分支.
I have a pretty simple Mercurial repo that has one named branch in addition to the default
branch.
已进行更改并将其提交给 default
分支,我想将这些合并到我的命名分支中.但是, hg合并默认值
似乎并没有合并所有更改.
Changes have been made and committed to the default
branch and I want to merge those into my named branch. However, a hg merge default
does not seem to be merging in all of the changes.
例如:
hg update working
99 files updated, 0 files merged, 0 files removed, 0 files unresolved
hg status -m --rev default:working
大约有20个文件经过修改
there are about 20 files with modifications
M ... some list of files...
hg merge default
merging path/to/a/file/foo.java
3 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
hg status -m --rev default:working
现在有 still 个文件,但有一些修改本来可以合并的.
Now there are still file with modifications that I would have expected to get merged.
我可以做一个 hg diff -r default
,看看有没有被合并的更改.
I can do an hg diff -r default
and see that there are changes that are not getting merged.
这就是仓库的样子
@ changeset: 4:d41da580b434
| branch: working
| tag: tip
| parent: 1:3ed1c8bf91cf
| user: bob costas
| date: Tue Mar 24 10:13:25 2015 -0500
| summary: pr-1243 and minor updates
|
| o changeset: 2:ea0c249218fa
| | parent: 0:385565af3c13
| | user: bob costas
| | date: Mon Mar 23 15:09:42 2015 -0500
| | summary: bunch of updated files and fixes
| |
o | changeset: 1:3ed1c8bf91cf
|/ branch: working
| user: bob costas
| date: Mon Mar 23 13:38:59 2015 -0500
| summary: pr-1231
|
o changeset: 0:385565af3c13
user: bob costas
date: Thu Mar 19 18:15:52 2015 -0500
summary: initial commit
推荐答案
您没有提交合并..Mercurial告诉您:
You didn't commit your merge.. Mercurial told you :
hg merge default
合并path/to/a/file/foo.java已更新3个文件,1合并的文件,0个已删除的文件,0个未解决的文件(分支合并,不要忘记提交)
合并时,所有文件都会在源文件中保持修改状态,您需要提交它们
When you merge, all files stay modified in your sources, and you need to commit them
hg commit -m "merge with default"
然后您的分支将出现在日志中.
Then your branch will appear merged in the log.
这篇关于Mercurial将默认合并到命名分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!