Histedit显示原始回购上存在冲突,但克隆上未显示 [英] Histedit shows conflicts on original repo but not on clone

查看:73
本文介绍了Histedit显示原始回购上存在冲突,但克隆上未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Mercurial存储库中将几个提交折叠成一两个,并且我正在使用histedit.由于我不太确定结果如何,因此我克隆了存储库,并尝试对该克隆进行操作. (我以前做过很多次,但是这次我有一些分支,而且我不确定如何处理它.最后,我在折叠时使用MQ来存储分支提交).

I want to collapse several commits into one or two in my Mercurial repository and I'm using histedit for it. Since I was not very sure how it would turn out, I've cloned my repo and tried the operation on the clone. (I've done it many times before, but this time I had some branches, and I wasn't sure how to deal with it. In the end, I've used MQ to store the branch commits while doing the collapse).

一切正常,没有冲突,也没有发生任何应有的事情.因此,我去尝试了原始存储库,瞧瞧,这里有合并冲突!

Everything's worked fine, no conflicts or anything, as it should be. So I've gone and tried it with the original repository, and lo and behold, there are merge conflicts!

这怎么可能?

我知道我可以拿出克隆并将其应用到原件上,而不必理会它,或者手动解决冲突,但是我想知道为什么会发生这种情况以及如何发生这种情况,并从中学习一些东西.

I know I can take the clone and apply it on the original and forget about it, or resolve the conflicts by hand, but I would like to know why and how this can happen, and learn something on the way.

推荐答案

好,我找到了!

我有一个预提交钩子,用于将clang格式应用于原始存储库中的提交,而不适用于克隆中的提交.它弄乱了提交(很好,正在做它的工作),从而引起了冲突.注释掉钩子之后,一切都会按预期进行.

I have a precommit hook, to apply clang-format to the commit in the original repository, but not in the clone. It was messing (well, doing its work) with the commits, causing the conflicts. After commenting out the hook, everything works as expected.

这篇关于Histedit显示原始回购上存在冲突,但克隆上未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