commit .hgsubstate after remove from .hgsub

Yuya Nishihara yuya at tcha.org
Sat Feb 18 04:37:33 UTC 2017


On Fri, 17 Feb 2017 09:23:53 -0500, Jérôme Godbout wrote:
> how does one keep the right sub version between checkout/revision then? is
> that kept into the commit action somewhere into the .hg?

No. subrepo revisions are kept in .hgsubstate.

> I'm a bit confuse how the info inside the .hgsubstate is transfer from one
> revision to another. I though that the .hgsubstate was the only place where
> this info was kept and since you do want a particular revision not
> necessarily the default sub head.
> 
> So if I go back to main rev 12, I want the sub to go back to the same
> revision when I was using rev 12 too. The way we found to do this is commit
> the .hgsubstate but if that information is kept somewhere else I would
> remove it from the commit file list.
> 
> It does feel strange that the .hgsubstate is not simply a regular commited
> file like .hgsub is. But again, maybe there is an underlayer I don't see at
> work here.

.hgsubstate is a regular file, but its contents are managed by hg, something
like .hgtags. You shouldn't edit it manually, but you just need to commit the
changes made by hg.



More information about the Mercurial mailing list