2012-03-06 50 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