|
|
@@ -74,13 +74,13 @@
|
|
|
:fs/reset-event - the event that triggered the file update
|
|
|
:fs/local-file-change - file changed on local disk
|
|
|
:fs/remote-file-change - file changed on remote"
|
|
|
- [repo-url file content {:fs/keys [event] :as options}]
|
|
|
+ [repo-url file-path content {:fs/keys [event] :as options}]
|
|
|
(let [db-conn (db/get-db repo-url false)]
|
|
|
(case event
|
|
|
;; the file is already in db, so we can use the existing file's blocks
|
|
|
;; to do the diff-merge
|
|
|
:fs/local-file-change
|
|
|
- (graph-parser/parse-file db-conn file content (assoc-in options [:extract-options :resolve-uuid-fn] diff-merge-uuids-2ways))
|
|
|
+ (graph-parser/parse-file db-conn file-path content (assoc-in options [:extract-options :resolve-uuid-fn] diff-merge-uuids-2ways))
|
|
|
|
|
|
;; TODO Junyi: 3 ways to handle remote file change
|
|
|
;; The file is on remote, so we should have
|
|
|
@@ -90,7 +90,7 @@
|
|
|
;; 2. a "remote version" just fetched from remote
|
|
|
|
|
|
;; default to parse the file
|
|
|
- (graph-parser/parse-file db-conn file content options))))
|
|
|
+ (graph-parser/parse-file db-conn file-path content options))))
|
|
|
|
|
|
(defn reset-file!
|
|
|
"Main fn for updating a db with the results of a parsed file"
|