   (def xdb3 (rels->pldb [r-tree] (fress/read (fress/write (pldb-rels xdb1)))))
   (pldb/with-db xdb3 (l/run* [a] (r-tree a :b :c :d)))
 
-  (time (def db (apply pldb/db (git-logic-tuples "<git repo>"))))
-  (time (fress-spit-seq "tmp.frs" (pldb-rels db)))
-  (time (def db2
+  (time (def db (apply pldb/db (git-logic-tuples (io/file voom-repos "lein-voom")))))
+  (time (def db2 (add-r-projs (io/file voom-repos "lein-voom") db)))
+  (time (fress-spit-seq "tmp.frs" (pldb-rels db2)))
+  (time (def db3
           (rels->pldb [r-branch r-commit r-commit-parent r-tree r-proj]
                       (fress/read "tmp.frs" :handlers my-read-handlers))))
   (time (def x (fress/read "tmp.frs" :handlers my-read-handlers)))

  (time
   (let [fname "core.clj"]
     (doall
      (pldb/with-db db
        (l/run 10 [c-sha tree-path obj-sha]
               (l/fresh [tree-sha ctime p-sha p-ctime p-tree-sha p-obj-sha]
                        (r-commit c-sha ctime tree-sha)

                     (r-commit-parent childer nparent)
                     (ancestoro nparent parenter))])))

(defn sem-ver-parse [ver-str]
  (let [vparts (re-matches #"(?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)-)?(.*)" ver-str)
        [vqual & vnums] (reverse (filter identity (next vparts)))
        [vmajor vminor vinc] (map #(if (and (string? %) (re-matches #"[0-9]*" %))
                                     (Integer/parseInt %)
                                     %) (reverse vnums))]
    [vmajor vminor vinc vqual]))

(defn add-r-projs
  [gitdir db]
  (pldb/with-db db
    (let [proj-blobs (l/run* [blob-sha]
                       (l/fresh [proj-dir-sha]
                         (r-tree proj-dir-sha "project.clj" :blob blob-sha)))
          read-blobs (l/run* [blob-sha]
                       (l/fresh [proj-name vmajor vminor vinc vqual has-snaps?]
                         (r-proj blob-sha proj-name
                                 vmajor vminor vinc vqual has-snaps?)))
          blobs-to-read (apply disj (set proj-blobs) read-blobs)]
      (reduce
       (fn [db blob-sha]
         (if-let [proj (robust-read-proj-blob gitdir blob-sha)]
           (let [proj-name (symbol (:group proj) (:name proj))
                 has-snaps? (some #(.contains ^String % "-SNAPSHOT")
                                  (map second (:dependencies proj)))
                 [vmajor vminor vinc vqual] (sem-ver-parse (:version proj))]
             (pldb/db-fact db r-proj blob-sha proj-name
                           vmajor vminor vinc vqual has-snaps?))
           db))
       db
       blobs-to-read))))

(comment
  (def xdb1 (pldb/db [r-tree :a :b :c :d]))
  (pldb/with-db xdb1 (l/run* [a] (r-tree a :b :c :d)))
