# HG changeset patch # User Benoit Boissinot # Date 1220964192 -7200 # Node ID 7da76778dbd7136cfd7cfb013538c6c721290ea4 # Parent 9141bebefe3ed0498ff07271214bfca8b4eb0d27 Do not try to load extensions twice (issue811) diff -r 9141bebefe3e -r 7da76778dbd7 mercurial/extensions.py --- a/mercurial/extensions.py Mon Sep 08 14:22:14 2008 +0200 +++ b/mercurial/extensions.py Tue Sep 09 14:43:12 2008 +0200 @@ -29,7 +29,7 @@ raise KeyError(name) def load(ui, name, path): - if name.startswith('hgext.'): + if name.startswith('hgext.') or name.startswith('hgext/'): shortname = name[6:] else: shortname = name diff -r 9141bebefe3e -r 7da76778dbd7 tests/test-extension --- a/tests/test-extension Mon Sep 08 14:22:14 2008 +0200 +++ b/tests/test-extension Tue Sep 09 14:43:12 2008 +0200 @@ -80,3 +80,25 @@ hg help debugextension hg --debug help debugextension echo 'debugextension = !' >> $HGRCPATH + +echo % issue811 +debugpath=`pwd`/debugissue811.py +cat > debugissue811.py <> $HGRCPATH +echo "mq=" >> $HGRCPATH +echo "hgext.mq=" >> $HGRCPATH +echo "hgext/mq=" >> $HGRCPATH + +echo % show extensions +hg debugextensions diff -r 9141bebefe3e -r 7da76778dbd7 tests/test-extension.out --- a/tests/test-extension.out Mon Sep 08 14:22:14 2008 +0200 +++ b/tests/test-extension.out Tue Sep 09 14:43:12 2008 +0200 @@ -57,3 +57,7 @@ --profile print command execution profile --version output version information and exit -h --help display help and exit +% issue811 +% show extensions +debugissue811 +mq