       proc))
 
 (defun darcsum-process-sentinel (proc string)
-  (cond
-   ((and (string-match "^exited abnormally" string) (process-buffer proc))
-    (message string))))
+  (if (buffer-live-p (process-buffer proc))
+      (with-current-buffer (process-buffer proc)
+	(save-excursion
+	  (goto-char (point-min))
+	  (cond
+	   ((looking-at "\n*\\(Couldn't get lock [^\n]*\\)")
+	    (let ((waiting (match-string 1)))
+	      (message waiting)
+	      (kill-buffer (current-buffer))))
+	   ((string-match "^exited abnormally" string)
+	    (message string)))))))
 
 (defun darcsum-process-filter (proc string)
   (with-current-buffer (process-buffer proc)

    (define-key map "U" 'darcsum-revert)
    (define-key map "u" 'darcsum-toggle-context)
    (define-key map "d" 'darcsum-delete)
    ;; (define-key map "r" 'darcsum-remove)
    (define-key map "M" 'darcsum-move)
    (define-key map "m" 'darcsum-toggle-mark)
    (define-key map [button2] 'darcsum-mouse-toggle-mark)

    (save-excursion
      (goto-char (point-min))

      (if (looking-at "\n*Skipped \\(record\\|add\\|revert\\) of [0-9]+ patch\\(es\\)?\\.\n")
	  (delete-region (point-min) (match-end 0)))

      (cond
