emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108483: * vc-sccs.el (vc-sccs-workfi


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108483: * vc-sccs.el (vc-sccs-workfile-unchanged-p): Replace external vcdiff script.
Date: Mon, 04 Jun 2012 21:05:51 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108483
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2012-06-04 21:05:51 -0400
message:
  * vc-sccs.el (vc-sccs-workfile-unchanged-p): Replace external vcdiff script.
modified:
  lisp/ChangeLog
  lisp/vc/vc-sccs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-04 14:08:33 +0000
+++ b/lisp/ChangeLog    2012-06-05 01:05:51 +0000
@@ -1,3 +1,8 @@
+2012-06-05  Glenn Morris  <address@hidden>
+
+       * vc/vc-sccs.el (vc-sccs-workfile-unchanged-p):
+       Replace external vcdiff script.
+
 2012-06-04  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/cl-lib.el (cl-values, cl-values-list): Fix up last change.

=== modified file 'lisp/vc/vc-sccs.el'
--- a/lisp/vc/vc-sccs.el        2012-02-25 04:29:09 +0000
+++ b/lisp/vc/vc-sccs.el        2012-06-05 01:05:51 +0000
@@ -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 <address@hidden>
@@ -188,9 +188,17 @@
 
 (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))))
 
 
 ;;;


reply via email to

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