comparison lisp/vc-hg.el @ 82245:36893fdf92ab

Change capitalization of VC backend names for new backends Revision: emacs@sv.gnu.org/emacs--devo--0--patch-842
author Miles Bader <miles@gnu.org>
date Fri, 03 Aug 2007 04:57:05 +0000
parents e126e09e6ac7
children 493b2df20f41
comparison
equal deleted inserted replaced
82244:9928f84fd32b 82245:36893fdf92ab
254 254
255 (defvar log-view-message-re) 255 (defvar log-view-message-re)
256 (defvar log-view-file-re) 256 (defvar log-view-file-re)
257 (defvar log-view-font-lock-keywords) 257 (defvar log-view-font-lock-keywords)
258 258
259 (define-derived-mode vc-hg-log-view-mode log-view-mode "HG-Log-View" 259 (define-derived-mode vc-hg-log-view-mode log-view-mode "Hg-Log-View"
260 (require 'add-log) ;; we need the faces add-log 260 (require 'add-log) ;; we need the faces add-log
261 ;; Don't have file markers, so use impossible regexp. 261 ;; Don't have file markers, so use impossible regexp.
262 (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)") 262 (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)")
263 (set (make-local-variable 'log-view-message-re) 263 (set (make-local-variable 'log-view-message-re)
264 "^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)") 264 "^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)")
397 ;; (defun vc-hg-unregister (file) 397 ;; (defun vc-hg-unregister (file)
398 ;; "Unregister FILE from hg." 398 ;; "Unregister FILE from hg."
399 ;; (vc-hg-command nil nil file "remove")) 399 ;; (vc-hg-command nil nil file "remove"))
400 400
401 (defun vc-hg-checkin (files rev comment) 401 (defun vc-hg-checkin (files rev comment)
402 "HG-specific version of `vc-backend-checkin'. 402 "Hg-specific version of `vc-backend-checkin'.
403 REV is ignored." 403 REV is ignored."
404 (vc-hg-command nil 0 files "commit" "-m" comment)) 404 (vc-hg-command nil 0 files "commit" "-m" comment))
405 405
406 (defun vc-hg-find-version (file rev buffer) 406 (defun vc-hg-find-version (file rev buffer)
407 (let ((coding-system-for-read 'binary) 407 (let ((coding-system-for-read 'binary)
434 (let ((hg-state (vc-state file))) 434 (let ((hg-state (vc-state file)))
435 (if (eq hg-state 'edited) 435 (if (eq hg-state 'edited)
436 (if (equal (vc-workfile-version file) "0") 436 (if (equal (vc-workfile-version file) "0")
437 "(added)" "(modified)") 437 "(added)" "(modified)")
438 ;; fall back to the default VC representation 438 ;; fall back to the default VC representation
439 (vc-default-dired-state-info 'HG file)))) 439 (vc-default-dired-state-info 'Hg file))))
440 440
441 ;; Modelled after the similar function in vc-bzr.el 441 ;; Modelled after the similar function in vc-bzr.el
442 (defun vc-hg-revert (file &optional contents-done) 442 (defun vc-hg-revert (file &optional contents-done)
443 (unless contents-done 443 (unless contents-done
444 (with-temp-buffer (vc-hg-command t 0 file "revert")))) 444 (with-temp-buffer (vc-hg-command t 0 file "revert"))))