Skip to content

Commit

Permalink
watchman for chromium (unsuccessful) attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jul 12, 2019
1 parent dd33151 commit 98873bb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
16 changes: 16 additions & 0 deletions cron/every-hour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,19 @@ cd "$HOME/code/pristine/devtools-protocol/scripts" && ./update-n-publish-docs.sh
# https://github.com/ChromeDevTools/devtools-frontend
cd "$HOME/code/npm-publish-devtools-frontend" && ./update-github-mirror.sh


# this was an attempt but it failed.
# i tried to make the chromium watch faster, but this just hangs there for a WHILE and doesnt return. dunno why its different running in the hook...

nstime=$(gdate +%s)
git_work_tree="/Users/paulirish/chromium/src"

read -r -d '' watchargs << EOM
["query", "$git_work_tree", { \
"since": $nstime,\
"fields": ["name"],\
"expression": ["not", ["allof", ["since", $nstime, "cclock"], ["not", "exists"]]]
}]
EOM

watchman -j $watchargs
9 changes: 4 additions & 5 deletions setup-a-new-machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,12 @@ git config status.showuntrackedfiles no
git update-index --untracked-cache


# !! EHHH. to be honest i tried this and it seems to be slow me down.
# use watchman with git 2.17 for src changes
# https://blog.github.com/2018-04-05-git-217-released/#speeding-up-status-with-watchman
# brew install watchman
# cd ~/chromium/src
# curl -o .git/hooks/query-watchman https://raw.githubusercontent.com/git/git/master/templates/hooks--fsmonitor-watchman.sample
# git config core.fsmonitor .git/hooks/query-watchman
brew install watchman
cd ~/chromium/src
curl -o .git/hooks/query-watchman https://raw.githubusercontent.com/git/git/master/templates/hooks--fsmonitor-watchman.sample
git config core.fsmonitor .git/hooks/query-watchman

# also this unrelated thing
git config user.email "[email protected]"
Expand Down

0 comments on commit 98873bb

Please sign in to comment.