Cloning a project clones the subrepo from the wrong remote path
Cathryn Griffiths
cathryn at ffctn.com
Tue Mar 7 15:08:17 UTC 2017
Hi all,
I'm having trouble cloning one of my mercurial project repos that has a
subrepo whose remote path has changed during the course of the project.
I was hoping the community could provide some guidance on either how to
fix this and/or why this is happening.
Here's the situation:
My project has a subrepo whose remote path has changed (Original path
[Version 1]: git at bitbucket.org:<subrepoversion1>; New path [Version 2]:
ssh://hg@bitbucket.org/<subrepoversion2>). I changed the path in the
.hgsub file from that of Version 1 to that of Version 2. The .hgsubstate
file was also updated to include the latest commit from Version 2.
When I clone my project, the subrepo that gets cloned is that of Version
1, not Version 2. The cloning process then tries to checkout the commit
that's provided in the .hgsubstate file. Since that commit belongs to
subrepo Version 2, the clone aborts and shows an error message that
"revision f3c8dab575b2d97eade69b06da1fcc2a06ba40eb does not exist in
subrepo deps/ff-libs". Here's the output from the clone:
requesting all changes
adding changesets
adding manifests
adding file changes
added 10 changesets with 114 changes to 95 files
cloning subrepo deps/ff-libs from git at bitbucket.org:<subrepoversion1>
Cloning into '<myprojectpath>/deps/ff-libs'...
remote: Counting objects: 3923, done.
remote: Compressing objects: 100% (1703/1703), done.
remote: Total 3923 (delta 2850), reused 3061 (delta 2202)
Receiving objects: 100% (3923/3923), 1.28 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2850/2850), done.
Checking connectivity... done.
checking out detached HEAD in subrepo deps/ff-libs
check out a git branch if you intend to make changes
79 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating to branch default
pulling subrepo deps/ff-libs from git at bitbucket.org:<subrepoversion1>
abort: revision f3c8dab575b2d97eade69b06da1fcc2a06ba40eb does not exist
in subrepo deps/ff-libs
(in subrepo deps/ff-libs)
Here's the .hgsub file contents:
deps/ff-libs = ssh://hg@bitbucket.org/<subrepoversion2>
... and the .hgsubstate file contents:
f3c8dab575b2d97eade69b06da1fcc2a06ba40eb deps/ff-libs
Why is the cloning process pulling subrepo Version 1 and not subrepo
Version 2?
In case it's relevant, I'm using Mercurial version 3.7.3 on Ubuntu 16.04.
Thanks!
Cathryn
More information about the Mercurial
mailing list