# HG changeset patch # User Mads Kiilerich # Date 1687782898 -7200 # Node ID 7e5be4a7cda7ea90c05f78a09877bc333f1a1d25 # Parent a10d823a8e3d5fb17ed97011ef3b0657667b1cce tests: use grep -E instead of obsolescent egrep Testing on Fedora 38 failed with: egrep: warning: egrep is obsolescent; using grep -E The warning comes from https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 . For further anecdotal evidence of the change, see https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep . This reverses the code check that goes back to e7d3b509af8b. grep -E is POSIX, but there is a risk that it doesn't work the same on all platforms - especially older Unix versions. It should however always be possible to put a GNU grep in $PATH before running the tests. diff -r a10d823a8e3d -r 7e5be4a7cda7 contrib/check-code.py --- a/contrib/check-code.py Mon Jun 26 11:15:30 2023 +0100 +++ b/contrib/check-code.py Mon Jun 26 14:34:58 2023 +0200 @@ -146,10 +146,7 @@ r'\[[^\]]+==', '[ foo == bar ] is a bashism, use [ foo = bar ] instead', ), - ( - r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', - "use egrep for extended grep syntax", - ), + (r'(^|\|\s*)egrep', "use grep -E for extended grep syntax"), (r'(^|\|\s*)e?grep .*\\S', "don't use \\S in regular expression"), (r'(?&1 | egrep ' extension|^Exception|Traceback|ImportError|ModuleNotFound' + $ hg -q help help --traceback 2>&1 | grep -E ' extension|^Exception|Traceback|ImportError|ModuleNotFound' *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow Traceback (most recent call last): Exception: bit bucket overflow @@ -88,7 +88,7 @@ $ (hg help help --traceback --debug --config devel.debug.extensions=yes 2>&1) \ > | grep -v '^ ' \ > | filterlog \ - > | egrep 'extension..[^p]|^Exception|Traceback|ImportError|^YYYY|not import|ModuleNotFound' + > | grep -E 'extension..[^p]|^Exception|Traceback|ImportError|^YYYY|not import|ModuleNotFound' YYYY/MM/DD HH:MM:SS (PID)> loading extensions YYYY/MM/DD HH:MM:SS (PID)> - processing 5 entries YYYY/MM/DD HH:MM:SS (PID)> - loading extension: gpg diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-blackbox.t --- a/tests/test-blackbox.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-blackbox.t Mon Jun 26 14:34:58 2023 +0200 @@ -393,7 +393,7 @@ > EOF (only look for entries with specific logged sources, otherwise this test is pretty brittle) - $ hg blackbox | egrep '\[command(finish)?\]' + $ hg blackbox | grep -E '\[command(finish)?\]' 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000) [commandfinish]> --config *blackbox.track=* --config *blackbox.logsource=True* init track_star exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000) [command]> blackbox $ cd $TESTTMP diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-chg.t --- a/tests/test-chg.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-chg.t Mon Jun 26 14:34:58 2023 +0200 @@ -70,7 +70,7 @@ $ touch foo $ CHGDEBUG= HGEDITOR=cat chg ci -Am channeled --edit 2>&1 \ - > | egrep "HG:|run 'cat" + > | grep -E "HG:|run 'cat" chg: debug: * run 'cat "*"' at '$TESTTMP/editor' (glob) HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Leave message empty to abort commit. @@ -84,7 +84,7 @@ $ touch bar $ CHGDEBUG= HGEDITOR=cat chg ci -Am bufferred --edit \ > --config extensions.pushbuffer="$TESTTMP/pushbuffer.py" 2>&1 \ - > | egrep "HG:|run 'cat" + > | grep -E "HG:|run 'cat" [1] check that commit commands succeeded: @@ -237,14 +237,14 @@ warm up server: - $ CHGDEBUG= chg log 2>&1 | egrep 'instruction|start' + $ CHGDEBUG= chg log 2>&1 | grep -E 'instruction|start' chg: debug: * start cmdserver at $TESTTMP/extreload/chgsock/server.* (glob) new server should be started if extension modified: $ sleep 1 $ touch dummyext.py - $ CHGDEBUG= chg log 2>&1 | egrep 'instruction|start' + $ CHGDEBUG= chg log 2>&1 | grep -E 'instruction|start' chg: debug: * instruction: unlink $TESTTMP/extreload/chgsock/server-* (glob) chg: debug: * instruction: reconnect (glob) chg: debug: * start cmdserver at $TESTTMP/extreload/chgsock/server.* (glob) @@ -252,7 +252,7 @@ old server will shut down, while new server should still be reachable: $ sleep 2 - $ CHGDEBUG= chg log 2>&1 | (egrep 'instruction|start' || true) + $ CHGDEBUG= chg log 2>&1 | (grep -E 'instruction|start' || true) socket file should never be unlinked by old server: (simulates unowned socket by updating mtime, which makes sure server exits @@ -268,7 +268,7 @@ since no server is reachable from socket file, new server should be started: (this test makes sure that old server shut down automatically) - $ CHGDEBUG= chg log 2>&1 | egrep 'instruction|start' + $ CHGDEBUG= chg log 2>&1 | grep -E 'instruction|start' chg: debug: * start cmdserver at $TESTTMP/extreload/chgsock/server.* (glob) shut down servers and restore environment: @@ -495,7 +495,7 @@ > } $ newchg() { > chg --kill-chg-daemon - > filteredchg "$@" | egrep -v 'start cmdserver' || true + > filteredchg "$@" | grep -E -v 'start cmdserver' || true > } (--profile isn't permanently on just because it was specified when chg was started) @@ -561,12 +561,12 @@ $ hg --kill-chg-daemon $ HG=$CHGHG CHGHG= CHGDEBUG= hg debugshell -c \ > 'ui.write(b"CHGHG=%s\n" % ui.environ.get(b"CHGHG"))' 2>&1 \ - > | egrep 'CHGHG|start' + > | grep -E 'CHGHG|start' chg: debug: * start cmdserver at * (glob) CHGHG=/*/install/bin/hg (glob) Running the same command a second time shouldn't spawn a new command server. $ HG=$CHGHG CHGHG= CHGDEBUG= hg debugshell -c \ > 'ui.write(b"CHGHG=%s\n" % ui.environ.get(b"CHGHG"))' 2>&1 \ - > | egrep 'CHGHG|start' + > | grep -E 'CHGHG|start' CHGHG=/*/install/bin/hg (glob) diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-clone-stream-format.t --- a/tests/test-clone-stream-format.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-clone-stream-format.t Mon Jun 26 14:34:58 2023 +0200 @@ -245,7 +245,7 @@ $ hg clone --quiet --stream -U http://localhost:$HGPORT clone-from-share $ hg -R clone-from-share verify -q - $ hg debugrequires -R clone-from-share | egrep 'share$' + $ hg debugrequires -R clone-from-share | grep -E 'share$' [1] $ killdaemons.py diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-clone.t --- a/tests/test-clone.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-clone.t Mon Jun 26 14:34:58 2023 +0200 @@ -714,7 +714,7 @@ $ hg -R src commit -m '#0' $ hg -R src log -q 0:e1bab28bca43 - $ hg -R src debugrevlog -c | egrep 'format|flags' + $ hg -R src debugrevlog -c | grep -E 'format|flags' format : 0 flags : (none) $ hg root -R src -T json | sed 's|\\\\|\\|g' diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-context-metadata.t --- a/tests/test-context-metadata.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-context-metadata.t Mon Jun 26 14:34:58 2023 +0200 @@ -36,7 +36,7 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: Changed - $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'parents=0' 2>&1 | egrep '^RuntimeError' + $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'parents=0' 2>&1 | grep -E '^RuntimeError' RuntimeError: can't reuse the manifest: its p1 doesn't match the new ctx p1 $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'user=foo ' diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-contrib-perf.t --- a/tests/test-contrib-perf.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-contrib-perf.t Mon Jun 26 14:34:58 2023 +0200 @@ -408,7 +408,7 @@ Function to check that statprof ran $ statprofran () { - > egrep 'Sample count:|No samples recorded' > /dev/null + > grep -E 'Sample count:|No samples recorded' > /dev/null > } $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.profile-benchmark=yes 2>&1 | statprofran diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-convert-cvs-synthetic.t --- a/tests/test-convert-cvs-synthetic.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-convert-cvs-synthetic.t Mon Jun 26 14:34:58 2023 +0200 @@ -108,7 +108,7 @@ cvs rlog output - $ cvscall -q rlog proj | egrep '^(RCS file|revision)' + $ cvscall -q rlog proj | grep -E '^(RCS file|revision)' RCS file: $TESTTMP/cvsrepo/proj/file1,v revision 1.1 RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-convert-hg-svn.t --- a/tests/test-convert-hg-svn.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-convert-hg-svn.t Mon Jun 26 14:34:58 2023 +0200 @@ -1,7 +1,7 @@ #require svn svn-bindings $ filter_svn_output () { - > egrep -v 'Committing|Updating|(^$)' | sed -e 's/done$//' || true + > grep -E -v 'Committing|Updating|(^$)' | sed -e 's/done$//' || true > } $ cat <> $HGRCPATH diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-convert-svn-source.t --- a/tests/test-convert-svn-source.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-convert-svn-source.t Mon Jun 26 14:34:58 2023 +0200 @@ -1,7 +1,7 @@ #require svn svn-bindings $ filter_svn_output () { - > egrep -v 'Committing|Updating|(^$)' | sed -e 's/done$//' || true + > grep -E -v 'Committing|Updating|(^$)' | sed -e 's/done$//' || true > } $ cat >> $HGRCPATH < [format] > exp-use-copies-side-data-changeset = yes > EOF - $ hg debugformat -v | egrep 'changelog-v2|revlog-v2|copies-sdc' + $ hg debugformat -v | grep -E 'changelog-v2|revlog-v2|copies-sdc' copies-sdc: no yes no revlog-v2: no no no changelog-v2: no yes no @@ -1675,7 +1675,7 @@ > enabled=yes > numcpus=8 > EOF - $ hg debugformat -v | egrep 'changelog-v2|revlog-v2|copies-sdc' + $ hg debugformat -v | grep -E 'changelog-v2|revlog-v2|copies-sdc' copies-sdc: no yes no revlog-v2: no no no changelog-v2: no yes no @@ -2919,14 +2919,14 @@ Details on this hash ordering pick: - $ hg manifest --debug 'desc("g-1")' | egrep 'd$' + $ hg manifest --debug 'desc("g-1")' | grep -E 'd$' 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d A d a (no-changeset no-compatibility !) - $ hg manifest --debug 'desc("f-2")' | egrep 'd$' + $ hg manifest --debug 'desc("f-2")' | grep -E 'd$' 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-copies-in-changeset.t --- a/tests/test-copies-in-changeset.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-copies-in-changeset.t Mon Jun 26 14:34:58 2023 +0200 @@ -32,13 +32,13 @@ $ hg init repo $ cd repo #if sidedata - $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2' + $ hg debugformat -v | grep -E 'format-variant|revlog-v2|copies-sdc|changelog-v2' format-variant repo config default copies-sdc: yes yes no revlog-v2: no no no changelog-v2: yes yes no #else - $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2' + $ hg debugformat -v | grep -E 'format-variant|revlog-v2|copies-sdc|changelog-v2' format-variant repo config default copies-sdc: no no no revlog-v2: no no no @@ -419,7 +419,7 @@ downgrading - $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2' + $ hg debugformat -v | grep -E 'format-variant|revlog-v2|copies-sdc|changelog-v2' format-variant repo config default copies-sdc: yes yes no revlog-v2: no no no @@ -445,7 +445,7 @@ processed revlogs: - changelog - $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2' + $ hg debugformat -v | grep -E 'format-variant|revlog-v2|copies-sdc|changelog-v2' format-variant repo config default copies-sdc: no no no revlog-v2: no no no @@ -470,7 +470,7 @@ processed revlogs: - changelog - $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2' + $ hg debugformat -v | grep -E 'format-variant|revlog-v2|copies-sdc|changelog-v2' format-variant repo config default copies-sdc: yes yes no revlog-v2: no no no diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-debian-packages.t --- a/tests/test-debian-packages.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-debian-packages.t Mon Jun 26 14:34:58 2023 +0200 @@ -15,16 +15,16 @@ $ ls *.deb | grep -v 'dbg' mercurial_*.deb (glob) should have .so and .py - $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)' + $ dpkg --contents mercurial_*.deb | grep -E '(localrepo|parsers)' * ./usr/lib/python3/dist-packages/mercurial/cext/parsers*.so (glob) * ./usr/lib/python3/dist-packages/mercurial/localrepo.py (glob) * ./usr/lib/python3/dist-packages/mercurial/pure/parsers.py (glob) should have zsh completions - $ dpkg --contents mercurial_*.deb | egrep 'zsh.*[^/]$' + $ dpkg --contents mercurial_*.deb | grep -E 'zsh.*[^/]$' * ./usr/share/zsh/vendor-completions/_hg (glob) should have chg - $ dpkg --contents mercurial_*.deb | egrep 'chg$' + $ dpkg --contents mercurial_*.deb | grep -E 'chg$' * ./usr/bin/chg (glob) chg should come with a man page - $ dpkg --contents mercurial_*.deb | egrep 'man.*chg' + $ dpkg --contents mercurial_*.deb | grep -E 'man.*chg' * ./usr/share/man/man1/chg.1.gz (glob) diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-debugcommands.t --- a/tests/test-debugcommands.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-debugcommands.t Mon Jun 26 14:34:58 2023 +0200 @@ -576,7 +576,7 @@ Test debugcolor #if no-windows - $ hg debugcolor --style --color always | egrep 'mode|style|log\.' + $ hg debugcolor --style --color always | grep -E 'mode|style|log\.' color mode: 'ansi' available style: \x1b[0;33mlog.changeset\x1b[0m: \x1b[0;33myellow\x1b[0m (esc) diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-devel-warnings.t --- a/tests/test-devel-warnings.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-devel-warnings.t Mon Jun 26 14:34:58 2023 +0200 @@ -191,7 +191,7 @@ $ echo a > a $ hg add a $ hg commit -m a - $ hg stripintr 2>&1 | egrep -v '^(\*\*| )' + $ hg stripintr 2>&1 | grep -E -v '^(\*\*| )' Traceback (most recent call last): *ProgrammingError: cannot strip from inside a transaction (glob) @@ -384,7 +384,7 @@ Test programming error failure: - $ hg buggytransaction 2>&1 | egrep -v '^ ' + $ hg buggytransaction 2>&1 | grep -E -v '^ ' ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A) ** which supports versions unknown of Mercurial. ** Please disable "buggylocking" and try your action again. @@ -396,7 +396,7 @@ Traceback (most recent call last): *ProgrammingError: transaction requires locking (glob) - $ hg programmingerror 2>&1 | egrep -v '^ ' + $ hg programmingerror 2>&1 | grep -E -v '^ ' ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A) ** which supports versions unknown of Mercurial. ** Please disable "buggylocking" and try your action again. diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-dirstate-version-fallback.t --- a/tests/test-dirstate-version-fallback.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-dirstate-version-fallback.t Mon Jun 26 14:34:58 2023 +0200 @@ -22,7 +22,7 @@ Upgrade it to v2 - $ hg debugupgraderepo -q --config format.use-dirstate-v2=1 --run | egrep 'added:|removed:' + $ hg debugupgraderepo -q --config format.use-dirstate-v2=1 --run | grep -E 'added:|removed:' added: dirstate-v2 $ hg debugrequires | grep dirstate dirstate-v2 diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-docker-packaging.t --- a/tests/test-docker-packaging.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-docker-packaging.t Mon Jun 26 14:34:58 2023 +0200 @@ -22,10 +22,10 @@ main deb should have .so but no .py $ ar x mercurial_*.deb - $ tar tf data.tar* | egrep '(localrepo|parsers)' + $ tar tf data.tar* | grep -E '(localrepo|parsers)' ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob) mercurial-common should have .py but no .so or .pyc $ ar x mercurial-common_*.deb - $ tar tf data.tar* | egrep '(localrepo|parsers)' + $ tar tf data.tar* | grep -E '(localrepo|parsers)' ./usr/lib/python2.7/dist-packages/mercurial/pure/parsers.py ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-extension.t --- a/tests/test-extension.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-extension.t Mon Jun 26 14:34:58 2023 +0200 @@ -1375,7 +1375,7 @@ throw external 1.0.0 No declared supported version, extension complains: - $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' + $ hg --config extensions.throw=throw.py throw 2>&1 | grep -E '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension "throw" 1.0.0 ** which supports versions unknown of Mercurial. ** Please disable "throw" and try your action again. @@ -1387,7 +1387,7 @@ empty declaration of supported version, extension complains (but doesn't choke if the value is improperly a str instead of bytes): $ echo "testedwith = ''" >> throw.py - $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' + $ hg --config extensions.throw=throw.py throw 2>&1 | grep -E '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension "throw" 1.0.0 ** which supports versions unknown of Mercurial. ** Please disable "throw" and try your action again. @@ -1401,7 +1401,7 @@ $ echo 'buglink = "http://example.com/bts"' >> throw.py $ rm -f throw.pyc throw.pyo $ rm -Rf __pycache__ - $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' + $ hg --config extensions.throw=throw.py throw 2>&1 | grep -E '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension "throw" 1.0.0 ** which supports versions unknown of Mercurial. ** Please disable "throw" and try your action again. @@ -1418,7 +1418,7 @@ $ rm -f throw.pyc throw.pyo $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ - > throw 2>&1 | egrep '^\*\*' + > throw 2>&1 | grep -E '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension "older" (version N/A) ** which supports versions 1.9 of Mercurial. ** Please disable "older" and try your action again. @@ -1432,7 +1432,7 @@ $ rm -f older.pyc older.pyo $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ - > throw 2>&1 | egrep '^\*\*' + > throw 2>&1 | grep -E '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension "older" (version N/A) ** which supports versions 1.9 of Mercurial. ** Please disable "older" and try your action again. @@ -1446,7 +1446,7 @@ $ rm -f older.pyc older.pyo $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ - > throw 2>&1 | egrep '^\*\*' + > throw 2>&1 | grep -E '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension "throw" 1.0.0 ** which supports versions 2.1 of Mercurial. ** Please disable "throw" and try your action again. @@ -1457,7 +1457,7 @@ Ability to point to a different point $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ - > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*' + > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | grep -E '^\*\*' ** unknown exception encountered, please report by visiting ** Your Local Goat Lenders ** Python * (glob) @@ -1472,7 +1472,7 @@ > fi $ rm -f throw.pyc throw.pyo $ rm -Rf __pycache__ - $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' + $ hg --config extensions.throw=throw.py throw 2>&1 | grep -E '^\*\*' ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python * (glob) @@ -1484,7 +1484,7 @@ $ echo "util.version = lambda:b'3.2.2'" >> throw.py $ rm -f throw.pyc throw.pyo $ rm -Rf __pycache__ - $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' + $ hg --config extensions.throw=throw.py throw 2>&1 | grep -E '^\*\*' ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python * (glob) @@ -1595,7 +1595,7 @@ > util.version = lambda: b'3.6' > minimumhgversion = b'3.7' > EOF - $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third' + $ hg --config extensions.minversion=minversion2.py version 2>&1 | grep -E '\(third' (third party extension minversion requires version 3.7 or newer of Mercurial (current: 3.6); disabling) Can load version that is only off by point release @@ -1605,7 +1605,7 @@ > util.version = lambda: b'3.6.1' > minimumhgversion = b'3.6' > EOF - $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' + $ hg --config extensions.minversion=minversion3.py version 2>&1 | grep -E '\(third' [1] Can load minimum version identical to current @@ -1615,7 +1615,7 @@ > util.version = lambda: b'3.5' > minimumhgversion = b'3.5' > EOF - $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' + $ hg --config extensions.minversion=minversion3.py version 2>&1 | grep -E '\(third' [1] Don't explode on py3 with a bad version number (both str vs bytes, and not enough diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-flagprocessor.t --- a/tests/test-flagprocessor.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-flagprocessor.t Mon Jun 26 14:34:58 2023 +0200 @@ -215,7 +215,7 @@ raise error.Abort(msg) mercurial.error.Abort: cannot register multiple processors on flag '0x8'. *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'. - $ hg st 2>&1 | egrep 'cannot register multiple processors|flagprocessorext' + $ hg st 2>&1 | grep -E 'cannot register multiple processors|flagprocessorext' File "*/tests/flagprocessorext.py", line *, in extsetup (glob) mercurial.error.Abort: cannot register multiple processors on flag '0x8'. *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'. diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-git-interop.t --- a/tests/test-git-interop.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-git-interop.t Mon Jun 26 14:34:58 2023 +0200 @@ -358,7 +358,7 @@ $ hg status heads mismatch, rebuilding dagcache M beta - $ git status | egrep -v '^$|^ \(use ' + $ git status | grep -E -v '^$|^ \(use ' On branch master Changes not staged for commit: modified: beta diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-help.t --- a/tests/test-help.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-help.t Mon Jun 26 14:34:58 2023 +0200 @@ -799,7 +799,7 @@ Checking that help adapts based on the config: - $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)' + $ hg help diff --config ui.tweakdefaults=true | grep -E -e '^ *(-g|config)' -g --[no-]git use git extended diff format (default: on from config) @@ -1585,7 +1585,7 @@ Show nested definitions ("profiling.type"[break]"ls"[break]"stat"[break]) - $ hg help config.type | egrep '^$'|wc -l + $ hg help config.type | grep -E '^$'|wc -l \s*3 (re) $ hg help config.profiling.type.ls @@ -1598,7 +1598,7 @@ Separate sections from subsections - $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq + $ hg help config.format | grep -E '^ ("|-)|^\s*$' | uniq "format" -------- @@ -1660,7 +1660,7 @@ Test templating help - $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' + $ hg help templating | grep -E '(desc|diffstat|firstline|nonempty) ' desc String. The text of the changeset description. diffstat String. Statistics of changes with the following format: firstline Any text. Returns the first line of text. @@ -1701,12 +1701,12 @@ help -c should only show debug --debug - $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' + $ hg help -c --debug|grep -E debug|wc -l|grep -E '^\s*0\s*$' [1] help -c should only show deprecated for -v - $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' + $ hg help -c -v|grep -E DEPRECATED|wc -l|grep -E '^\s*0\s*$' [1] Test -s / --system @@ -1720,11 +1720,11 @@ Test -e / -c / -k combinations - $ hg help -c|egrep '^[A-Z].*:|^ debug' + $ hg help -c|grep -E '^[A-Z].*:|^ debug' Commands: - $ hg help -e|egrep '^[A-Z].*:|^ debug' + $ hg help -e|grep -E '^[A-Z].*:|^ debug' Extensions: - $ hg help -k|egrep '^[A-Z].*:|^ debug' + $ hg help -k|grep -E '^[A-Z].*:|^ debug' Topics: Commands: Extensions: @@ -1735,11 +1735,11 @@ [10] $ hg help -e schemes |head -1 schemes extension - extend schemes with shortcuts to repository swarms - $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' + $ hg help -c -k dates |grep -E '^(Topics|Extensions|Commands):' Commands: - $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' + $ hg help -e -k a |grep -E '^(Topics|Extensions|Commands):' Extensions: - $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' + $ hg help -e -c -k date |grep -E '^(Topics|Extensions|Commands):' Extensions: Commands: $ hg help -c commit > /dev/null diff -r a10d823a8e3d -r 7e5be4a7cda7 tests/test-hgweb-csp.t --- a/tests/test-hgweb-csp.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-hgweb-csp.t Mon Jun 26 14:34:58 2023 +0200 @@ -69,7 +69,7 @@ nonce should not be added to html if CSP doesn't use it - $ get-with-headers.py localhost:$HGPORT repo1/graph/tip | egrep 'content-security-policy|