   (println "- Your valid svn authentication credentials are not cached.")
   (println))
 
+;; Return a newest-first sequence of revision numbers in which the object
+;; changed.
+
+(defn get-revlist [opts object]
+  (let [logstream (java.io.ByteArrayInputStream. (.getBytes (log opts object)))]
+    (for [e (try
+              (xml-seq (parse logstream))
+              (catch Exception e (errmsg)))
+          :when (seq (:attrs e))]
+    (:revision (:attrs e)))))
+
 ;; Return a string containing the xml-formatted svn log for the requested
 ;; object.
 
-(defn log [object]
-  (print "Fetching log...")
+(defn log [opts object]
+  (print "Fetching log... ")
   (flush)
-  (let [log (:out (sh "svn" "log" shhh "--stop-on-copy" "--xml" object))]
+  (let [log (:out (sh "svn" "log" opts shhh "--xml" object))]
     (println)
     log))
 


;; Print usage information.

(defn usage []
  (println (str "\nUsage: revdiff object [regexp]\n"))
  (println "  object : svn URI or name of versioned object in working-copy")
  (println "  regexp : only show diffs where a changed line matches regexp\n"))

;; If object is a uri, the "-rn:m" revision-range format will not work if object
;; is no longer present in the head revision, in which case we have to use the

;; TODO add a debug toggle and some related verbose prints?
;; TODO maybe print log message / committer info (could use awt/swing popup)?
;; TODO pass all '--' options (e.g. --username) to svn?
;; TODO add command-line switch for case insensitivity!
