-(defun vc-hg-ignore (file)
- "Ignore FILE under Mercurial."
- (with-temp-buffer
- (insert-file-contents
- (let ((hgignore (concat (file-name-as-directory (vc-hg-root
- default-directory)) ".hgignore")))
- (unless (search-forward (concat "\n" file "\n") nil t)
- (goto-char (point-max))
- (insert (concat "\n" file "\n"))
- (write-region (point-min) (point-max) hgignore))))))
+(defun vc-hg-find-ignore-file (file)
+ "Return the root directory of the repository of FILE."
+ (expand-file-name ".hgignore"
+ (vc-hg-root file)))