Git's filesystem layout has always been stable and Git encouraged developers to target it. Mercurial strongly cautioned developers away from its filesystem or source code APIs and told them to subprocess out to the CLI. To be clear, I dislike Git, but it was _designed_ with developers in mind (which isn't to say that it has a nice API, only that the Git people intended for Git to be extended). I prefer Mercurial's concepts and interface, but Mercurial was somewhere between indifferent and hostile toward developers.