Mercurial > emacs
comparison lisp/vc-arch.el @ 85139:8ba0e30716a5
Terminology cleanup.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Wed, 10 Oct 2007 18:52:45 +0000 |
parents | 1224dec49333 |
children | e58eb1e72d23 d38543a1c0f9 |
comparison
equal
deleted
inserted
replaced
85138:9eb84ff59d9b | 85139:8ba0e30716a5 |
---|---|
263 (looking-at "E_"))))) | 263 (looking-at "E_"))))) |
264 (if (eobp) | 264 (if (eobp) |
265 ;; ID not found. | 265 ;; ID not found. |
266 (if (equal (file-name-nondirectory sigfile) | 266 (if (equal (file-name-nondirectory sigfile) |
267 (subst-char-in-string | 267 (subst-char-in-string |
268 ?/ ?% (vc-arch-workfile-version file))) | 268 ?/ ?% (vc-arch-working-revision file))) |
269 'added | 269 'added |
270 ;; Might be `added' or `up-to-date' as well. | 270 ;; Might be `added' or `up-to-date' as well. |
271 ;; FIXME: Check in the patch logs to find out. | 271 ;; FIXME: Check in the patch logs to find out. |
272 'edited) | 272 'edited) |
273 ;; Found the ID, let's check the inode. | 273 ;; Found the ID, let's check the inode. |
281 (equal (format-time-string "%s" (nth 5 ats)) | 281 (equal (format-time-string "%s" (nth 5 ats)) |
282 (match-string 1))) | 282 (match-string 1))) |
283 'up-to-date | 283 'up-to-date |
284 'edited))))))))) | 284 'edited))))))))) |
285 | 285 |
286 (defun vc-arch-workfile-version (file) | 286 (defun vc-arch-working-revision (file) |
287 (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) | 287 (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) |
288 (defbranch (vc-arch-default-version file))) | 288 (defbranch (vc-arch-default-version file))) |
289 (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*?\\)\\(?:--.*\\)?\\)--.*\\)\\'" defbranch)) | 289 (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*?\\)\\(?:--.*\\)?\\)--.*\\)\\'" defbranch)) |
290 (let* ((archive (match-string 1 defbranch)) | 290 (let* ((archive (match-string 1 defbranch)) |
291 (category (match-string 4 defbranch)) | 291 (category (match-string 4 defbranch)) |
319 :type '(repeat (cons regexp string)) | 319 :type '(repeat (cons regexp string)) |
320 :group 'vc) | 320 :group 'vc) |
321 | 321 |
322 (defun vc-arch-mode-line-string (file) | 322 (defun vc-arch-mode-line-string (file) |
323 "Return string for placement in modeline by `vc-mode-line' for FILE." | 323 "Return string for placement in modeline by `vc-mode-line' for FILE." |
324 (let ((rev (vc-workfile-version file))) | 324 (let ((rev (vc-working-revision file))) |
325 (dolist (rule vc-arch-mode-line-rewrite) | 325 (dolist (rule vc-arch-mode-line-rewrite) |
326 (if (string-match (car rule) rev) | 326 (if (string-match (car rule) rev) |
327 (setq rev (replace-match (cdr rule) t nil rev)))) | 327 (setq rev (replace-match (cdr rule) t nil rev)))) |
328 (format "Arch%c%s" | 328 (format "Arch%c%s" |
329 (case (vc-state file) | 329 (case (vc-state file) |
387 ;; variants) and maybe filter the output with `filterdiff' to only include | 387 ;; variants) and maybe filter the output with `filterdiff' to only include |
388 ;; the files in which we're interested. | 388 ;; the files in which we're interested. |
389 (let ((file (car files))) | 389 (let ((file (car files))) |
390 (if (and newvers | 390 (if (and newvers |
391 (vc-up-to-date-p file) | 391 (vc-up-to-date-p file) |
392 (equal newvers (vc-workfile-version file))) | 392 (equal newvers (vc-working-revision file))) |
393 ;; Newvers is the base revision and the current file is unchanged, | 393 ;; Newvers is the base revision and the current file is unchanged, |
394 ;; so we can diff with the current file. | 394 ;; so we can diff with the current file. |
395 (setq newvers nil)) | 395 (setq newvers nil)) |
396 (if newvers | 396 (if newvers |
397 (error "Diffing specific revisions not implemented") | 397 (error "Diffing specific revisions not implemented") |
404 (if async 'async 1) | 404 (if async 'async 1) |
405 nil "file-diffs" | 405 nil "file-diffs" |
406 ;; Arch does not support the typical flags. | 406 ;; Arch does not support the typical flags. |
407 ;; (vc-switches 'Arch 'diff) | 407 ;; (vc-switches 'Arch 'diff) |
408 (file-relative-name file) | 408 (file-relative-name file) |
409 (if (equal oldvers (vc-workfile-version file)) | 409 (if (equal oldvers (vc-working-revision file)) |
410 nil | 410 nil |
411 oldvers)))) | 411 oldvers)))) |
412 (if async 1 status))))) ; async diff, pessimistic assumption. | 412 (if async 1 status))))) ; async diff, pessimistic assumption. |
413 | 413 |
414 (defun vc-arch-delete-file (file) | 414 (defun vc-arch-delete-file (file) |
421 | 421 |
422 (defun vc-arch-command (buffer okstatus file &rest flags) | 422 (defun vc-arch-command (buffer okstatus file &rest flags) |
423 "A wrapper around `vc-do-command' for use in vc-arch.el." | 423 "A wrapper around `vc-do-command' for use in vc-arch.el." |
424 (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) | 424 (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) |
425 | 425 |
426 (defun vc-arch-init-version () nil) | 426 (defun vc-arch-init-revision () nil) |
427 | 427 |
428 ;;; Completion of versions and revisions. | 428 ;;; Completion of versions and revisions. |
429 | 429 |
430 (defun vc-arch--version-completion-table (root string) | 430 (defun vc-arch--version-completion-table (root string) |
431 (delq nil | 431 (delq nil |
557 (defun vc-arch-extra-menu () vc-arch-extra-menu-map) | 557 (defun vc-arch-extra-menu () vc-arch-extra-menu-map) |
558 | 558 |
559 | 559 |
560 ;;; Less obvious implementations. | 560 ;;; Less obvious implementations. |
561 | 561 |
562 (defun vc-arch-find-version (file rev buffer) | 562 (defun vc-arch-find-revision (file rev buffer) |
563 (let ((out (make-temp-file "vc-out"))) | 563 (let ((out (make-temp-file "vc-out"))) |
564 (unwind-protect | 564 (unwind-protect |
565 (progn | 565 (progn |
566 (with-temp-buffer | 566 (with-temp-buffer |
567 (vc-arch-command (current-buffer) 1 nil "file-diffs" file rev) | 567 (vc-arch-command (current-buffer) 1 nil "file-diffs" file rev) |