              (list "--to-patch" rev))))
     (let ((changes (apply #'vc-darcs-changes file flags)))
       (cadr changes))))
+
+(defun vc-darcs-revision-granularity () 'repository)
 
 (defun vc-darcs-registered (file)
   "Return non-nil if FILE is handled by darcs."

         (vc-darcs-find-root file)
         t)))

(defun vc-darcs-workfile-version (file)
  "Return the current working-dir version of FILE.
With darcs, this is simply the hash of the last patch that touched this file."
  (car (vc-darcs-changes file)))

(defun vc-darcs-workfile-unchanged-p (file)
  "Return non-nil if FILE is unchanged from the repository version."

  "Revert FILE back to the current workfile version."
  (vc-darcs-do-command "revert" 0 file "-a"))

(defun vc-darcs-print-log (file &optional buffer)
  "Print the logfile for the current darcs repository."
  (vc-do-command buffer 'async vc-darcs-program-name
                 (and (not vc-darcs-full-log) file) "changes"))

(defun vc-darcs-diff (file &optional rev1 rev2 buffer)
  "Show the differences in FILE between revisions REV1 and REV2."
