emacs hg删除功能

时间:2012-03-06 08:47:10

标签: emacs mercurial

VC模式下是否有hg remove的emacs命令?我已经搜索了emacs手册,但只能找到vc-delete-file

C-x v v根据文件的上下文处理hg addhg commit,但我看不到如何删除文件(从emacs中删除)

1 个答案:

答案 0 :(得分:3)

我不使用Mercurial,因此我无法进一步发表评论,但我注意到vc-hg.el包含以下注释函数:

;; FIXME: This would remove the file. Is that correct?
;; (defun vc-hg-unregister (file)
;;   "Unregister FILE from hg."
;;   (vc-hg-command nil nil file "remove"))

以及:

;; Modeled after the similar function in vc-bzr.el
(defun vc-hg-delete-file (file)
  "Delete FILE and delete it in the hg repository."
  (condition-case ()
      (delete-file file)
    (file-error nil))
  (vc-hg-command nil 0 file "remove" "--after" "--force"))

(后者是vc-delete-file将在此上下文中执行的内容)