=== modified file 'lisp/vc/vc-bzr.el'
*** lisp/vc/vc-bzr.el	2013-09-12 06:50:18 +0000
--- lisp/vc/vc-bzr.el	2013-09-23 22:44:32 +0000
***************
*** 638,656 ****
    "Check FILES in to bzr with log message COMMENT.
  REV non-nil gets an error."
    (if rev (error "Can't check in a specific revision with bzr"))
!   (apply 'vc-bzr-command "commit" nil 0 files
           (cons "-m" (log-edit-extract-headers
                       `(("Author" . ,(vc-bzr--sanitize-header "--author"))
                         ("Date" . ,(vc-bzr--sanitize-header "--commit-time"))
                         ("Fixes" . ,(vc-bzr--sanitize-header "--fixes")))
!                      comment))))
  
  (defun vc-bzr-find-revision (file rev buffer)
    "Fetch revision REV of file FILE and put it into BUFFER."
!     (with-current-buffer buffer
!       (if (and rev (stringp rev) (not (string= rev "")))
!           (vc-bzr-command "cat" t 0 file "-r" rev)
!         (vc-bzr-command "cat" t 0 file))))
  
  (defun vc-bzr-find-ignore-file (file)
    "Return the root directory of the repository of FILE."
--- 638,668 ----
    "Check FILES in to bzr with log message COMMENT.
  REV non-nil gets an error."
    (if rev (error "Can't check in a specific revision with bzr"))
!   (apply 'vc-bzr-command "commit" nil 'async files
           (cons "-m" (log-edit-extract-headers
                       `(("Author" . ,(vc-bzr--sanitize-header "--author"))
                         ("Date" . ,(vc-bzr--sanitize-header "--commit-time"))
                         ("Fixes" . ,(vc-bzr--sanitize-header "--fixes")))
!                      comment)))
!   (vc-exec-after
!    (lambda ()
!      (with-current-buffer "*vc*"
!        (when (progn (goto-char (point-min))
! 		    (search-forward "bzr: ERROR: " nil t))
! 	 (with-vc-properties
! 	  files
! 	  (error "Can't check in: %s"
! 		 (buffer-substring (point)
! 				   (- (search-forward ".\n" nil t) 2)))
! 	  ((vc-state . edited))))))))
! 
  
  (defun vc-bzr-find-revision (file rev buffer)
    "Fetch revision REV of file FILE and put it into BUFFER."
!   (with-current-buffer buffer
!     (if (and rev (stringp rev) (not (string= rev "")))
! 	(vc-bzr-command "cat" t 0 file "-r" rev)
!       (vc-bzr-command "cat" t 0 file))))
  
  (defun vc-bzr-find-ignore-file (file)
    "Return the root directory of the repository of FILE."

=== modified file 'lisp/vc/vc-dir.el'
*** lisp/vc/vc-dir.el	2013-09-21 08:16:13 +0000
--- lisp/vc/vc-dir.el	2013-09-23 22:44:32 +0000
***************
*** 1028,1061 ****
              (generate-new-buffer (format " *VC-%s* tmp status" backend))))
      (let ((buffer (current-buffer)))
        (with-current-buffer vc-dir-process-buffer
!         (setq default-directory def-dir)
!         (erase-buffer)
!         (vc-call-backend
!          backend 'dir-status-files def-dir files default-state
!          (lambda (entries &optional more-to-come)
!            ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items.
!            ;; If MORE-TO-COME is true, then more updates will come from
!            ;; the asynchronous process.
!            (with-current-buffer buffer
!              (vc-dir-update entries buffer)
!              (unless more-to-come
!                (setq mode-line-process nil)
!                ;; Remove the ones that haven't been updated at all.
!                ;; Those not-updated are those whose state is nil because the
!                ;; file/dir doesn't exist and isn't versioned.
!                (ewoc-filter vc-ewoc
!                             (lambda (info)
! 			      ;; The state for directory entries might
! 			      ;; have been changed to 'up-to-date,
! 			      ;; reset it, otherwise it will be removed when doing 'x'
! 			      ;; next time.
! 			      ;; FIXME: There should be a more elegant way to do this.
! 			      (when (and (vc-dir-fileinfo->directory info)
! 					 (eq (vc-dir-fileinfo->state info)
! 					     'up-to-date))
! 				(setf (vc-dir-fileinfo->state info) nil))
  
!                               (not (vc-dir-fileinfo->needs-update info))))))))))))
  
  (defun vc-dir-revert-buffer-function (&optional _ignore-auto _noconfirm)
    (vc-dir-refresh))
