   [["-h" "--help" "Show usage information"]
    ["-i" "--case-insensitive" "Treat regexp as case-insensitive"]
    ["-d" "--diff-opts options" "Quoted list of options to pass to svn diff"]
-   ["-l" "--log-opts options" "Quoted list of options to pass to svn log"]])
+   ["-l" "--log-opts options" "Quoted list of options to pass to svn log"]
+   ["-s" "--show-cmds" "Show the svn commands taht are issued"]])
 
 ;; A string containing the output of "diff" on the two svn revision of object.
 
-(defn diff [r1 r2 object]
+(defn diff [r1 r2 object show]
   (let [object (baseobject object)
-        v (vpaths r1 r2 object object)]
-    (sh "svn" "diff" "--diff-cmd" "diff" "-x" "-u0" shhh (first v) (second v))))
+        v (vpaths r1 r2 object object)
+        o1 (first v)
+        o2 (second v)
+        cmd-components ["svn" "diff" "--diff-cmd" "diff" "-x" "-u0" shhh o1 o2]]
+    (if show (show-cmd cmd-components))
+    (apply sh cmd-components)))
 
 ;; Given a list of revision pairs, diff those for which the given filter term
 ;; (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]
+(defn diffrevpairs [object filt revpairs show]
   (when (seq revpairs)
     (let [r1 (first revpairs)
           r2 (first (rest revpairs))
-          mf (matching-files r1 r2 object filt)]
+          mf (matching-files r1 r2 object filt show)]
       (println (str "Checking: r" r1 " vs r" r2))
-      (doseq [filename mf] (svndiff r1 r2 filename object))
-      (diffrevpairs object filt (rest (rest revpairs))))))
+      (doseq [filename mf] (svndiff r1 r2 filename object show))
+      (diffrevpairs object filt (rest (rest revpairs)) show))))
 
 ;; Try to explain why this has failed.
 

;; 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 [opts show object]
  (let [cmd-components (if opts ["svn" "log" shhh "--xml" opts object]
                                ["svn" "log" shhh "--xml"      object])]
    (if show (show-cmd cmd-components))
    (print "Fetching log... ")
    (flush)
    (let [result (:out (apply sh cmd-components))]
      (println)
      result)))

;; Obtain a diff from svn for the given object between the specified revisions.
;; Break each diff into blocks (delineated by the text "Index: "), where each
