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 http://www.logilab.org/src/pylint
Traceback (most recent call last):
File "/home/jcr/src/cw/cubes/vcsfile/bridge.py", line 101, in import_vcsrepo_content
repohdlr.import_content(vcsrepo, commitevery)
File "/home/jcr/src/cw/cubes/vcsfile/repohg.py", line 131, in import_content
session.commit()
File "/home/jcr/src/cw/cubicweb/server/session.py", line 967, in commit
operation.handle_event('precommit_event')
File "/home/jcr/src/cw/cubicweb/server/hook.py", line 812, in handle_event
getattr(self, event)()
File "/home/jcr/src/cw/cubes/trackervcs/hooks.py", line 52, in precommit_event
{'x': typed_eid(eid), 'r': rev.repository.eid})
File "/home/jcr/src/cw/cubicweb/server/session.py", line 897, in execute
rset = self._execute(self, rql, kwargs, build_descr)
File "/home/jcr/src/cw/cubicweb/server/querier.py", line 697, in execute
eidkeys = self.solutions(session, rqlst, args)
File "/home/jcr/src/cw/cubicweb/cwvreg.py", line 737, in solutions
return self.rqlhelper.compute_solutions(rqlst, {'eid': type_from_eid}, args)
File "/home/jcr/src/cw/rql/__init__.py", line 107, in compute_solutions
debug)
File "/home/jcr/src/cw/rql/analyze.py", line 392, in visit
self._visit(node)
File "/home/jcr/src/cw/rql/analyze.py", line 345, in _visit
func(node)
File "/home/jcr/src/cw/rql/analyze.py", line 400, in visit_union
self._visit(select)
File "/home/jcr/src/cw/rql/analyze.py", line 345, in _visit
func(node)
File "/home/jcr/src/cw/rql/analyze.py", line 466, in visit_select
self.solve(node, constraints)
File "/home/jcr/src/cw/rql/analyze.py", 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

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