--- 1028,1063 ----
              (generate-new-buffer (format " *VC-%s* tmp status" backend))))
      (let ((buffer (current-buffer)))
        (with-current-buffer vc-dir-process-buffer
! 	(vc-exec-after
! 	 (lambda ()
! 	   (setq default-directory def-dir)
! 	   (erase-buffer)
! 	   (vc-call-backend
! 	    backend 'dir-status-files def-dir files default-state
! 	    (lambda (entries &optional more-to-come)
! 	      ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items.
! 	      ;; If MORE-TO-COME is true, then more updates will come from
! 	      ;; the asynchronous process.
! 	      (with-current-buffer buffer
! 		(vc-dir-update entries buffer)
! 		(unless more-to-come
! 		  (setq mode-line-process nil)
! 		  ;; Remove the ones that haven't been updated at all.
! 		  ;; Those not-updated are those whose state is nil because the
! 		  ;; file/dir doesn't exist and isn't versioned.
! 		  (ewoc-filter vc-ewoc
! 			       (lambda (info)
! 				 ;; The state for directory entries might
! 				 ;; have been changed to 'up-to-date,
! 				 ;; reset it, otherwise it will be removed when doing 'x'
! 				 ;; next time.
! 				 ;; FIXME: There should be a more elegant way to do this.
! 				 (when (and (vc-dir-fileinfo->directory info)
! 					    (eq (vc-dir-fileinfo->state info)
! 						'up-to-date))
! 				   (setf (vc-dir-fileinfo->state info) nil))
  
! 				 (not (vc-dir-fileinfo->needs-update info))))))))))))))
  
  (defun vc-dir-revert-buffer-function (&optional _ignore-auto _noconfirm)
    (vc-dir-refresh))
