Comments
Patch
@@ -153,20 +153,21 @@ Check that extensions are loaded in phas
> import os
> from mercurial import exthelper
> name = os.path.basename(__file__).rsplit('.', 1)[0]
+ > bytesname = name.encode('utf-8')
> print("1) %s imported" % name, flush=True)
> eh = exthelper.exthelper()
> @eh.uisetup
> def _uisetup(ui):
- > print("2) %s uisetup" % name, flush=True)
+ > ui.warn(b"2) %s uisetup\n" % bytesname)
> @eh.extsetup
> def _extsetup(ui):
- > print("3) %s extsetup" % name, flush=True)
+ > ui.warn(b"3) %s extsetup\n" % bytesname)
> @eh.uipopulate
> def _uipopulate(ui):
- > print("4) %s uipopulate" % name, flush=True)
+ > ui.warn(b"4) %s uipopulate\n" % bytesname)
> @eh.reposetup
> def _reposetup(ui, repo):
- > print("5) %s reposetup" % name, flush=True)
+ > ui.warn(b"5) %s reposetup\n" % bytesname)
>
> extsetup = eh.finalextsetup
> reposetup = eh.finalreposetup
@@ -174,7 +175,6 @@ Check that extensions are loaded in phas
> uisetup = eh.finaluisetup
> revsetpredicate = eh.revsetpredicate
>
- > bytesname = name.encode('utf-8')
> # custom predicate to check registration of functions at loading
> from mercurial import (
> smartset,
@@ -206,6 +206,18 @@ Check normal command's load order of ext
4) bar uipopulate
5) foo reposetup
5) bar reposetup
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 5) foo reposetup (chg !)
+ 5) bar reposetup (chg !)
0:c24b9ac61126
Check hgweb's load order of extensions and registration of functions
@@ -222,8 +234,6 @@ Check hgweb's load order of extensions a
$ PATH_INFO='/' SCRIPT_NAME='' "$PYTHON" hgweb.cgi \
> | grep '^[0-9]) ' # ignores HTML output
- 1) foo imported
- 1) bar imported
2) foo uisetup
2) bar uisetup
3) foo extsetup
@@ -234,6 +244,8 @@ Check hgweb's load order of extensions a
4) bar uipopulate
5) foo reposetup
5) bar reposetup
+ 1) foo imported
+ 1) bar imported
(check that revset predicate foo() and bar() are available)
@@ -245,6 +257,16 @@ Check hgweb's load order of extensions a
$ export PATH_INFO
$ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' "$PYTHON" hgweb.cgi \
> | grep '<a href="/rev/[0-9a-z]*">'
+ 2) foo uisetup
+ 2) bar uisetup
+ 3) foo extsetup
+ 3) bar extsetup
+ 4) foo uipopulate
+ 4) bar uipopulate
+ 4) foo uipopulate
+ 4) bar uipopulate
+ 5) foo reposetup
+ 5) bar reposetup
<a href="/rev/c24b9ac61126">add file</a>
$ echo 'foo = !' >> $HGRCPATH