   "Revert FILE back to the current workfile version."
   (vc-darcs-do-command 'revert 0 file "-a"))
 
-(defun vc-darcs-print-log (file &optional buffer)
+(defun vc-darcs-print-log (files &optional buffer)
   "Print the logfile for the current darcs repository."
-  (apply #'vc-do-command buffer 'async vc-darcs-program-name nil "changes"
-         files))
+  (vc-do-command buffer 'async vc-darcs-program-name files "changes"))
 
 (defun vc-darcs-diff (file &optional rev1 rev2 buffer)
   "Show the differences in FILE between revisions REV1 and REV2."


(defun vc-darcs-could-register (file)
  "Return non-nil if FILE could be registered."
  (let ((file (expand-file-name file)))
    (and (not (vc-darcs-special-file-p file))
         (vc-darcs-find-root file)
         t)))

(defun vc-darcs-working-revision (file)
  "Return the working revision of FILE.


(defun vc-darcs-find-root (file)
  "Return the root darcs repository directory for FILE, or nil if not found."
  (vc-find-root (expand-file-name file) "_darcs"))

(defun vc-darcs-special-file-p (file)
  (let ((file (expand-file-name file)))
    (and (string-match "/_darcs/" file)
         (not (string-match "/_darcs/prefs/" file)))))

(defun vc-darcs-do-command (command okstatus files &rest flags)
  "Run darcs COMMAND using VC-DO-COMMAND."
  (let ((arguments (cdr (assq command vc-darcs-program-arguments))))
    (apply #'vc-do-command "*vc*" okstatus
           vc-darcs-program-name files (symbol-name command)
           (append arguments flags))))

(defun vc-darcs-changes (&optional files &rest flags)
  "Return a list of hashes of the patches that touch FILES in inverse order."
  (with-temp-buffer
    (apply #'vc-do-command t 0 vc-darcs-program-name files
           "changes" "--xml" flags)
    (let ((changes (xml-parse-region 1 (point-max))))
      (unless (and (null (cdr changes))
