emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-sccs.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-sccs.el,v
Date: Sat, 19 Apr 2008 21:53:57 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/19 21:53:56

Index: lisp/vc-sccs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-sccs.el,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- lisp/vc-sccs.el     11 Apr 2008 15:17:59 -0000      1.45
+++ lisp/vc-sccs.el     19 Apr 2008 21:53:55 -0000      1.46
@@ -39,6 +39,17 @@
 ;;; Customization options
 ;;;
 
+;; ;; Maybe a better solution is to not use "get" but "sccs get".
+;; (defcustom vc-sccs-path
+;;   (let ((path ()))
+;;     (dolist (dir '("/usr/sccs" "/usr/lib/sccs" "/usr/libexec/sccs"))
+;;       (if (file-directory-p dir)
+;;           (push dir path)))
+;;     path)
+;;   "List of extra directories to search for SCCS commands."
+;;   :type '(repeat directory)
+;;   :group 'vc)
+
 (defcustom vc-sccs-register-switches nil
   "*Extra switches for registering a file in SCCS.
 A string or list of strings passed to the checkin program by
@@ -90,17 +101,16 @@
 
 ;;; Properties of the backend
 
-(defun vc-sccs-revision-granularity ()
-     'file)
+(defun vc-sccs-revision-granularity () 'file)
 
 ;;;
 ;;; State-querying functions
 ;;;
 
-;;; The autoload cookie below places vc-sccs-registered directly into
-;;; loaddefs.el, so that vc-sccs.el does not need to be loaded for
-;;; every file that is visited.  The definition is repeated below
-;;; so that Help and etags can find it.
+;; The autoload cookie below places vc-sccs-registered directly into
+;; loaddefs.el, so that vc-sccs.el does not need to be loaded for
+;; every file that is visited.  The definition is repeated below
+;; so that Help and etags can find it.
 
 ;;;###autoload (defun vc-sccs-registered(f) (vc-default-registered 'SCCS f))
 (defun vc-sccs-registered (f) (vc-default-registered 'SCCS f))
@@ -181,6 +191,11 @@
 ;;; State-changing functions
 ;;;
 
+(defun vc-sccs-do-command (buffer okstatus command file-or-list &rest flags)
+  ;; (let ((load-path (append vc-sccs-path load-path)))
+  ;;   (apply 'vc-do-command buffer okstatus command file-or-list flags))
+  (apply 'vc-do-command buffer okstatus "sccs" file-or-list command flags))
+
 (defun vc-sccs-create-repo ()
   "Create a new SCCS repository."
   ;; SCCS is totally file-oriented, so all we have to do is make the directory
@@ -203,7 +218,7 @@
       (let ((vc-name
             (or project-file
                 (format (car vc-sccs-master-templates) dirname basename))))
-       (apply 'vc-do-command nil 0 "admin" vc-name
+       (apply 'vc-sccs-do-command nil 0 "admin" vc-name
               (and rev (not (string= rev "")) (concat "-r" rev))
               "-fb"
               (concat "-i" (file-relative-name file))
@@ -211,7 +226,7 @@
               (vc-switches 'SCCS 'register)))
       (delete-file file)
       (if vc-keep-workfiles
-         (vc-do-command nil 0 "get" (vc-name file))))))
+         (vc-sccs-do-command nil 0 "get" (vc-name file))))))
 
 (defun vc-sccs-responsible-p (file)
   "Return non-nil if SCCS thinks it would be responsible for registering FILE."
@@ -223,15 +238,15 @@
 (defun vc-sccs-checkin (files rev comment)
   "SCCS-specific version of `vc-backend-checkin'."
   (dolist (file files)
-    (apply 'vc-do-command nil 0 "delta" (vc-name file)
+    (apply 'vc-sccs-do-command nil 0 "delta" (vc-name file)
           (if rev (concat "-r" rev))
           (concat "-y" comment)
           (vc-switches 'SCCS 'checkin))
     (if vc-keep-workfiles
-       (vc-do-command nil 0 "get" (vc-name file)))))
+       (vc-sccs-do-command nil 0 "get" (vc-name file)))))
 
 (defun vc-sccs-find-revision (file rev buffer)
-  (apply 'vc-do-command
+  (apply 'vc-sccs-do-command
         buffer 0 "get" (vc-name file)
         "-s" ;; suppress diagnostic output
         "-p"
@@ -263,7 +278,7 @@
          (and rev (or (string= rev "")
                        (not (stringp rev)))
                (setq rev nil))
-         (apply 'vc-do-command nil 0 "get" (vc-name file)
+         (apply 'vc-sccs-do-command nil 0 "get" (vc-name file)
                 (if editable "-e")
                 (and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
                 switches))))
@@ -279,13 +294,14 @@
                                           discard file)))
                (error "Aborted"))
            (message "Removing revision %s from %s..." discard file)
-           (vc-do-command nil 0 "rmdel" (vc-name file) (concat "-r" discard))
-           (vc-do-command nil 0 "get" (vc-name file) nil))))
+           (vc-sccs-do-command nil 0 "rmdel"
+                                (vc-name file) (concat "-r" discard))
+           (vc-sccs-do-command nil 0 "get" (vc-name file) nil))))
 
 (defun vc-sccs-revert (file &optional contents-done)
   "Revert FILE to the version it was based on."
-  (vc-do-command nil 0 "unget" (vc-name file))
-  (vc-do-command nil 0 "get" (vc-name file))
+  (vc-sccs-do-command nil 0 "unget" (vc-name file))
+  (vc-sccs-do-command nil 0 "get" (vc-name file))
   ;; Checking out explicit revisions is not supported under SCCS, yet.
   ;; We always "revert" to the latest revision; therefore
   ;; vc-working-revision is cleared here so that it gets recomputed.
@@ -293,13 +309,15 @@
 
 (defun vc-sccs-steal-lock (file &optional rev)
   "Steal the lock on the current workfile for FILE and revision REV."
-  (vc-do-command nil 0 "unget" (vc-name file) "-n" (if rev (concat "-r" rev)))
-  (vc-do-command nil 0 "get" (vc-name file) "-g" (if rev (concat "-r" rev))))
+  (vc-sccs-do-command nil 0 "unget"
+                      (vc-name file) "-n" (if rev (concat "-r" rev)))
+  (vc-sccs-do-command nil 0 "get"
+                      (vc-name file) "-g" (if rev (concat "-r" rev))))
 
 (defun vc-sccs-modify-change-comment (files rev comment)
   "Modify (actually, append to) the change comments for FILES on a specified 
REV."
   (dolist (file files)
-    (vc-do-command nil 0 "cdc" (vc-name file) 
+    (vc-sccs-do-command nil 0 "cdc" (vc-name file) 
                   (concat "-y" comment) (concat "-r" rev))))
 
 
@@ -309,7 +327,7 @@
 
 (defun vc-sccs-print-log (files &optional buffer)
   "Get change log associated with FILES."
-  (vc-do-command buffer 0 "prs" (mapcar 'vc-name files)))
+  (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)))
 
 (defun vc-sccs-wash-log ()
   "Remove all non-comment information from log output."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]