0
votes

I've started to clone the repository to my local computer. The repository contains 2 subrepositories. First of all these 2 subrepositories have refererences to other repositories into the same mercurial (.hgsub file contains the path). Laterly (as I can see into the file revision history) another programmer modified .hgsub file with another path to the same named repository, which hosted onto another server, where I've no access. Laterly he referenced these subrepositories back to the primary repositories onto our server. So the most to date repository contains code just from our server.

So I've started to clone the repository. Mercurial apparently applies all the revisions which was made from the beggining. And when it comes to the revision subrepositories path are changed, it ask for authorization into that other server Mercurial. I have no access to that server. So, cloning process stopes here with status Failed. I've cloned these two subrepositories separately and copy-paste them into the proper place of my local repository. Open the main solution and try to build it, but get errors because of some project references to libs were outdated. I deleted them and reference again. Try to build again, but some libs does not contain some methods. And I could not update them to the last revision because of cloning was not success. I'm at a loss. Does anybody encountered a similar situation?

1

1 Answers

1
votes

Try cloning the main repo without updating the working directory at the same time, that should allow you to pull the main repo without pulling the subrepos at the same time. If this doesn't work then just skip this step.

Then try adding a [subpaths] section to the hgrc file for the repo or to your mercurial.ini file (under your C:\users\username\ folder).

The subpaths section allows you to remap portions of file paths, and is ideal for when the full path to the subrepo is in .hgsub but the repo has moved.

The format for each line is

original path = new path

And it definitely supports regular local file paths, UNC paths, http(s) and ssh.

Here are some example subpaths lines:

[subpaths]
https://code.server.com/originalrepo = ssh://other.server.com/movedrepo
https://code.server.com/originalrepo = https://other.server.com/movedrepo
C:\\Projects\\originalrepo\\ = \\server\projects\movedrepo\

Note that the path on the left of the = has to have backslashes properly escaped, the path on the right does not.