Watches files and records, or triggers actions, when they change.
C++ Python Java PHP C CSS Other
Latest commit 616d9fb Mar 25, 2017 @wez wez committed with facebook-github-bot add .eden "magic" dir
Summary:
It's not really magic because we don't have a virtual directory
inode base any more.  Instead, we mkdir and populate it at mount time.

What is slightly magical about it is that we give it some special powers:

* We know the inode number of the eden dir and prevent unlink operations
  on it or inside it.
* The .eden dir is present in the contents of the root inode and will
  show up when that directory is `readdir`'d
* When resolving a child of a TreeInode by name, we know to return the
  magic `.eden` inode number.  This means that it is possible to `stat`
  and consume the `.eden` directory from any directory inside the eden
  mount, even though it won't show up in `readdir` for those child dirs.

The contents of the `.eden` dir are:

* `socket` - a symlink back to the unix domain socket that our thrift
  server is listening on.  This means that it is a simple
  `readlink(".eden/socket")` operation to discover both whether a directory
  is part of an eden mount and how to talk to the server.

* `root` - a symlink back to the root of this eden mount.  This allows
  using `readlink(".eden/root")` as a simple 1-step operation to find
  the root of an eden mount, and avoids needing to walk up directory
  by directory as is the common pattern for locating `.hg` or `.git`
  dirs.

Reviewed By: simpkins

Differential Revision: D4637285

