svn和rST格式项目
我在提交 rST 文件时遇到一些问题,就像
===== TITLE ===== Chapter ======= Section ------- blablabla
我收到此错误一样:
Transmitting file data .svn: Commit failed (details follow): svn: Commit blocked by pre-commit hook (exit code 1) with output: Some parts of your commit look suspiciously like merge conflict markers. Please double-check your diff and try committing again.
我发现问题是 =
字符,可能它们与 diff 格式冲突,所以我替换了所有 =
> 与 _
现在它可以工作了,但它很难看。为什么会出现这个问题以及如何解决?
I've some problems committing a rST file like
===== TITLE ===== Chapter ======= Section ------- blablabla
I got this error:
Transmitting file data .svn: Commit failed (details follow): svn: Commit blocked by pre-commit hook (exit code 1) with output: Some parts of your commit look suspiciously like merge conflict markers. Please double-check your diff and try committing again.
I found that the problem are the =
characters, probably they conflict with diff format, so I substituted all =
with _
and now it works, but it it ugly. Why this problem and how to solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是字符串
=========
用于发生合并冲突的情况。一种解决方案是与预提交挂钩一起使用并使用其他内容,例如*==========
或==-==-====< /code> (也许只需要在该行前面加一个空格即可),或者禁用挂钩中的那段代码(如果它是脚本)。如果挂钩是一个应用程序,也许您可以更改一个配置来禁用这种类型的检查,但我会选择第一个选项。
The problem is that string
=========
is used in situations when there happens to be a merge conflict. One solution is to play along with pre-commit hook and use something else, like*=========
or===-===-===
(maybe just one space in front of the line would do), or disable that piece of code in the hook (if it's script). If the hook is an application maybe there is a configuration that you can change to disable this type of check, but I'd go with first option.