]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc-sccs.el (vc-sccs-workfile-unchanged-p): Replace external vcdiff script.
authorGlenn Morris <rgm@gnu.org>
Tue, 5 Jun 2012 01:05:51 +0000 (21:05 -0400)
committerGlenn Morris <rgm@gnu.org>
Tue, 5 Jun 2012 01:05:51 +0000 (21:05 -0400)
lisp/ChangeLog
lisp/vc/vc-sccs.el

index 2f4a5afe03839843b8a8d96380b43b29b3eb06d0..2446b654694de1093ffb78eb13ea5131ea2cd1a8 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-05  Glenn Morris  <rgm@gnu.org>
+
+       * vc/vc-sccs.el (vc-sccs-workfile-unchanged-p):
+       Replace external vcdiff script.
+
 2012-06-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/cl-lib.el (cl-values, cl-values-list): Fix up last change.
index 0df307eda85f6a9d5e056e47593ce02fce812898..0cc92bb9db1bfab6a14ba1d208eeb368fc3df6a2 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc-sccs.el --- support for SCCS version-control
 
-;; Copyright (C) 1992-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1992-2012 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
@@ -188,9 +188,17 @@ For a description of possible values, see `vc-check-master-templates'."
 
 (defun vc-sccs-workfile-unchanged-p (file)
   "SCCS-specific implementation of `vc-workfile-unchanged-p'."
-  (zerop (apply 'vc-do-command "*vc*" 1 "vcdiff" (vc-name file)
-                (list "--brief" "-q"
-                      (concat "-r" (vc-working-revision file))))))
+  (let ((tempfile (make-temp-file "vc-sccs")))
+    (unwind-protect
+       (progn
+         (with-temp-buffer
+           ;; Cf vc-sccs-find-revision.
+           (vc-sccs-do-command t 0 "get" (vc-name file)
+                               "-s" "-p" "-k" ; no keyword expansion
+                               (concat "-r" (vc-working-revision file)))
+           (write-region nil nil tempfile nil 'silent))
+         (zerop (vc-do-command "*vc*" 1 "cmp" file tempfile)))
+      (delete-file tempfile))))
 
 \f
 ;;;