In my web projects (Django framework) I typically have a few internally developed javascript files that are shared among them. These web projects are stored in seperate mercurial source code repositories. Here's the relevant directory structure:
+ static
--+ css
--+ images
--+ js
-----+ thirdparty
-----+ mycompany
--------+ shared_lib1.js
--------+ shared_lib2.js
--------+ project_only_lib.js
-----+ tests
Linking to the scripts in html looks like so:
<script src="/static/js/mycompany/shared_lib1.js" type="text/javascript"></script>
Currently, when I make a change (say fix a bug) in one of the shared libs and check it in, the updated code only exists in the one repository. So for now I manually copy the changes over to the other repositories and check it in.
This seems pretty dumb.
Is there something else I should be doing that allows me to change the javascript, commit it to source control, and have the changes reflected in the other web projects?