emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100549: Add optional support for res


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100549: Add optional support for resetting VC properties.
Date: Tue, 08 Jun 2010 23:48:29 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100549
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Tue 2010-06-08 23:48:29 -0700
message:
  Add optional support for resetting VC properties.
  * lisp/vc-dispatcher.el (vc-resynch-window): Add new optional argument,
  call vc-file-clearprops when true.
  (vc-resynch-buffer): Add new optional argument, pass it down.
  (vc-resynch-buffers-in-directory): Likewise.
modified:
  lisp/ChangeLog
  lisp/vc-dispatcher.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-06-09 05:24:01 +0000
+++ b/lisp/ChangeLog    2010-06-09 06:48:29 +0000
@@ -1,5 +1,11 @@
 2010-06-09  Dan Nicolaescu  <address@hidden>
 
+       Add optional support for resetting VC properties.
+       * vc-dispatcher.el (vc-resynch-window): Add new optional argument,
+       call vc-file-clearprops when true.
+       (vc-resynch-buffer): Add new optional argument, pass it down.
+       (vc-resynch-buffers-in-directory): Likewise.
+
        Improve support for special markup in the VC commit message.
        * vc-mtn.el (vc-mtn-checkin): Add support for Author: and Date: markup.
        * vc-hg.el (vc-hg-checkin): Add support for Date:.

=== modified file 'lisp/vc-dispatcher.el'
--- a/lisp/vc-dispatcher.el     2010-04-21 02:05:24 +0000
+++ b/lisp/vc-dispatcher.el     2010-06-09 06:48:29 +0000
@@ -446,7 +446,7 @@
       (revert-buffer arg no-confirm t))
     (vc-restore-buffer-context context)))
 
-(defun vc-resynch-window (file &optional keep noquery)
+(defun vc-resynch-window (file &optional keep noquery reset-vc-info)
   "If FILE is in the current buffer, either revert or unvisit it.
 The choice between revert (to see expanded keywords) and unvisit
 depends on KEEP.  NOQUERY if non-nil inhibits confirmation for
@@ -457,6 +457,8 @@
   (and (string= buffer-file-name file)
        (if keep
           (when (file-exists-p file)
+            (when reset-vc-info
+              (vc-file-clearprops file))
             (vc-revert-buffer-internal t noquery)
 
             ;; VC operations might toggle the read-only state.  In
@@ -477,24 +479,24 @@
 (declare-function vc-dir-resynch-file "vc-dir" (&optional fname))
 (declare-function vc-string-prefix-p "vc" (prefix string))
 
-(defun vc-resynch-buffers-in-directory (directory &optional keep noquery)
+(defun vc-resynch-buffers-in-directory (directory &optional keep noquery 
reset-vc-info)
   "Resync all buffers that visit files in DIRECTORY."
   (dolist (buffer (buffer-list))
     (let ((fname (buffer-file-name buffer)))
       (when (and fname (vc-string-prefix-p directory fname))
        (with-current-buffer buffer
-         (vc-resynch-buffer fname keep noquery))))))
+         (vc-resynch-buffer fname keep noquery reset-vc-info))))))
 
-(defun vc-resynch-buffer (file &optional keep noquery)
+(defun vc-resynch-buffer (file &optional keep noquery reset-vc-info)
   "If FILE is currently visited, resynch its buffer."
   (if (string= buffer-file-name file)
-      (vc-resynch-window file keep noquery)
+      (vc-resynch-window file keep noquery reset-vc-info)
     (if (file-directory-p file)
-       (vc-resynch-buffers-in-directory file keep noquery)
+       (vc-resynch-buffers-in-directory file keep noquery reset-vc-info)
       (let ((buffer (get-file-buffer file)))
        (when buffer
          (with-current-buffer buffer
-           (vc-resynch-window file keep noquery))))))
+           (vc-resynch-window file keep noquery reset-vc-info))))))
   ;; Try to avoid unnecessary work, a *vc-dir* buffer is only present
   ;; if this is true.
   (when vc-dir-buffers


reply via email to

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