fbshipit-source-id: 0eabf98b29144acccef5c83bd367493399dc55bb
Permalink
Failed to load latest commit information.
arcanist standardize on / dir separators on all platforms Dec 15, 2016
cmds tighten up accessing the view around a recrawl Mar 6, 2017
cppclient Fix crash on error getting socket from Watchman Feb 1, 2017
facebook allow building runtests.py with buck Dec 20, 2016
java Java transport on windows via named pipes (initial implementation) Mar 7, 2017
node version bumps for npm Jan 30, 2017
python build system-python dependent pywatchman for linux machines Mar 21, 2017
query tighten up accessing the view around a recrawl Mar 6, 2017
root tighten up accessing the view around a recrawl Mar 6, 2017
ruby/ruby-watchman Fix (spurious) test failure on big-endian architectures Aug 22, 2014
scm redirect stdin to null when spawning hg Mar 7, 2017
tests add .eden "magic" dir Mar 25, 2017
thirdparty watchman/thirdparty/jansson/load.cpp: avoid shadowing warnings Mar 9, 2017
travis travis: try upgrading to Python 3.5.2 Dec 16, 2016
watcher add .eden "magic" dir Mar 25, 2017
website make subscriptions scm aware Mar 1, 2017
winbuild add basic Mercurial scm awareness to since queries Mar 1, 2017
.clang-format add escaping for mixed strings Dec 15, 2016
.gitattributes Fix favicon in website Aug 7, 2015
.gitignore Open source Watchman C++ client library Feb 1, 2017
.hgignore Open source Watchman C++ client library Feb 1, 2017
.travis.yml Add configure checks for C++11 compiler Sep 16, 2016
ChildProcess.cpp redirect stdin to null when spawning hg Mar 7, 2017
ChildProcess.h redirect stdin to null when spawning hg Mar 7, 2017
ContentHash.cpp watchman/ContentHash.cpp: avoid shadowing warnings Mar 9, 2017
ContentHash.h add content hash cache warming heuristics Feb 4, 2017
CookieSync.cpp standardize on / dir separators on all platforms Dec 15, 2016
CookieSync.h factor cookie sync out into its own class Oct 19, 2016
FileDescriptor.cpp add FileDescriptor::isNonBlock() method Dec 8, 2016
FileDescriptor.h add FileDescriptor::isNonBlock() method Dec 8, 2016
Future.h watchman/Future.h: avoid shadowing warnings Mar 9, 2017
InMemoryView.cpp tighten up accessing the view around a recrawl Mar 6, 2017
InMemoryView.h add basic Mercurial scm awareness to since queries Mar 1, 2017
LICENSE initial commit Nov 30, 2012
LRUCache.h add content hash cache warming heuristics Feb 4, 2017
Logging.h fix double logging bug Jan 29, 2017
Makefile.am add basic Mercurial scm awareness to since queries Mar 1, 2017
Pipe.cpp refactor: reuse FileDescriptor, add Pipe class Nov 29, 2016
Pipe.h refactor: reuse FileDescriptor, add Pipe class Nov 29, 2016
PubSub.cpp Publisher::getPending is now O(my-unseen-items) Jan 9, 2017
PubSub.h Publisher::getPending is now O(my-unseen-items) Jan 9, 2017
QueryableView.cpp refactor errmsg -> throw QueryXXXError Feb 10, 2017
QueryableView.h add basic Mercurial scm awareness to since queries Mar 1, 2017
README.markdown Re-did the AppVeyor project, update link Aug 7, 2015
Result.h add basic Future implementation Feb 3, 2017
TARGETS enable StreamingEdenService Mar 2, 2017
ThreadPool.cpp add a simple thread pool Feb 3, 2017
ThreadPool.h add a simple thread pool Feb 3, 2017
Win32Handle.cpp add Win32Handle class Nov 29, 2016
Win32Handle.h add Win32Handle class Nov 29, 2016
acinclude.m4 Add configure checks for C++11 compiler Sep 16, 2016
appveyor.yml Fixup appveyor Mar 3, 2017
autogen.sh Open source Watchman C++ client library Feb 1, 2017
bser.cpp add escaping for mixed strings Dec 15, 2016
cfg.cpp remove pthread usage from cfg.cpp Nov 30, 2016
checksock.cpp BSERv2: allow emitting unicode strings on the server Dec 13, 2016
circle.yml circleci: bump up php version Jun 6, 2016
clientmode.cpp re-jigger log subscriptions Nov 3, 2016
clockspec.cpp tighten up accessing the view around a recrawl Mar 6, 2017
configure.ac take version number up to 4.9 Feb 7, 2017
error_category.cpp add error_category / error_condition Nov 29, 2016
expflags.cpp remove MIN, MAX defines Nov 4, 2016
fstype.cpp refactor windows path conversion Nov 30, 2016
hash.cpp mostly rename .c -> .cpp Sep 16, 2016
ignore.cpp standardize on / dir separators on all platforms Dec 15, 2016
ioprio.cpp mostly rename .c -> .cpp Sep 16, 2016
json.cpp expose BSERv2 capability, use it by default, force it on on py3 Dec 15, 2016
launchd.cpp remove client shutdown hack Nov 30, 2016
listener-user.cpp use unique_ptr to own watchman_stream Nov 29, 2016
listener.cpp avoid a couple of crashes Feb 16, 2017
log.cpp fix double logging bug Jan 29, 2017
main.cpp rename w_clockspec -> ClockSpec Mar 1, 2017
make.bat pass more command line args to make on windows Sep 27, 2016
make_unique.h art: cut over to unique_ptr for nodes Nov 1, 2016
opendir.cpp standardize on / dir separators on all platforms Dec 15, 2016
opt.cpp update copyright year in the CLI usage output Jan 17, 2017
pending.cpp fixup pending list linkage mutation Dec 19, 2016
perf.cpp tighten up accessing the view around a recrawl Mar 6, 2017
probe.py refactor: reuse FileDescriptor, add Pipe class Nov 29, 2016
runtests.py fix --debug-watchman in test runner Jan 4, 2017
spawn.cpp tighten up accessing the view around a recrawl Mar 6, 2017
state.cpp c++ify watchman_json_buffer Nov 30, 2016
stream.cpp remove w_stm_xxx accessor functions Nov 29, 2016
stream_stdout.cpp expose the client pid in our stream layer Dec 8, 2016
stream_unix.cpp expose the client pid in our stream layer Dec 8, 2016
stream_win.cpp expose the client pid in our stream layer Dec 8, 2016
string.cpp add ChildProcess::communicate Mar 6, 2017
time.cpp mostly rename .c -> .cpp Sep 16, 2016
timedlock.cpp remove MIN, MAX defines Nov 4, 2016
watchman.h remove some old unused stuff from watchman.h Feb 10, 2017
watchman_client.h make subscriptions scm aware Mar 1, 2017
watchman_clockspec.h add basic Mercurial scm awareness to since queries Mar 1, 2017
watchman_cmd.h BSERv2: allow emitting unicode strings on the server Dec 13, 2016
watchman_config.h remove json_t* from all top level header files Nov 1, 2016
watchman_dir.h watchman_file::getName -> return string_piece Nov 29, 2016
watchman_error_category.h add error_category / error_condition Nov 29, 2016
watchman_file.h watchman_file::getName -> return string_piece Nov 29, 2016
watchman_getopt.h refactor: break watchman.h into separate header files Sep 16, 2016
watchman_hash.h add content hash as an available field Feb 3, 2017
watchman_ignore.h unordered_set and vector for ignore internals Nov 1, 2016
watchman_log.h re-jigger log subscriptions Nov 3, 2016
watchman_opendir.h we don't need strict symlink checks for the state dir Dec 6, 2016
watchman_pdu.h add some more tests for BSER decoding Dec 15, 2016
watchman_pending.h refactor errmsg -> throw QueryXXXError Feb 10, 2017
watchman_perf.h refactor errmsg -> throw QueryXXXError Feb 10, 2017
watchman_preprocessor.h re-jigger log subscriptions Nov 3, 2016
watchman_query.h switch query context from ClockPosition -> ClockSpec Mar 1, 2017
watchman_root.h tighten up accessing the view around a recrawl Mar 6, 2017
watchman_scopeguard.h add port of folly/ScopeGuard.h Nov 18, 2016
watchman_shared_mutex.h remove pthread port for win32 Nov 30, 2016
watchman_stream.h expose the client pid in our stream layer Dec 8, 2016
watchman_string.h add ChildProcess::communicate Mar 6, 2017
watchman_synchronized.h fix open source build Oct 21, 2016
watchman_system.h standardize on / dir separators on all platforms Dec 15, 2016
watchman_time.h add content hash as an available field Feb 3, 2017
watchman_trigger.h triggers now use ChildProcess::Environment rather than envht Jan 23, 2017
watchman_watcher.h add basic eden integration test Dec 20, 2016

README.markdown

Watchman

A file watching service.

Purpose

Watchman exists to watch files and record when they actually change. It can also trigger actions (such as rebuilding assets) when matching files change.

Documentation

Head on over to https://facebook.github.io/watchman/

Build Status

Build Status

Build status

License

Watchman is made available under the terms of the Apache License 2.0. See the LICENSE file that accompanies this distribution for the full text of the license.