[PATCH 1 of 2] subrepo: check that subrepo paths are not existing files
Jordi Gutiérrez Hermoso
jordigh at octave.org
Tue Sep 9 12:56:41 CDT 2014
# 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. This should provide an early error message.
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -126,6 +126,10 @@ def state(ctx, ui):
state = {}
for path, src in p[''].items():
+
+ if os.path.isfile(path):
+ raise util.Abort(_('subrepository path is an existing file: %s')
+ % path)
kind = 'hg'
if src.startswith('['):
if ']' not in src:
More information about the Mercurial-devel
mailing list