The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Sub repository not updated properly?

David ROUCHET
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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.

TAGS
AUG Leaders

Atlassian Community Events