       xs))
    (lazy-seq (println "done"))))
 
-(defn parse-sha-refs
-  [s]
-  (let [[sha datestr parents refstr] (vec (.split #"," s 4))
-        refs (when refstr
-               (when-let [[_ x] (re-find #"\((.*)\)" refstr)]
-                 (mapv #(s/replace % #"^tag: " "") (.split #",\s+" x))))]
-    {:sha sha, :ctime (Date. ^String datestr), :parents parents, :refs refs}))
-
-(defn project-change-shas
-  [gitdir & opts]
-  (->> (apply git {:gitdir gitdir} "log" "--pretty=format:%H,%cd,%p,%d"
-              "--name-status" "-m" opts)
-       :lines
-       (keep #(if-let [[_ op path] (re-matches #"(.)\t(.*)" %)]
-                (when (re-find #"(^|/)project\.clj$" path)
-                  {:op op :path path})
-                (when (seq %)
-                  (parse-sha-refs %))))
-       (#(concat % [{:sha "end sigil"}]))
-       (reductions (fn [[partial complete] entry]
-                     (if (:sha entry)
-                       [entry partial]
-                       [(update-in partial [:ops] (fnil conj []) entry) nil]))
-                   [nil nil])
-       (keep second)
-       (filter :ops)))
-
-(def repo-tag-version "2")
-
-(defn get-repo-tag-version
-  [gitdir]
-  (-> (git {:gitdir gitdir :ok-statuses #{0 1}}
-           "config" "--local" "voom.tag-version") :out s/trim))
-
-(defn set-repo-tag-version
-  [gitdir ver]
-  (git {:gitdir gitdir :ok-statuses #{0 5}}
-       "config" "--local" "--unset-all" "voom.tag-version")
-  (git {:gitdir gitdir}
-       "config" "--local" "--add" "voom.tag-version" (str ver)))
-
-(defn clear-voom-tags
-  [gitdir]
-  (let [tags (->> (git {:gitdir gitdir} "tag" "--list" "voom-*")
-                  :lines
-                  (remove empty?))]
-    (when (seq tags)
-      (apply git {:gitdir gitdir} "tag" "--delete" tags)
-      nil)))
-
-(defn tag-repo-projects
-  [gitdir]
-  (when (not= repo-tag-version (get-repo-tag-version gitdir))
-    (clear-voom-tags gitdir))
-  (let [branches (origin-branches gitdir)
-        proj-shas (apply project-change-shas gitdir
-                         "--not" "--tags=voom-branch--*"
-                         (map #(str #_double-negative--> "^origin/" %) branches))]
-
-    ;; add missing voom-- tags
-    (doseq [:when (seq proj-shas)
-            {:keys [sha refs parents ops]} (report-progress gitdir proj-shas)
-            {:keys [op path]} ops]
-      (when-let [p (if (= "D" op)
-                     {:root (str (.getParent (io/file path)))}
-                     (robust-read-project gitdir sha path))]
-        (let [snaps (some #(.contains ^String % "-SNAPSHOT")
-                         (map second (:dependencies p)))
-              tag (s/join "--" (-> ["voom"
-                                    (str (:group p)
-                                         (when (:group p) "%")
-                                         (:name p))
-                                    (:version p)
-                                    (s/replace (:root p) #"/" "%")
-                                    (subs sha 0 7)
-                                    (when snaps "snaps")
-                                    (when (empty? parents) "no-parent")]))]
-          (git {:gitdir gitdir} "tag" "-f" tag sha))))
-
-    ;; TODO: clean up abandoned voom-- and voom-branch-- tags
-    ;; Update all voom-branch-- tags
-    (doseq [branch branches]
-      (let [tag (str "voom-branch--" branch)]
-        (git {:gitdir gitdir} "tag" "-f" tag (str "origin/" branch)))))
-  (set-repo-tag-version gitdir repo-tag-version))
-
 (defn p-repos
   "Call f once for each repo dir, in parallel. When all calls are
   done, return nil."

  [project & args]
  (apply wrap project "deploy" args))

(defn retag-all-repos
  "Clear and recreate all voom index tags in $VOOM_REPOS.

  You shouldn't need to use this usually because the index tags are
  automatically added incrementally and re-generated when tag schemas
  change.

  Example: lein voom retag-all-repos"
  [_]
  (time (p-repos (fn [p] (clear-voom-tags p) (tag-repo-projects p)))))

;; ===== Git import =====


  [proj & adeps]
  (let [deps (fold-args-as-meta (map edn/read-string adeps))]
    (ensure-deps-repos deps)
    (doseq [dep deps
            :let [full-projs (if (.contains (str dep) "/")
                               [dep]
