-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitor against individual file timestamp changes instead of System/currentTimeMillis #5
Conversation
…f System/currentTimeMillis
Hmm, I'm noticing that this is failing tests.. I'll look into it.. |
… files, initial dependency graph was incorrectly setup and "src" was hardcoded.
Could you fix the commit messages so that the first line is less than 70 characters? In general, Git commit messages have a short first line, and then a more detailed description on later lines. That way you don't get a "cut off" message when viewing the logs in GitHub or with |
(defn- newer-sources [dirs timestamp] | ||
(filter #(> (.lastModified %) timestamp) (find-sources dirs))) | ||
(defn- current-timestamp-map | ||
"Get a the current modified timestamp map for all sources" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo
Instead of comparing all file modification dates against a fixed time, a map is kept to determine which have changed. Fixes #3.
Fixed broken tests, last modified file needed to handle new files, initial dependency graph was incorrectly setup and "src" was hardcoded.
Ok, I've amended the commit - I hope that was the correct procedure :/ I'll be careful not to have too long commit messages in future - also fixed the small typo :) |
Could you rebase the changes so the history is clean? i.e. perform a git rebase to get rid of the merge commit and to join the other commits into one. |
I tried that locally, and it just ended up changing the log back to the long 70+ character log. I guess I can delete my fork again and reapply the changes.. just seems a bit overkill for such a simple change. |
The trick is to perform an interactive rebase against my Hiccup repository: $ git remote add upstream https://github.com/weavejester/ns-tracker.git
$ git fetch upstream
$ git rebase -i upstream/master This will get you some text in an editor like this:
What we want to do is to squash all of the commits together, so:
Save and quit, then you'll get another editor for writing the new commit message. You could write something like:
Save and quit again, and your history should be clean and tidy. |
Thanks, that was a helpful and interesting, but i did that and ended up with yet another merge message. So, I've deleted that fork and created a new one, really can't afford to be messing around with git repo's, I have actual work to get done. |
I've tweaked the code to keep a map of all the files and their last modified times, basing namespace file changes on that instead of the current system time. My initial pass did a double pass on all the files for every check, but this version only does a single pass, so besides the memory overhead of the map, it's effectively the same I/O cost.