作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个看起来像这样的图形日志:
(snip)
| |
| o 1) Other Dev: Commit
| | \
o | | 2) Me: Commit
/ | | |
| | o | 3) Other Dev: Commits with an error
| |/| |
| o |/ 4) Me: Merge and commit
| /|
|/ |
o | 5) Me: Realize there were bugs in the commit and take earlier version to merge with
| o 6) Other Dev: Fixes error
o / 7) Me: committing some changes
|/
o 8) Me: Merge fixed tip
最佳答案
是的。 internal:local
内置合并工具。
$ hg merge 4 --tool internal:local
internal:other
选择其他版本的文件作为合并版本。
$ echo a >> a
$ hg ci -Am.
adding a
$ echo a >> a
$ hg ci -Am.
a
中放置冲突:
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b >> a
$ echo b >> b
$ hg ci -Am.
adding b
created new head
$ hg up 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg merge 2 --tool internal:local
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
a
上发生冲突。 .但是使用合并工具,我们告诉 Mercurial 在与 cset 合并的每个文件上获取第一个父级的版本。
$ hg st
M a
M b
$ cat a
a
a
$ cat b
b
关于Mercurial:有什么办法可以找到 "merge and discard changes"吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7475634/
我是一名优秀的程序员,十分优秀!