aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-18 20:52:39 +0000
committerRichard M. Stallman1995-07-18 20:52:39 +0000
commit6aa1372974aa293dc103acaf046c82d1b0e6665e (patch)
tree529c1ab313836da2f9045a79a5aeb651a3d364e5
parent231e734dd53a07b2fe0f52845834284a58a589a7 (diff)
downloademacs-6aa1372974aa293dc103acaf046c82d1b0e6665e.tar.gz
emacs-6aa1372974aa293dc103acaf046c82d1b0e6665e.zip
(vc-do-command): Added parameter BUFFER (the default,
if nil, is *vc*). Updated all callers. (vc-next-action-on-file, vc-diff, vc-version-diff, vc-backend-diff): Use buffer *vc-diff* for diff output instead of *vc*.
-rw-r--r--lisp/vc.el108
1 files changed, 56 insertions, 52 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 80318b8c93d..96d1a156ed2 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -255,13 +255,15 @@ and that its contents match what the master file says.")
255 exec-path) 255 exec-path)
256 nil))) 256 nil)))
257 257
258(defun vc-do-command (okstatus command file last &rest flags) 258(defun vc-do-command (buffer okstatus command file last &rest flags)
259 "Execute a version-control command, notifying user and checking for errors. 259 "Execute a version-control command, notifying user and checking for errors.
260Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil.
260The command is successful if its exit status does not exceed OKSTATUS. 261The command is successful if its exit status does not exceed OKSTATUS.
261Output from COMMAND goes to buffer *vc*. The last argument of the command is 262The last argument of the command is the master name of FILE if LAST is
262the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is 263`MASTER', or the workfile of FILE if LAST is `WORKFILE'; this is appended
263'WORKFILE; this is appended to an optional list of FLAGS." 264to an optional list of FLAGS."
264 (setq file (expand-file-name file)) 265 (setq file (expand-file-name file))
266 (if (not buffer) (setq buffer "*vc*"))
265 (if vc-command-messages 267 (if vc-command-messages
266 (message "Running %s on %s..." command file)) 268 (message "Running %s on %s..." command file))
267 (let ((obuf (current-buffer)) (camefrom (current-buffer)) 269 (let ((obuf (current-buffer)) (camefrom (current-buffer))
@@ -269,7 +271,7 @@ the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is
269 (vc-file (and file (vc-name file))) 271 (vc-file (and file (vc-name file)))
270 (olddir default-directory) 272 (olddir default-directory)
271 status) 273 status)
272 (set-buffer (get-buffer-create "*vc*")) 274 (set-buffer (get-buffer-create buffer))
273 (set (make-local-variable 'vc-parent-buffer) camefrom) 275 (set (make-local-variable 'vc-parent-buffer) camefrom)
274 (set (make-local-variable 'vc-parent-buffer-name) 276 (set (make-local-variable 'vc-parent-buffer-name)
275 (concat " from " (buffer-name camefrom))) 277 (concat " from " (buffer-name camefrom)))
@@ -302,7 +304,7 @@ the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is
302 (forward-line -1) 304 (forward-line -1)
303 (if (or (not (integerp status)) (< okstatus status)) 305 (if (or (not (integerp status)) (< okstatus status))
304 (progn 306 (progn
305 (pop-to-buffer "*vc*") 307 (pop-to-buffer buffer)
306 (goto-char (point-min)) 308 (goto-char (point-min))
307 (shrink-window-if-larger-than-buffer) 309 (shrink-window-if-larger-than-buffer)
308 (error "Running %s...FAILED (%s)" command 310 (error "Running %s...FAILED (%s)" command
@@ -458,7 +460,7 @@ the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is
458 (if (and vc-checkout-carefully 460 (if (and vc-checkout-carefully
459 (not (vc-workfile-unchanged-p file t))) 461 (not (vc-workfile-unchanged-p file t)))
460 (if (save-window-excursion 462 (if (save-window-excursion
461 (pop-to-buffer "*vc*") 463 (pop-to-buffer "*vc-diff*")
462 (goto-char (point-min)) 464 (goto-char (point-min))
463 (insert-string (format "Changes to %s since last lock:\n\n" 465 (insert-string (format "Changes to %s since last lock:\n\n"
464 file)) 466 file))
@@ -477,7 +479,8 @@ the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is
477 (if (not (eq vc-type 'SCCS)) 479 (if (not (eq vc-type 'SCCS))
478 (let ((rev (read-string "Branch or version to move to: "))) 480 (let ((rev (read-string "Branch or version to move to: ")))
479 (if (eq vc-type 'RCS) 481 (if (eq vc-type 'RCS)
480 (vc-do-command 0 "rcs" file 'MASTER (concat "-b" rev))) 482 (vc-do-command nil 0 "rcs" file 'MASTER
483 (concat "-b" rev)))
481 (vc-checkout file nil rev)) 484 (vc-checkout file nil rev))
482 (error "Sorry, this is not implemented for SCCS.")) 485 (error "Sorry, this is not implemented for SCCS."))
483 (vc-checkout-writable-buffer file)))) 486 (vc-checkout-writable-buffer file))))
@@ -526,7 +529,7 @@ the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is
526 (let ((rev (read-string "Trunk version to move to: "))) 529 (let ((rev (read-string "Trunk version to move to: ")))
527 (if (not (string= rev "")) 530 (if (not (string= rev ""))
528 (vc-checkout file nil rev) 531 (vc-checkout file nil rev)
529 (vc-do-command 0 "cvs" file 'WORKFILE "update" "-A") 532 (vc-do-command nil 0 "cvs" file 'WORKFILE "update" "-A")
530 (vc-checkout file))) 533 (vc-checkout file)))
531 (setq buffer-read-only nil) 534 (setq buffer-read-only nil)
532 (vc-file-setprop file 'vc-locking-user (user-login-name)) 535 (vc-file-setprop file 'vc-locking-user (user-login-name))
@@ -975,7 +978,7 @@ and two version designators specifying which versions to compare."
975 ;; problem is that the `old' file doesn't exist to be 978 ;; problem is that the `old' file doesn't exist to be
976 ;; visited. This plays hell with numerous assumptions in 979 ;; visited. This plays hell with numerous assumptions in
977 ;; the diff.el and compile.el machinery. 980 ;; the diff.el and compile.el machinery.
978 (pop-to-buffer "*vc*") 981 (pop-to-buffer "*vc-diff*")
979 (setq default-directory (file-name-directory file)) 982 (setq default-directory (file-name-directory file))
980 (if (= 0 (buffer-size)) 983 (if (= 0 (buffer-size))
981 (progn 984 (progn
@@ -1004,7 +1007,7 @@ files in or below it."
1004 " and " 1007 " and "
1005 (or rel2 "current workfile(s)") 1008 (or rel2 "current workfile(s)")
1006 ":\n\n") 1009 ":\n\n")
1007 (set-buffer (get-buffer-create "*vc*")) 1010 (set-buffer (get-buffer-create "*vc-diff*"))
1008 (cd file) 1011 (cd file)
1009 (vc-file-tree-walk 1012 (vc-file-tree-walk
1010 (function (lambda (f) 1013 (function (lambda (f)
@@ -1022,7 +1025,7 @@ files in or below it."
1022 ) 1025 )
1023 (if (zerop (vc-backend-diff file rel1 rel2)) 1026 (if (zerop (vc-backend-diff file rel1 rel2))
1024 (message "No changes to %s between %s and %s." file rel1 rel2) 1027 (message "No changes to %s between %s and %s." file rel1 rel2)
1025 (pop-to-buffer "*vc*")))) 1028 (pop-to-buffer "*vc-diff*"))))
1026 1029
1027;;;###autoload 1030;;;###autoload
1028(defun vc-version-other-window (rev) 1031(defun vc-version-other-window (rev)
@@ -1525,7 +1528,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1525 ((file-exists-p "CVS") 'CVS) 1528 ((file-exists-p "CVS") 'CVS)
1526 (t vc-default-back-end)))) 1529 (t vc-default-back-end))))
1527 (cond ((eq backend 'SCCS) 1530 (cond ((eq backend 'SCCS)
1528 (vc-do-command 0 "admin" file 'MASTER ;; SCCS 1531 (vc-do-command nil 0 "admin" file 'MASTER ;; SCCS
1529 (and rev (concat "-r" rev)) 1532 (and rev (concat "-r" rev))
1530 "-fb" 1533 "-fb"
1531 (concat "-i" file) 1534 (concat "-i" file)
@@ -1536,14 +1539,14 @@ From a program, any arguments are passed to the `rcs2log' script."
1536 (file-name-nondirectory file))) 1539 (file-name-nondirectory file)))
1537 (delete-file file) 1540 (delete-file file)
1538 (if vc-keep-workfiles 1541 (if vc-keep-workfiles
1539 (vc-do-command 0 "get" file 'MASTER))) 1542 (vc-do-command nil 0 "get" file 'MASTER)))
1540 ((eq backend 'RCS) 1543 ((eq backend 'RCS)
1541 (vc-do-command 0 "ci" file 'MASTER ;; RCS 1544 (vc-do-command nil 0 "ci" file 'MASTER ;; RCS
1542 (concat (if vc-keep-workfiles "-u" "-r") rev) 1545 (concat (if vc-keep-workfiles "-u" "-r") rev)
1543 (and comment (concat "-t-" comment)) 1546 (and comment (concat "-t-" comment))
1544 file)) 1547 file))
1545 ((eq backend 'CVS) 1548 ((eq backend 'CVS)
1546 (vc-do-command 0 "cvs" file 'WORKFILE ;; CVS 1549 (vc-do-command nil 0 "cvs" file 'WORKFILE ;; CVS
1547 "add" 1550 "add"
1548 (and comment (string-match "[^\t\n ]" comment) 1551 (and comment (string-match "[^\t\n ]" comment)
1549 (concat "-m" comment))) 1552 (concat "-m" comment)))
@@ -1570,7 +1573,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1570 (unwind-protect 1573 (unwind-protect
1571 (progn 1574 (progn
1572 (apply 'vc-do-command 1575 (apply 'vc-do-command
1573 0 "/bin/sh" file 'MASTER "-c" 1576 nil 0 "/bin/sh" file 'MASTER "-c"
1574 ;; Some shells make the "" dummy argument into $0 1577 ;; Some shells make the "" dummy argument into $0
1575 ;; while others use the shell's name as $0 and 1578 ;; while others use the shell's name as $0 and
1576 ;; use the "" as $1. The if-statement 1579 ;; use the "" as $1. The if-statement
@@ -1588,12 +1591,12 @@ From a program, any arguments are passed to the `rcs2log' script."
1588 vc-checkout-switches) 1591 vc-checkout-switches)
1589 (setq failed nil)) 1592 (setq failed nil))
1590 (and failed (file-exists-p filename) (delete-file filename)))) 1593 (and failed (file-exists-p filename) (delete-file filename))))
1591 (apply 'vc-do-command 0 "get" file 'MASTER;; SCCS 1594 (apply 'vc-do-command nil 0 "get" file 'MASTER ;; SCCS
1592 (if writable "-e") 1595 (if writable "-e")
1593 (and rev (concat "-r" (vc-lookup-triple file rev))) 1596 (and rev (concat "-r" (vc-lookup-triple file rev)))
1594 vc-checkout-switches) 1597 vc-checkout-switches)
1595 (vc-file-setprop file 'vc-workfile-version nil)) 1598 (vc-file-setprop file 'vc-workfile-version nil))
1596 (if workfile;; RCS 1599 (if workfile ;; RCS
1597 ;; RCS doesn't let us check out into arbitrary file names directly. 1600 ;; RCS doesn't let us check out into arbitrary file names directly.
1598 ;; Use `co -p' and make stdout point to the correct file. 1601 ;; Use `co -p' and make stdout point to the correct file.
1599 (let ((vc-modes (logior (file-modes (vc-name file)) 1602 (let ((vc-modes (logior (file-modes (vc-name file))
@@ -1602,7 +1605,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1602 (unwind-protect 1605 (unwind-protect
1603 (progn 1606 (progn
1604 (apply 'vc-do-command 1607 (apply 'vc-do-command
1605 0 "/bin/sh" file 'MASTER "-c" 1608 nil 0 "/bin/sh" file 'MASTER "-c"
1606 ;; See the SCCS case, above, regarding the 1609 ;; See the SCCS case, above, regarding the
1607 ;; if-statement. 1610 ;; if-statement.
1608 (format "if [ x\"$1\" = x ]; then shift; fi; \ 1611 (format "if [ x\"$1\" = x ]; then shift; fi; \
@@ -1619,7 +1622,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1619 (and failed (file-exists-p filename) (delete-file filename)))) 1622 (and failed (file-exists-p filename) (delete-file filename))))
1620 (progn 1623 (progn
1621 (apply 'vc-do-command 1624 (apply 'vc-do-command
1622 0 "co" file 'MASTER 1625 nil 0 "co" file 'MASTER
1623 (if writable "-l") 1626 (if writable "-l")
1624 (if rev (concat "-r" rev) 1627 (if rev (concat "-r" rev)
1625 ;; if no explicit revision was specified, 1628 ;; if no explicit revision was specified,
@@ -1642,7 +1645,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1642 (unwind-protect 1645 (unwind-protect
1643 (progn 1646 (progn
1644 (apply 'vc-do-command 1647 (apply 'vc-do-command
1645 0 "/bin/sh" file 'WORKFILE "-c" 1648 nil 0 "/bin/sh" file 'WORKFILE "-c"
1646 "exec >\"$1\" || exit; shift; exec cvs update \"$@\"" 1649 "exec >\"$1\" || exit; shift; exec cvs update \"$@\""
1647 "" ; dummy argument for shell's $0 1650 "" ; dummy argument for shell's $0
1648 workfile 1651 workfile
@@ -1651,7 +1654,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1651 vc-checkout-switches) 1654 vc-checkout-switches)
1652 (setq failed nil)) 1655 (setq failed nil))
1653 (and failed (file-exists-p filename) (delete-file filename)))) 1656 (and failed (file-exists-p filename) (delete-file filename))))
1654 (apply 'vc-do-command 0 "cvs" file 'WORKFILE 1657 (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE
1655 "update" 1658 "update"
1656 (and rev (concat "-r" rev)) 1659 (and rev (concat "-r" rev))
1657 vc-checkout-switches) 1660 vc-checkout-switches)
@@ -1697,18 +1700,18 @@ From a program, any arguments are passed to the `rcs2log' script."
1697 (vc-backend-dispatch file 1700 (vc-backend-dispatch file
1698 ;; SCCS 1701 ;; SCCS
1699 (progn 1702 (progn
1700 (apply 'vc-do-command 0 "delta" file 'MASTER 1703 (apply 'vc-do-command nil 0 "delta" file 'MASTER
1701 (if rev (concat "-r" rev)) 1704 (if rev (concat "-r" rev))
1702 (concat "-y" comment) 1705 (concat "-y" comment)
1703 vc-checkin-switches) 1706 vc-checkin-switches)
1704 (vc-file-setprop file 'vc-locking-user 'none) 1707 (vc-file-setprop file 'vc-locking-user 'none)
1705 (vc-file-setprop file 'vc-workfile-version nil) 1708 (vc-file-setprop file 'vc-workfile-version nil)
1706 (if vc-keep-workfiles 1709 (if vc-keep-workfiles
1707 (vc-do-command 0 "get" file 'MASTER)) 1710 (vc-do-command nil 0 "get" file 'MASTER))
1708 ) 1711 )
1709 ;; RCS 1712 ;; RCS
1710 (let ((old-version (vc-workfile-version file)) new-version) 1713 (let ((old-version (vc-workfile-version file)) new-version)
1711 (apply 'vc-do-command 0 "ci" file 'MASTER 1714 (apply 'vc-do-command nil 0 "ci" file 'MASTER
1712 (concat (if vc-keep-workfiles "-u" "-r") rev) 1715 (concat (if vc-keep-workfiles "-u" "-r") rev)
1713 (concat "-m" comment) 1716 (concat "-m" comment)
1714 vc-checkin-switches) 1717 vc-checkin-switches)
@@ -1733,22 +1736,22 @@ From a program, any arguments are passed to the `rcs2log' script."
1733 ((and old-version new-version 1736 ((and old-version new-version
1734 (not (string= (vc-branch-part old-version) 1737 (not (string= (vc-branch-part old-version)
1735 (vc-branch-part new-version)))) 1738 (vc-branch-part new-version))))
1736 (vc-do-command 0 "rcs" file 'MASTER 1739 (vc-do-command nil 0 "rcs" file 'MASTER
1737 (if (vc-trunk-p new-version) "-b" 1740 (if (vc-trunk-p new-version) "-b"
1738 (concat "-b" (vc-branch-part new-version)))) 1741 (concat "-b" (vc-branch-part new-version))))
1739 ;; exit status of 1 is also accepted. 1742 ;; exit status of 1 is also accepted.
1740 ;; It means that the lock was removed before. 1743 ;; It means that the lock was removed before.
1741 (vc-do-command 1 "rcs" file 'MASTER 1744 (vc-do-command nil 1 "rcs" file 'MASTER
1742 (concat "-u" old-version))))) 1745 (concat "-u" old-version)))))
1743 ;; CVS 1746 ;; CVS
1744 (progn 1747 (progn
1745 ;; explicit check-in to the trunk requires a 1748 ;; explicit check-in to the trunk requires a
1746 ;; double check-in (first unexplicit) (CVS-1.3) 1749 ;; double check-in (first unexplicit) (CVS-1.3)
1747 (if (and rev (vc-trunk-p rev)) 1750 (if (and rev (vc-trunk-p rev))
1748 (apply 'vc-do-command 0 "cvs" file 'WORKFILE 1751 (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE
1749 "ci" "-m" "intermediate" 1752 "ci" "-m" "intermediate"
1750 vc-checkin-switches)) 1753 vc-checkin-switches))
1751 (apply 'vc-do-command 0 "cvs" file 'WORKFILE 1754 (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE
1752 "ci" (if rev (concat "-r" rev)) 1755 "ci" (if rev (concat "-r" rev))
1753 (concat "-m" comment) 1756 (concat "-m" comment)
1754 vc-checkin-switches) 1757 vc-checkin-switches)
@@ -1763,7 +1766,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1763 (vc-file-setprop file 'vc-workfile-version nil)) 1766 (vc-file-setprop file 'vc-workfile-version nil))
1764 ;; if this was an explicit check-in, remove the sticky tag 1767 ;; if this was an explicit check-in, remove the sticky tag
1765 (if rev 1768 (if rev
1766 (vc-do-command 0 "cvs" file 'WORKFILE "update" "-A")) 1769 (vc-do-command nil 0 "cvs" file 'WORKFILE "update" "-A"))
1767 (vc-file-setprop file 'vc-locking-user 'none) 1770 (vc-file-setprop file 'vc-locking-user 'none)
1768 (vc-file-setprop file 'vc-checkout-time 1771 (vc-file-setprop file 'vc-checkout-time
1769 (nth 5 (file-attributes file)))))) 1772 (nth 5 (file-attributes file))))))
@@ -1778,15 +1781,15 @@ From a program, any arguments are passed to the `rcs2log' script."
1778 file 1781 file
1779 ;; SCCS 1782 ;; SCCS
1780 (progn 1783 (progn
1781 (vc-do-command 0 "unget" file 'MASTER nil) 1784 (vc-do-command nil 0 "unget" file 'MASTER nil)
1782 (vc-do-command 0 "get" file 'MASTER nil)) 1785 (vc-do-command nil 0 "get" file 'MASTER nil))
1783 ;; RCS 1786 ;; RCS
1784 (vc-do-command 0 "co" file 'MASTER 1787 (vc-do-command nil 0 "co" file 'MASTER
1785 "-f" (concat "-u" (vc-workfile-version file))) 1788 "-f" (concat "-u" (vc-workfile-version file)))
1786 ;; CVS 1789 ;; CVS
1787 (progn 1790 (progn
1788 (delete-file file) 1791 (delete-file file)
1789 (vc-do-command 0 "cvs" file 'WORKFILE "update"))) 1792 (vc-do-command nil 0 "cvs" file 'WORKFILE "update")))
1790 (vc-file-setprop file 'vc-locking-user 'none) 1793 (vc-file-setprop file 'vc-locking-user 'none)
1791 (vc-file-setprop file 'vc-checkout-time (nth 5 (file-attributes file))) 1794 (vc-file-setprop file 'vc-checkout-time (nth 5 (file-attributes file)))
1792 (message "Reverting %s...done" file) 1795 (message "Reverting %s...done" file)
@@ -1797,10 +1800,10 @@ From a program, any arguments are passed to the `rcs2log' script."
1797 (message "Stealing lock on %s..." file) 1800 (message "Stealing lock on %s..." file)
1798 (vc-backend-dispatch file 1801 (vc-backend-dispatch file
1799 (progn ;SCCS 1802 (progn ;SCCS
1800 (vc-do-command 0 "unget" file 'MASTER "-n" (if rev (concat "-r" rev))) 1803 (vc-do-command nil 0 "unget" file 'MASTER "-n" (if rev (concat "-r" rev)))
1801 (vc-do-command 0 "get" file 'MASTER "-g" (if rev (concat "-r" rev))) 1804 (vc-do-command nil 0 "get" file 'MASTER "-g" (if rev (concat "-r" rev)))
1802 ) 1805 )
1803 (vc-do-command 0 "rcs" file 'MASTER ;RCS 1806 (vc-do-command nil 0 "rcs" file 'MASTER ;RCS
1804 "-M" (concat "-u" rev) (concat "-l" rev)) 1807 "-M" (concat "-u" rev) (concat "-l" rev))
1805 (error "You cannot steal a CVS lock; there are no CVS locks to steal.") ;CVS 1808 (error "You cannot steal a CVS lock; there are no CVS locks to steal.") ;CVS
1806 ) 1809 )
@@ -1813,27 +1816,27 @@ From a program, any arguments are passed to the `rcs2log' script."
1813 ;; smarter when we support multiple branches. 1816 ;; smarter when we support multiple branches.
1814 (message "Removing last change from %s..." file) 1817 (message "Removing last change from %s..." file)
1815 (vc-backend-dispatch file 1818 (vc-backend-dispatch file
1816 (vc-do-command 0 "rmdel" file 'MASTER (concat "-r" target)) 1819 (vc-do-command nil 0 "rmdel" file 'MASTER (concat "-r" target))
1817 (vc-do-command 0 "rcs" file 'MASTER (concat "-o" target)) 1820 (vc-do-command nil 0 "rcs" file 'MASTER (concat "-o" target))
1818 nil ;; this is never reached under CVS 1821 nil ;; this is never reached under CVS
1819 ) 1822 )
1820 (message "Removing last change from %s...done" file) 1823 (message "Removing last change from %s...done" file)
1821 ) 1824 )
1822 1825
1823(defun vc-backend-print-log (file) 1826(defun vc-backend-print-log (file)
1824 ;; Print change log associated with FILE to buffer *vc*. 1827 ;; Get change log associated with FILE.
1825 (vc-backend-dispatch 1828 (vc-backend-dispatch
1826 file 1829 file
1827 (vc-do-command 0 "prs" file 'MASTER) 1830 (vc-do-command nil 0 "prs" file 'MASTER)
1828 (vc-do-command 0 "rlog" file 'MASTER) 1831 (vc-do-command nil 0 "rlog" file 'MASTER)
1829 (vc-do-command 0 "cvs" file 'WORKFILE "rlog"))) 1832 (vc-do-command nil 0 "cvs" file 'WORKFILE "rlog")))
1830 1833
1831(defun vc-backend-assign-name (file name) 1834(defun vc-backend-assign-name (file name)
1832 ;; Assign to a FILE's latest version a given NAME. 1835 ;; Assign to a FILE's latest version a given NAME.
1833 (vc-backend-dispatch file 1836 (vc-backend-dispatch file
1834 (vc-add-triple name file (vc-latest-version file)) ;; SCCS 1837 (vc-add-triple name file (vc-latest-version file)) ;; SCCS
1835 (vc-do-command 0 "rcs" file 'MASTER (concat "-n" name ":")) ;; RCS 1838 (vc-do-command nil 0 "rcs" file 'MASTER (concat "-n" name ":")) ;; RCS
1836 (vc-do-command 0 "cvs" file 'WORKFILE "tag" name) ;; CVS 1839 (vc-do-command nil 0 "cvs" file 'WORKFILE "tag" name) ;; CVS
1837 ) 1840 )
1838 ) 1841 )
1839 1842
@@ -1862,10 +1865,11 @@ From a program, any arguments are passed to the `rcs2log' script."
1862 (if (listp diff-switches) 1865 (if (listp diff-switches)
1863 diff-switches 1866 diff-switches
1864 (list diff-switches))))) 1867 (list diff-switches)))))
1865 (status (apply 'vc-do-command 2 command file mode options))) 1868 (status (apply 'vc-do-command "*vc-diff*" 2
1869 command file mode options)))
1866 ;; Some RCS versions don't understand "--brief"; work around this. 1870 ;; Some RCS versions don't understand "--brief"; work around this.
1867 (if (eq status 2) 1871 (if (eq status 2)
1868 (apply 'vc-do-command 1 command file 'WORKFILE 1872 (apply 'vc-do-command "*vc-diff*" 1 command file 'WORKFILE
1869 (if cmp (cdr options) options)) 1873 (if cmp (cdr options) options))
1870 status))) 1874 status)))
1871 ;; CVS is different. 1875 ;; CVS is different.
@@ -1877,12 +1881,12 @@ From a program, any arguments are passed to the `rcs2log' script."
1877 (if (or oldvers newvers) 1881 (if (or oldvers newvers)
1878 (error "No revisions of %s exists" file) 1882 (error "No revisions of %s exists" file)
1879 (apply 'vc-do-command 1883 (apply 'vc-do-command
1880 1 "diff" file 'WORKFILE "/dev/null" 1884 "*vc-diff*" 1 "diff" file 'WORKFILE "/dev/null"
1881 (if (listp diff-switches) 1885 (if (listp diff-switches)
1882 diff-switches 1886 diff-switches
1883 (list diff-switches)))) 1887 (list diff-switches))))
1884 (apply 'vc-do-command 1888 (apply 'vc-do-command
1885 1 "cvs" file 'WORKFILE "diff" 1889 "*vc-diff*" 1 "cvs" file 'WORKFILE "diff"
1886 (and oldvers (concat "-r" oldvers)) 1890 (and oldvers (concat "-r" oldvers))
1887 (and newvers (concat "-r" newvers)) 1891 (and newvers (concat "-r" newvers))
1888 (if (listp diff-switches) 1892 (if (listp diff-switches)
@@ -1901,7 +1905,7 @@ From a program, any arguments are passed to the `rcs2log' script."
1901 (vc-file-clear-masterprops file) 1905 (vc-file-clear-masterprops file)
1902 (vc-file-setprop file 'vc-workfile-version nil) 1906 (vc-file-setprop file 'vc-workfile-version nil)
1903 (vc-file-setprop file 'vc-locking-user nil) 1907 (vc-file-setprop file 'vc-locking-user nil)
1904 (vc-do-command 1 "cvs" file 'WORKFILE "update")) 1908 (vc-do-command nil 1 "cvs" file 'WORKFILE "update"))
1905 )) 1909 ))
1906 1910
1907(defun vc-check-headers () 1911(defun vc-check-headers ()