cubicweb-trackervcs #1832819 RevisionAdded hook breaks if a wrong ticket number is referenced [resolved]

When importing a revision in an instance that doesn't know about some tickets (or where a commit message references a non-ticket eid, I guess), the import fails with:

2011-07-19 11:31:30 - (cubicweb.sources.hg) ERROR: error while importing content for vcs repo
Traceback (most recent call last):
File "/home/jcr/src/cw/cubes/vcsfile/", line 101, in import_vcsrepo_content
repohdlr.import_content(vcsrepo, commitevery)
File "/home/jcr/src/cw/cubes/vcsfile/", line 131, in import_content
File "/home/jcr/src/cw/cubicweb/server/", line 967, in commit
File "/home/jcr/src/cw/cubicweb/server/", line 812, in handle_event
getattr(self, event)()
File "/home/jcr/src/cw/cubes/trackervcs/", line 52, in precommit_event
{'x': typed_eid(eid), 'r': rev.repository.eid})
File "/home/jcr/src/cw/cubicweb/server/", line 897, in execute
rset = self._execute(self, rql, kwargs, build_descr)
File "/home/jcr/src/cw/cubicweb/server/", line 697, in execute
eidkeys =, rqlst, args)
File "/home/jcr/src/cw/cubicweb/", line 737, in solutions
return self.rqlhelper.compute_solutions(rqlst, {'eid': type_from_eid}, args)
File "/home/jcr/src/cw/rql/", line 107, in compute_solutions
File "/home/jcr/src/cw/rql/", line 392, in visit
File "/home/jcr/src/cw/rql/", line 345, in _visit
File "/home/jcr/src/cw/rql/", line 400, in visit_union
File "/home/jcr/src/cw/rql/", line 345, in _visit
File "/home/jcr/src/cw/rql/", line 466, in visit_select
self.solve(node, constraints)
File "/home/jcr/src/cw/rql/", line 338, in solve
raise TypeResolverException(ex_msg)
TypeResolverException: Unable to resolve variables types in "Any X WHERE X eid 70495, X concerns P, P source_repository R, R eid 24486"
11:31:30 ** Consistency **
11:31:30 Inconsistency while applying <fd.BinaryExpression "(P == "Project" and X == "Ticket")">
11:31:30 Finished search
11:31:30 Maximum recursion depth = 0
Nb distributions = 0

done in0.6.1
load left0.000
closed by#497edc23ed28 hooks: catch exceptions when we can't find a ticket (closes #1832819)