2012-03-06 56 views
2

在VC模式下有hg remove的emacs命令吗?我搜索了emacs手册,但只能找到vc-delete-fileemacs hg remove函数

C-x v v处理hg addhg commit基于文件的情况下,但我看不出你如何删除添加一次(从emacs的范围内)文件

回答

3

我不使用水银,所以我不能进一步评论,但我注意到,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将在这种情况下执行)

+0

我想知道为什么它的评论?我认为它是一种相当常见的用例,以希望从回购中删除一个文件,但不能删除它一起 – bph 2012-03-06 12:31:05

+0

我不知道,但也许你可以测试它在一次性库,如果按预期工作你可以提交一个错误报告('Mx report-emacs-bug'),指出该函数可以工作并且很有用,并且建议在将来的版本中将其取消注释。 – phils 2012-03-07 10:28:56