[PATCH 1 of 2 STABLE] subrepo: ignore blank lines in .hgsubstate (issue3424)

Patrick Mézard patrick at mezard.eu
Fri May 4 09:55:46 CDT 2012


Le 04/05/12 16:11, Mads Kiilerich a écrit :
> Patrick Mezard wrote, On 05/04/2012 02:29 PM:
>> # HG changeset patch # User Patrick Mezard<patrick at mezard.eu> # 
>> Date 1336133992 -7200 # Branch stable # Node ID 
>> 983c614cea9455732fc16fac772b905c3dd215b1 # Parent 
>> 91323a78aac252b630144f66e1039321cd41c9ef subrepo: ignore blank 
>> lines in .hgsubstate (issue3424)
> 
> .hgsubstate is an internal file that the user never should touch 
> directly or care about ... and any attempt of doing that ususally 
> fails. Better support for recovery from a situation where the user 
> has done it anyway might be a good idea, but moving in the direction
>  of being more flexible in what we accept here would be misleading. 
> IMO.

For the record, I do not like Postel's principle, I prefer "be strict everywhere". But here I had the choice:
1- Ignore the blank line
2- Tell the user he put blank lines in his .hgsubstate and bail out
3- Keep tracing back

[3] is not acceptable, at least when we can avoid it easily. Blank lines are so easy to filter than [2] feels sadistic, so go for [1].

Also note the following patch does [2] and did not try to wild guess the input. "You put something silly, pay for it". But blank lines...

--
Patrick Mézard


More information about the Mercurial-devel mailing list