Show More
@@ -105,13 +105,14 b' Check that extensions are loaded in phas' | |||||
105 | > def reposetup(ui, repo): |
|
105 | > def reposetup(ui, repo): | |
106 | > print("4) %s reposetup" % name) |
|
106 | > print("4) %s reposetup" % name) | |
107 | > |
|
107 | > | |
|
108 | > bytesname = name.encode('utf-8') | |||
108 | > # custom predicate to check registration of functions at loading |
|
109 | > # custom predicate to check registration of functions at loading | |
109 | > from mercurial import ( |
|
110 | > from mercurial import ( | |
110 | > registrar, |
|
111 | > registrar, | |
111 | > smartset, |
|
112 | > smartset, | |
112 | > ) |
|
113 | > ) | |
113 | > revsetpredicate = registrar.revsetpredicate() |
|
114 | > revsetpredicate = registrar.revsetpredicate() | |
114 | > @revsetpredicate(name, safe=True) # safe=True for query via hgweb |
|
115 | > @revsetpredicate(bytesname, safe=True) # safe=True for query via hgweb | |
115 | > def custompredicate(repo, subset, x): |
|
116 | > def custompredicate(repo, subset, x): | |
116 | > return smartset.baseset([r for r in subset if r in {0}]) |
|
117 | > return smartset.baseset([r for r in subset if r in {0}]) | |
117 | > EOF |
|
118 | > EOF |
General Comments 0
You need to be logged in to leave comments.
Login now