Mercurial has the Subrepositories feature which essentially do configuration management of your other repositories. It is extremely easy to setup.
All you have to do is create the .hgsub file like this:
src/app = https://bitbucket.org/<user>/app
src/framework = https://bitbucket.org/<user>/framework
src/library = https://bitbucket.org/<user>/library
One repo per line, path to the left, URL to the right. When you commit, Mercurial will fetch those repositories and prompt you for credentials. After that, and each time you commit, the .hgsubstate file will change automatically depending on the states of your subrepos (revision, branch, or whatever you have selected in each one).
The left side represents the hash, the right side the path to the repo. This file is versioned, but as I mentioned earlier, it gets edited automatically by mercurial.
So if you make a commit on src/app, the hash is going to change. When you are happy with the combination of states in each subrepo you commit the parent repo. *BLAM!*, you have configuration management.
Edit: I just discovered the Hg Guest Repo extension and I think this is just what you need, quoting:
Extension for enterprises needing to handle modules and components
Hg subrepos do not handle the sharing of components well, due to
the recursive merge from the top (super) repo and requirement to
lock at a specific version.
Guestrepo's goal is to overcome these limitations.
The guestrepo extension does not change any existing Mercurial
behavior. It only adds new commands.