***************
*** 1093,1117 ****
        (ewoc-set-hf vc-ewoc (vc-dir-headers backend def-dir) "")
        (let ((buffer (current-buffer)))
          (with-current-buffer vc-dir-process-buffer
!           (setq default-directory def-dir)
!           (erase-buffer)
!           (vc-call-backend
!            backend 'dir-status def-dir
!            (lambda (entries &optional more-to-come)
!              ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items.
!              ;; If MORE-TO-COME is true, then more updates will come from
!              ;; the asynchronous process.
!              (with-current-buffer buffer
!                (vc-dir-update entries buffer)
!                (unless more-to-come
!                  (let ((remaining
!                         (ewoc-collect
!                          vc-ewoc 'vc-dir-fileinfo->needs-update)))
!                    (if remaining
!                        (vc-dir-refresh-files
!                         (mapcar 'vc-dir-fileinfo->name remaining)
!                         'up-to-date)
!                      (setq mode-line-process nil))))))))))))
  
  (defun vc-dir-show-fileentry (file)
    "Insert an entry for a specific file into the current *VC-dir* listing.
--- 1095,1121 ----
        (ewoc-set-hf vc-ewoc (vc-dir-headers backend def-dir) "")
        (let ((buffer (current-buffer)))
          (with-current-buffer vc-dir-process-buffer
! 	  (vc-exec-after
! 	   (lambda ()
! 	     (setq default-directory def-dir)
! 	     (erase-buffer)
! 	     (vc-call-backend
! 	      backend 'dir-status def-dir
! 	      (lambda (entries &optional more-to-come)
! 		;; ENTRIES is a list of (FILE VC_STATE EXTRA) items.
! 		;; If MORE-TO-COME is true, then more updates will come from
! 		;; the asynchronous process.
! 		(with-current-buffer buffer
! 		  (vc-dir-update entries buffer)
! 		  (unless more-to-come
! 		    (let ((remaining
! 			   (ewoc-collect
! 			    vc-ewoc 'vc-dir-fileinfo->needs-update)))
! 		      (if remaining
! 			  (vc-dir-refresh-files
! 			   (mapcar 'vc-dir-fileinfo->name remaining)
! 			   'up-to-date)
! 			(setq mode-line-process nil))))))))))))))
  
  (defun vc-dir-show-fileentry (file)
    "Insert an entry for a specific file into the current *VC-dir* listing.

=== modified file 'lisp/vc/vc-dispatcher.el'
*** lisp/vc/vc-dispatcher.el	2013-09-12 06:58:57 +0000
--- lisp/vc/vc-dispatcher.el	2013-09-23 22:44:32 +0000
***************
*** 225,231 ****
  If the current buffer has no process, just evaluate CODE.
  Else, add CODE to the process' sentinel.
  CODE should be a function of no arguments."
!   (let ((proc (get-buffer-process (current-buffer))))
      (cond
       ;; If there's no background process, just execute the code.
       ;; We used to explicitly call delete-process on exited processes,
--- 225,233 ----
  If the current buffer has no process, just evaluate CODE.
  Else, add CODE to the process' sentinel.
  CODE should be a function of no arguments."
!   (let ((proc (get-buffer-process (current-buffer)))
! 	(debug (or (get-buffer-process (current-buffer))
! 		   (message (concat "vc-exec-after is executed in " (buffer-name))))))
      (cond
       ;; If there's no background process, just execute the code.
       ;; We used to explicitly call delete-process on exited processes,

=== modified file 'lisp/vc/vc.el'
*** lisp/vc/vc.el	2013-09-21 08:16:13 +0000
--- lisp/vc/vc.el	2013-09-21 23:22:54 +0000
***************
*** 1508,1526 ****
       (or (and comment (string-match "[^\t\n ]" comment))
           (setq comment "*** empty log message ***"))
       (with-vc-properties
!          files
!        ;; We used to change buffers to get local value of
!        ;; vc-checkin-switches, but 'the' local buffer is
!        ;; not a well-defined concept for filesets.
!        (progn
!          (vc-call-backend backend 'checkin files rev comment)
!          (mapc 'vc-delete-automatic-version-backups files))
!        `((vc-state . up-to-date)
!          (vc-checkout-time . ,(nth 5 (file-attributes file)))
!          (vc-working-revision . nil)))
!      (message "Checking in %s...done" (vc-delistify files)))
!    'vc-checkin-hook
!    backend))
  
  ;;; Additional entry points for examining version histories
  
--- 1508,1529 ----
       (or (and comment (string-match "[^\t\n ]" comment))
           (setq comment "*** empty log message ***"))
       (with-vc-properties
!       files
!       ;; We used to change buffers to get local value of
!       ;; vc-checkin-switches, but 'the' local buffer is
!       ;; not a well-defined concept for filesets.
!       (progn
! 	(vc-call-backend backend 'checkin files rev comment)
! 	(mapc 'vc-delete-automatic-version-backups files))
!       `((vc-state . up-to-date)
! 	(vc-checkout-time . ,(nth 5 (file-attributes file)))
! 	(vc-working-revision . nil)))
!      (message "Checking in %s...done" (vc-delistify files))
!      (if (get-buffer-process (current-buffer))
! 	 (message "The process is still running.")
!        (message "The process is not running."))))
!   'vc-checkin-hook
!   backend)
  
  ;;; Additional entry points for examining version histories
  

