emacs is not breaking hard links for hg

I have a set of mercurial clones that I created by making one clone of a master repo, then using cp -rlp to make copies of it. My expectation was that I could use them independently, since I use emacs with its default settings, so it ought to be breaking hard links. But it isn't -- when I modify one file, all of the hard-linked "copies" change too. ls -i shows that they're all the same inode, as expected, and that their parent directories are different.

'backup-by-copying' is nil. 'make-backup-files' is t.

If I create a sample file, hard link it, and edit it, emacs breaks the link as desired.

Is there something about mercurial mode that subverts this? (The staus line says "Hg:50503", and I know I have some sort of mercurial awareness going on. It doesn't show up as a minor mode with Ctrl-H m though.)


This seems to answer your question: https://www.mercurial-scm.org/pipermail/mercurial/2008-July/020271.html

(Keyword: vc-make-backup-files)

链接地址: http://www.djcxy.com/p/38552.html

上一篇: 为什么emacs为修改后的文件创建临时符号链接?

下一篇: emacs不会破坏硬链接