commit .hgsubstate after remove from .hgsub

Ludovic Chabant ludovic at chabant.com
Sat Feb 18 16:37:34 UTC 2017


I'm not sure I totally understand your problem but I know that I had a 
lot less problems with subrepos the day I understood that Mercurial 
wants a "global commit" to update and manage the .hgsubstate file and 
the other subrepo-related stuff. By "global commit" I mean a commit that 
does not specify files to commit, or use any exclude patterns. Basically 
a straight up "hg commit".

So maybe you have problems because you're trying to run something like 
"hg commit .hgsub", or some other filtered-down commit?

> Jérôme Godbout <mailto:jerome at bodycad.com>
> February 18, 2017 at 6:42 AM
> The problem is that hg doesn't let me commit the file telling me that 
> there is no local change event if .hgsubstate have modification where 
> I remove the removed subrepos revision entry. When updating to 
> revision Tortoisehg complain about it that something need to be 
> commit. but I can't commit that file change even by command line.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> Yuya Nishihara <mailto:yuya at tcha.org>
> February 17, 2017 at 8:37 PM
> 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.
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> Jérôme Godbout <mailto:jerome at bodycad.com>
> February 17, 2017 at 6:23 AM
> how does one keep the right sub version between checkout/revision 
> then? is that kept into the commit action somewhere into the .hg?
>
> 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.
>
> Thanks,
> Jerome
>
> bodycad <https://www.bodycad.com/>	
> Jerome Godbout
> Software Developer
> 2035 rue du Haut-Bord, Québec, QC, Canada. G1N 4R7
> T: +1 418 527-1388
> E: jerome at bodycad.com <mailto:jerome at bodycad.com>
> www.bodycad.com <http://www.bodycad.com/>
>
> The contents of this email message and any attachments are intended 
> solely for the addressee(s) and may contain confidential and/or 
> privileged information and may be legally protected from disclosure. 
> If you are not the intended recipient of this message or their agent, 
> or if this message has been addressed to you in error, please 
> immediately alert the sender by reply email and then delete this 
> message and any attachments. If you are not the intended recipient, 
> you are hereby notified that any use, dissemination, copying, or 
> storage of this message or its attachments is strictly prohibited.
>
> Le contenu de ce message et les pièces jointes sont destinés 
> uniquement pour le(s) destinataire(s) et peuvent contenir des 
> informations confidentielles et / ou privilégiées qui peuvent être 
> protégées légalement contre toute divulgation. Si vous n'êtes pas le 
> destinataire de ce message ou son agent, ou si ce message vous a été 
> adressé par erreur, s’il vous plaît avertir immédiatement l'expéditeur 
> par courriel de réponse, puis supprimer ce message et les pièces 
> jointes. Si vous n'êtes pas le destinataire prévu, vous êtes par la 
> présente informé que toute utilisation, diffusion, copie, ou stockage 
> de ce message ou de ses pièces jointes est strictement interdit.
>
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> Yuya Nishihara <mailto:yuya at tcha.org>
> February 17, 2017 at 5:58 AM
>
> It appears .hgsubstate is updated automatically, so you only need to edit
> .hgsub and commit.
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> Jérôme Godbout <mailto:jerome at bodycad.com>
> February 16, 2017 at 1:07 PM
> Hi,
>
> First we have a main repos with both .hgsub and .hgsubstate commited 
> into the main repos itself.
>
> We had a sub repos we wanted to be removed so we end up removing the 
> entry from the .hgsub file of the main repos.
>
> But we don't seem to be able to commit the .hgsubstate and this give 
> us some problems and warnings when updating and merging after this.
>
> How does one sanitize (it's just removing the hash line for that gone 
> sub repos) the .hgsubstate for pushing or commit modification?
>
> What is the normal procedure to remove a sub repos?
> Thanks,
>
>
> bodycad <https://www.bodycad.com/>	
> Jerome Godbout
> Software Developer
> 2035 rue du Haut-Bord, Québec, QC, Canada. G1N 4R7
> T: +1 418 527-1388
> E: jerome at bodycad.com <mailto:jerome at bodycad.com>
> www.bodycad.com <http://www.bodycad.com/>
>
> The contents of this email message and any attachments are intended 
> solely for the addressee(s) and may contain confidential and/or 
> privileged information and may be legally protected from disclosure. 
> If you are not the intended recipient of this message or their agent, 
> or if this message has been addressed to you in error, please 
> immediately alert the sender by reply email and then delete this 
> message and any attachments. If you are not the intended recipient, 
> you are hereby notified that any use, dissemination, copying, or 
> storage of this message or its attachments is strictly prohibited.
>
> Le contenu de ce message et les pièces jointes sont destinés 
> uniquement pour le(s) destinataire(s) et peuvent contenir des 
> informations confidentielles et / ou privilégiées qui peuvent être 
> protégées légalement contre toute divulgation. Si vous n'êtes pas le 
> destinataire de ce message ou son agent, ou si ce message vous a été 
> adressé par erreur, s’il vous plaît avertir immédiatement l'expéditeur 
> par courriel de réponse, puis supprimer ce message et les pièces 
> jointes. Si vous n'êtes pas le destinataire prévu, vous êtes par la 
> présente informé que toute utilisation, diffusion, copie, ou stockage 
> de ce message ou de ses pièces jointes est strictement interdit.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial

-- 
--
l u d o .
. 8 0 17 80



More information about the Mercurial mailing list