- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
quora 上有一篇关于 git 如何 merge 的漂亮文章:
http://www.quora.com/Git-revision-control/How-does-git-merge-work
我想知道 Mercurial 是否存在这样的事情。
我承认我这样做的动机是 Mercurial 在自动解决冲突方面似乎非常愚蠢,但是没有关于 mercurial 如何 merge 的具体信息,我无法为 Git 提出论据。 (也可能我疯了,方法是一样的,不管我在任何地方都找不到关于 HG 如何 merge 的信息。)
我也听说 HG 是 super 可配置的,所以如果有一种工具可以使 merge 不那么愚蠢,我很想听听。
作为 HG 似乎所做的愚蠢的一个例子,它与其他空值产生了许多冲突,例如:
<<<<<<<< local
[some new code...]
========
>>>>>>>> other
最佳答案
Mercurial 在很大程度上将 merge 留给了外部程序。看
https://www.mercurial-scm.org/wiki/MergeToolConfiguration
和
https://www.mercurial-scm.org/repo/hg/help/merge-tools
从最后一页:
Mercurial uses these rules when deciding which merge tool to use:
If a tool has been specified with the --tool option to merge orresolve, it is used. If it is the name of a tool in the merge-toolsconfiguration, its configuration is used. Otherwise the specified toolmust be executable by the shell.
If the "HGMERGE" environment variableis present, its value is used and must be executable by the shell.
If the filename of the file to be merged matches any of the patterns inthe merge-patterns configuration section, the first usable merge toolcorresponding to a matching pattern is used. Here, binary capabilitiesof the merge tool are not considered.
If ui.merge is set it will beconsidered next. If the value is not the name of a configured tool,the specified value is used and must be executable by the shell.Otherwise the named tool is used if it is usable.
If any usable merge tools are present in the merge-tools configurationsection, the one with the highest priority is used.
If a program named "hgmerge" can befound on the system, it is used - but it will by default not be usedfor symlinks and binary files.
If the file to be merged is not binary and is not a symlink, then"internal:merge" is used.
8.The merge of the file fails and must be resolved before commit.
Note: After selecting a merge program, Mercurial will by default attempt tomerge the files using a simple merge algorithm first. Only if it doesn'tsucceed because of conflicting changes Mercurial will actually execute themerge program. Whether to use the simple merge algorithm first can becontrolled by the premerge setting of the merge tool. Premerge isenabled by default unless the file is binary or a symlink.
关于mercurial - Mercurial 如何在内部 merge ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21637143/
如果你做一个 hg pull然后是 hg update (或 hg merge ),有没有办法解决这个问题?即:将您的存储库恢复到执行 hg pull 之前的状态? 我相信你可以做到hg update
我有一台带有 ssh 的服务器,我想将其用作中央存储库。但是我不能在上面安装 mercurial。因此,客户端如何在服务器上没有安装 mercurial 的情况下通过 ssh 推送到服务器。 谢谢 最
我们有一个专门的问题跟踪 (Redmine) 机器,它有一个 Mercurial 存储库(称为“Redmine 存储库”)。 Redmine 设置为使用该存储库,据我了解,Redmine 从未对该存储
一个 hg 存储库可以存在于我的本地文件系统上的另一个 hg 存储库中吗? 我正在拉取“sandbox”的 bitbucket wiki,我想知道是否应该将其放置在 repos/sandbox/wik
我有一个项目,我使用 Bitbucket 作为我的 HG 服务器,但我最近发现,作为一个单独的开发人员,我可以免费使用 Fogbugz/Kiln。我想将我的文件移至 Kiln,但我不想丢失我的历史记录
Mercurial 如何判断文件已被修改? 我问的原因是因为当我运行时 hg status它告诉我有几个文件被修改了。 但是,当我运行 hg diff 时没有变化要报告。 我有一个关于为什么会发生这种
我需要获取本地存储库中文件的特定版本/节点的内容,并将其写入临时文件。 我知道可以通过内部Mercurial API进行操作。 有内置命令或扩展名吗? 最佳答案 您可以使用 hg cat : hg c
这两个命令有什么区别(我想回滚到修订版 1): hg update -r 1 hg backout -r 1 --merge (在示例中提示修订为 3) 最佳答案 首先, update -r 1 将撤
我看到 mercurial 有效地压缩了存储库中的文件 (repo/.hg/store/data) 有人知道存储库文件使用哪种压缩吗? 谢谢。 最佳答案 Mercurial 存储库中有两个压缩级别:增
如果 Mercurial does not track file permissions默认情况下,它如何决定它创建的任何文件/目录的权限? 是否使用umask ?如果不是,它有什么用? 我有 rea
我已经阅读了很多关于 Mercurial 及其分支的信息,但是,我仍然是一个版本控制新手。 我目前正在做一个项目,我的任务是开发一个新模块。 我有一个“主”存储库,其中包含项目其余部分的最新代码,以及
尝试运行 hg update 时出现以下错误: abort: Operation not permitted: /var/www/simira/web/public/images/nomination
mercurial 如何处理拆分的文件?如果我创建一个分支并拆分一个文件会发生什么。我可以轻松地从修改原始未拆分文件的另一个分支中提取更改吗? 最佳答案 我只是做了一个小实验。我用一个大文件创建了一个
我想使用hg graft将变更集从一个分支复制到另一个分支。 但是,在变更集中修改的文件已在源分支中重命名(使用hg rename)-在要移植的变更集之前。 当我尝试时,我得到: scanning f
Annotate可以使您看到该行的最新更改,如果该更改是合并,那么我别无选择,只能浏览修订历史记录并查找下一次对其进行修改的情况。 我也尝试过hg grep -l '[contents of line
我有一个小项目,我从集市开始,作为练习bzr的练习。从那以后,我决定选择 Mercurial 。我如何将这个项目迁移到Hg? 最佳答案 我相信您的答案可以在here中找到。 本质上,您只需要运行 $
什么决定分支是否处于非事件状态?是否有客户使用的特定时间段? 我们有很多不活跃的分支。值得我们花时间关闭它们吗? 该文档似乎没有指定如何确定非事件分支: https://www.mercurial-s
假设我创建了一个存储库,添加 x 文件并提交。说大小是 初始提交后的 Mb。 有什么方法可以估计存储库在一年内会有多大? 如果代码行数增加了 10%,存储库会相应增长吗? 提交、分支、标签等的数量如何
我正在使用 Mercurial(特别是 Windows 上的 TortoiseHg)对 VBA 代码进行版本控制。任何尝试过这个的人都知道,只要在项目中的任何地方更改了该变量的任何声明(无论范围如何)
不幸的是,我已经清理了我的 Mercurial 货架,忘记了我需要进行一些更改。我有定期的文件系统备份,但不知道 Mercurial 在哪里存储搁置文件。有人可以告诉我在哪里看吗? Mercurial
我是一名优秀的程序员,十分优秀!