Reputation: 13339
I'm reading about subpaths in mercurial, and still can't understand the following: if subpaths file isn't versioned, how am I supposed to have at least a "primary" source for this? Should I version a subpaths file inside my repo along with .hgignore and such, and just copy it to the .hg folder where I do a clone?
Upvotes: 1
Views: 1549
Reputation: 78330
I think that web page is really quite clear -- it certainly answers your specific questions when read carefully:
Q. if subpaths file isn't versioned, how am I supposed to have at least a "primary" source for this?
A. The entries in the subpaths file are propagated via the PushkeyConcept: the subpaths file is reproduced in clones of a repository and refreshed with every pull from the repository. The local subpaths file is completely overwritten with the entries obtained from the repository you pull from.
So you don't need to add it to the repository, but if both the client and the server have enabled the extension then the file will be created/overwritten on clone/push.
Q. Should I version a subpaths file inside my repo along with .hgignore and such, and just copy it to the .hg folder where I do a clone?
A. This is a new file that resides in the .hg directory of a repository. It is not version controlled.
So, no.
Upvotes: 4