I have a Windows file structure like so:
Stable
ProjectA
SharedLibrary
Stable
contains the main repo. ProjectA
and SharedLibrary
are subrepos of Stable
. The .hgsub
file contains:
ProjectA = ProjectA
SharedLibrary = SharedLibrary
Everything seems to work correctly for the most part. The main repo will recognize the subrepos, and I can do things like hg status -S
on the main repo and it will recurse through the subrepos. commit
also seems to work correctly.
When I try to clone
from Stable
(main repo), it fails when attempting to clone the ProjectA
subrepo with the following message:
unknown revision 'a855f4fe17c393d5863409f1443fc93b36787fa9'
[command returned code 255 Mon Mar 12 09:25:47 2012]
However, I have verified that the revision is correct and present in the ProjectA
subrepo. I can clone
each subrepo without any problems.
So far I have tried: 1) Deleting each repository and starting over. 2) Re-installing TortoiseHg/Mercurial. 3) Making sure the revision listed in .hgsubstate is correct and present in each subrepo.
Any way to fix this?
EDIT:
When the clone
of the Stable
(main) repo fails, it leaves the target directory with a clone of Stable
without any subrepos. I can go to the cloned Stable
, do an hg update tip
, and it will successfully clone the ProjectA
subrepo but fail to clone SharedLibrary
with the same 'unknown revision' error. I can then run hg update tip
again, and it will successfully clone the SharedLibrary
subrepo. At that point everything is correct as it would be if the clone had worked correctly in the first place.
EDIT 2: Contents of .hgsubstate
:
a855f4fe17c393d5863409f1443fc93b36787fa9 ProjectAd72ef29a5656e5413322c1d20d5830448d558605 SharedLibrary
There is no space between ProjectA
and the changeset id for SharedLibrary
, but I guess that is just the way Mercurial does it. Both changesets in .hgsubstate
are present in the respsective subrepo.
EDIT 3: hg log --debug -r tip
from ProjectA
subrepo. showing correct changeset is present
Z:\Programming\KSuite\Stable\Client\KClient>hg log --debug -r tip
changeset: 4:a855f4fe17c393d5863409f1443fc93b36787fa9
tag: tip
parent: 3:eb01e88027c893267422fcb67f035ba31d8cdbdc
parent: 2:5b5ffd7f96915ca792507820ccfbee35707148d0
manifest: 4:e90960833c0708ec7f99ccded11c46ca45b46542
user: Casey ******** <*redacted*@.com>
date: Fri Mar 09 18:22:50 2012 -0500
files: .hgignore
files-: KClient.suo
extra: branch=default
description:
Merging changes in Stable to Dev.