Comments
Patch
@@ -44,6 +44,10 @@
summary summarize working directory state
update update working directory (or switch revisions)
+Extra extensions will be printed in help output in a non-reliable order since
+the extension is unknown.
+#if no-extraextensions
+
$ hg help
Mercurial Distributed SCM
@@ -283,6 +287,8 @@
win32mbcs allow the use of MBCS paths with problematic encodings
zeroconf discover and advertise repositories on the local network
+#endif
+
Verify that deprecated extensions are included if --verbose:
$ hg -v help extensions | grep children
@@ -816,6 +822,8 @@
Test that default list of commands omits extension commands
+#if no-extraextensions
+
$ hg help
Mercurial Distributed SCM
@@ -903,6 +911,7 @@
(use 'hg help -v' to show built-in aliases and global options)
+#endif
Test list of internal help commands
@@ -289,6 +289,8 @@
Testing -h/--help:
+#if no-extraextensions
+
$ hg -h
Mercurial Distributed SCM
@@ -372,8 +374,6 @@
(use 'hg help -v' to show built-in aliases and global options)
-
-
$ hg --help
Mercurial Distributed SCM
@@ -457,5 +457,7 @@
(use 'hg help -v' to show built-in aliases and global options)
+#endif
+
Not tested: --debugger
@@ -867,9 +867,11 @@
Show extensions:
(note that mq force load strip, also checking it's not loaded twice)
+#if no-extraextensions
$ hg debugextensions
mq
strip
+#endif
For extensions, which name matches one of its commands, help
message should ask '-v -e' to get list of built-in aliases
@@ -1,4 +1,6 @@
+#if no-extraextensions
$ hg debugextensions
+#endif
$ debugpath=`pwd`/extwithoutinfos.py
@@ -19,6 +21,10 @@
> ext2 = `pwd`/extwithinfos.py
> EOF
+ $ for extension in $HGTESTEXTRAEXTENSIONS; do
+ > echo "$extension=!" >> $HGRCPATH
+ > done
+
$ hg debugextensions
ext1 (untested!)
ext2 (3.2.1!)
@@ -1,5 +1,6 @@
Create a repository:
+#if no-extraextensions
$ hg config
devel.all-warnings=true
devel.default-date=0 0
@@ -13,6 +14,8 @@
web.address=localhost
web\.ipv6=(?:True|False) (re)
web.server-header=testing stub value
+#endif
+
$ hg init t
$ cd t
@@ -1070,6 +1070,15 @@
env["HGENCODINGMODE"] = "strict"
env['HGIPV6'] = str(int(self._useipv6))
+ extraextensions = []
+ for opt in self._extraconfigopts:
+ section, key = opt.encode('utf-8').split(b'.', 1)
+ name = key.split(b'=', 1)[0]
+ extraextensions.append(name)
+
+ if extraextensions:
+ env['HGTESTEXTRAEXTENSIONS'] = b' '.join(extraextensions)
+
# LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw
# IP addresses.
env['LOCALIP'] = self._localip()
@@ -718,6 +718,10 @@
except (ImportError, AttributeError):
return False
+@check('extraextensions', 'whether tests are running with extra extensions')
+def has_extraextensions():
+ return 'HGTESTEXTRAEXTENSIONS' in os.environ
+
def getrepofeatures():
"""Obtain set of repository features in use.
@@ -9,6 +9,13 @@
# The mercurial source repository was typically orignally cloned with the
# system mercurial installation, and may require extensions or settings from
# the system installation.
+
+if [ -n $HGTESTEXTRAEXTENSIONS ]; then
+ for extension in $HGTESTEXTRAEXTENSIONS; do
+ extraoptions="$extraoptions --config extensions.$extension=!"
+ done
+fi
+
syshg () {
(
syshgenv
@@ -48,6 +55,6 @@
alias testrepohg=syshg
alias testrepohgenv=syshgenv
else
- alias testrepohg=hg
+ alias testrepohg="hg $extraoptions"
alias testrepohgenv=:
fi