Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sub repository not updated properly?

David ROUCHET April 4, 2013

Hello,

I've created on Bitbukect a main repository named mainrepo and two other repositories named subrepo1 and subrepo2. As their names suggest there are sub-repositories of mainrepo.

I've defined a .hgsub file with specifies "subrepo1 = ../subrepo1" and "subrepo2 = ../subrepo2". I've also commited few files within these subrepo.

When I clone the mainrepo on a local folder I then obtain the correct structure with the two sub-repo nested within the local copy. I did also some changes in the code files and commit/push back either from mainrepo, subrepo1 or subrepo2. That is working fine. Bitbucket shows the actual changes.

Now, I decided to clone the subrepo2 into another completely different folder, made some changes on files and commit/push them back to bitbucket. I can see the commits and changes on Bitbucket but the problem is the following, within TortoiseHg Workbench:

- If I do an update from mainrepo, nothing is updated in the subrepo2, **the changes actually present in the files are not udpated in the local copy**.
- If I do this update from subrepo2, then the changes are properly applied to the local copy.

Is there something I did wrong or is there a bug/limitation of bitbucket sub-repository feature?

1 answer

1 accepted

0 votes
Answer accepted
aMarcus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2013

This is not a limitation of Bitbucket, rather it is how Mercurial is designed. A 'main' repo tracks the subrepositories at a specific revision. Doing a pull on the main repo will have no effect on the subrepos as the .hgsub file indicates what revision to track against the subrepos. You'd need to cd to the subrepo directory and run hg pull and then hg update to get the subrepository updated.

For more information about how Mercurial subrepositories function, see http://mercurial.selenic.com/wiki/Subrepository#Synchronizing_in_subrepositories.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events