strikethrough
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amnesia:jiraph develop$ lein test | |
lein test jiraph.cache-test | |
lein test jiraph.core-test | |
FAIL in (multi-layer-transactions) (core_test.clj:273) | |
expected: (= {:edges {"y" {:times [1]}}} (get-node :sorted "x")) | |
actual: (not (= {:edges {"y" {:times [1]}}} {:edges {"y" {:times (1 1)}}})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn error [& args] | |
(binding [*out* *err*] | |
(apply println "Error:" args))) | |
(defn- load-hook [hook-ns] | |
(when-let [hook (try (utils/resolve-symbol (symbol (name hook-ns) "activate")) | |
(catch Throwable e | |
(error "problem activating" hook-ns "hook") | |
(throw e)))] | |
(try (hook) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro with-error-header | |
"Execute the code in body, printing the given error message if something goes wrong." | |
[message & body] | |
`(try ~@body | |
(catch Throwable e | |
(binding [*out* *err*] | |
(println message)) | |
(throw e)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bin/lein b/bin/lein | |
index ac3cd58..dd06a53 100755 | |
--- a/bin/lein | |
+++ b/bin/lein | |
@@ -213,6 +213,8 @@ else | |
if [ "$OSTYPE" = "cygwin" ]; then | |
TRAMPOLINE_FILE=`cygpath -w $TRAMPOLINE_FILE` | |
fi | |
+ args="$@" | |
+ args=${args/#:/with-profile } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/clj_gedcom/core.clj | |
+++ b/src/clj_gedcom/core.clj | |
@@ -67,9 +67,9 @@ | |
"Parses GEDCOM records from a file or reader, returning map of labels to records." | |
[in] | |
(reduce (fn [records record] | |
- (let [label (:label record)] | |
- (when (contains? records label) | |
- (throw (Exception. (format "duplicate record in GEDCOM for label %s" label)))) | |
- (assoc records label record))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/gedcom_importer/core.clj | 6 +++--- | |
src/gedcom_importer/indi.clj | 13 ++++++++----- | |
2 files changed, 11 insertions(+), 8 deletions(-) | |
diff --git a/src/gedcom_importer/core.clj b/src/gedcom_importer/core.clj | |
index 8eaa08f..9ccea9f 100644 | |
--- a/src/gedcom_importer/core.clj | |
+++ b/src/gedcom_importer/core.clj | |
@@ -19,8 +19,8 @@ | |
:when (not (contains? (:profiles processing) profile-id))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WrappedTransactional | |
(txn-wrap [this f] | |
(let [f (txn-wrap layer f)] | |
(fn [^MergeableLayer layer] | |
(f (.layer layer))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(letfn [(exists? [over-layer id exists] (and exists (not (node-deleted? over-layer id)))) | |
(deleted? [over-layer id deleted] (or deleted (node-deleted? over-layer id)))] | |
(defn mark-edges-deleted [over-layer incoming? keyseq node] | |
(if-let [ks (edges-keyseq keyseq)] | |
(update-in* node ks fixing map? map-vals-with-keys | |
(if incoming? | |
(partial exists? over-layer) | |
(fn [id edge] | |
(update edge :deleted (partial deleted? over-layer id))))) |