[PATCH 1 of 2] subrepo: check that subrepo paths are not existing files

Mads Kiilerich mads at kiilerich.com
Wed Sep 10 12:31:09 CDT 2014


On 09/10/2014 04:48 PM, Jordi Gutiérrez Hermoso wrote:
> On Wed, 2014-09-10 at 01:31 +0200, Mads Kiilerich wrote:
>> On 09/09/2014 07:56 PM, Jordi Gutiérrez Hermoso wrote:
>>> # HG changeset patch
>>> # User Jordi Gutiérrez Hermoso <jordigh at octave.org>
>>> # Date 1410279390 14400
>>> #      Tue Sep 09 12:16:30 2014 -0400
>>> # Node ID 7611a7833657301d9a881095828d5e75558d82f9
>>> # Parent  897041f6b025778193c6da5b9795da09a91c866e
>>> subrepo: check that subrepo paths are not existing files
>>>
>>> This check has to happen early one, as the .hgsub file is being
>>> parsed.
>> Why?
> Because why not catch an error as early as possible?

What would happen if we don't catch it? I would expect that an existing 
file to be an error that automatically is handled just fine. The updated 
patch description might give the answer.

> Currently these problems are caught later after hgsub has been parsed
> and when attempting to create a subrepo Python object. This is too
> late, and is the core problem in bug #4363.

It is not obvious how you get from that bug report to that conclusion. 
You might be right, but my gut feeling is that the core problem is 
something else.

/Mads


More information about the Mercurial-devel mailing list