           match (matches? (rest lines) term)]
       (concat (when match (list fname)) (matchfiles (rest blocks) term)))))
 
-; A wrapper for matchfiles: provides a sequence of blocks from the text diff,
-; each block delineated by an "Index:" tag (either in the first position of
-; the string, or at the start of a line). Returns the sequence of filenames
-; produced recursively by matchfiles.
+;; A wrapper for matchfiles: provides a sequence of blocks from the text diff,
+;; each block delineated by an "Index:" tag (either in the first position of
+;; the string, or at the start of a line). Returns the sequence of filenames
+;; produced recursively by matchfiles.
 
 (defn filediffs [r1 r2 term item]
   (matchfiles (rest (split (:out (txtdiff r1 r2 item)) #"^Index: |\nIndex: ")) term))
 
-; Run "svn diff" on the file/pathname in index. The format of the file/path name
-; following "Index:" in diff's output depends on the argument: If the argument
-; is a filesystem pathname, the index name is absolute, and we can simply use
-; that. If the argument is a uri, the index name is relative to the base item
-; name. If the base item name was the uri to a file (and therefore a complete
-; pathname) we can use item; if it was the uri to a directory, we have to
-; concatenate the item and index to form a complete pathname.
+;; Run "svn diff" on the file/pathname in index. The format of the file/path name
+;; following "Index:" in diff's output depends on the argument: If the argument
+;; is a filesystem pathname, the index name is absolute, and we can simply use
+;; that. If the argument is a uri, the index name is relative to the base item
+;; name. If the base item name was the uri to a file (and therefore a complete
+;; pathname) we can use item; if it was the uri to a directory, we have to
+;; concatenate the item and index to form a complete pathname.
 
 (defn diff [r1 r2 index item]
   (let [r (re-pattern (str "^.*/" index "$"))

  (println "- Your valid svn authentication credentials are not cached.")
  (println))

; A newest-first sequence of revision numbers in which the item changed

(defn revlist [item]
  (for [e (try

  (:use [clojure.java.shell :only [sh]])
  (:use [clojure.string :only [split split-lines trim]]))

;; TODO add a debug toggle and some related verbose prints?
;; TODO is --stop-on-copy on log really a good idea?
;; TODO maybe print log message / committer info (could use awt/swing popup)?
;; TODO pass all '--' options (e.g. --username) to svn?
;; TODO item, term used to be global: refactor to avoid passing them so much

(def shhh "--non-interactive")  ; suppress svn user prompts

;; A string containing the xml-formatted svn log for the requested item. Stop on
;; copy to avoid following the history of a differently-named object.

(defn log [item] (:out (sh "svn" "log" shhh "--stop-on-copy" "--xml" item)))

;; Try to explain why this has failed.

(defn errmsg []
  (println "\nError retrieving repository information. Perhaps:\n")
