I'm new to mercurial and tortoise and I have some problems trying to understand how to work with sub-projects.
I have three folders called UART, SPI and ADC. These folders contain code to use the uart, spi and adc for a microcontroller family. These code is not tied to any project and on the contrary, this code is designed and developed individually to be used in any project. So, I created a repository for each one and have them under version control with hg.
But recently I decided to start a project called "Project A" which uses the ADC and the UART. I create the "Project A" folder, create a main.c file, and finally create a repository in the "Project A" folder, add the main.c file, and commit it.
My problem here is that I want to somehow "add" or "link" the UART and ADC code to my "Projet A" without copy-paste the folders manually, I mean, to handle the UART and ADC code as sub-projects independent from the "Project A" and have hg to copy the most recent version for UART and ADC to the "main" project. Then if a change is needed in UART code for example, then the change is made in the UART code, commit the change to the UART project and just "update" it to the last version whithin all projects that have UART code added or linked.
I have read:
Mercurial - Add project which is not within repository folder
Do all files have to be in the 'repository folder' when using Mercurial?
Mercurial for Beginners: The Definitive Practical Guide
And I can't find the answer to my question. I found a very neat and straight-to-the-point tutorial about subprojects but it didn't really help (http://tomtech999.wordpress.com/2011/12/17/getting-started-with-mercurial-subrepositories/ )
Could you give me a series of steps to follow or a link to some tutorial to accomplish this?
Regards!
Like msw, I love that you explain what you've already read! I suggest reading
hg help subrepos
.