-;; 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!
 ;; TODO make get-revpairs non-recursive?
+;; TODO make diffrevpairs non-recursive?
 
 (ns revdiff.core
   (:gen-class)

;; vector of the names of files where the filter term appears on a changed line.
;; If no filter term is given, a changed file automatically matches.

(defn matching-files [r1 r2 object filt show]
  (let [blocks (rest (split (:out (diff r1 r2 object show)) #"^Index: |\nIndex: "))]
    (remove nil?
            (into []
                  (for [block blocks]

;; (if any) is present on a changed line in that pair. If no filter term is
;; given, diff all changed files from all revision pairs.

(defn diffrevpairs [object filt revpairs show insens]
  (when (seq revpairs)
    (let [r1 (first revpairs)
          r2 (first (rest revpairs))
          mf (matching-files r1 r2 object filt show insens)]
      (println (str "Checking: r" r1 " vs r" r2))
      (doseq [filename mf] (svndiff r1 r2 filename object show))
      (diffrevpairs object filt (rest (rest revpairs)) show insens))))

;; Try to explain why this has failed.

