From 08f9f7385c43bd2ae47e8062350f1774a307e8e6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Jun 2012 21:05:51 -0400 Subject: [PATCH] * vc-sccs.el (vc-sccs-workfile-unchanged-p): Replace external vcdiff script. --- lisp/ChangeLog | 5 +++++ lisp/vc/vc-sccs.el | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f4a5afe038..2446b654694 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-05 Glenn Morris + + * vc/vc-sccs.el (vc-sccs-workfile-unchanged-p): + Replace external vcdiff script. + 2012-06-04 Stefan Monnier * emacs-lisp/cl-lib.el (cl-values, cl-values-list): Fix up last change. diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 0df307eda85..0cc92bb9db1 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -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 @@ -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)))) ;;; -- 2.11.4.GIT