are there tests that cover the new commit shortlinks? I can't find any new tests
also should have tests for the svn-specific logic (e.g. link notation, refresh_commit_info which has typos on lines 243 & 268)
After locally fixing those typos I got this (while refreshing an svn repo):
Traceback (most recent call last):
File "../scripts/refresh-all-repos.py", line 67, in main
c.app.repo.refresh(options.all, notify=options.notify)
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repository.py", line 306, in refresh
refresh_repo(self, all_commits, notify)
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repo_refresh.py", line 52, in refresh_repo
cache = refresh_commit_trees(ci, cache)
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repo_refresh.py", line 72, in refresh_commit_trees
tree_ids = list(trees(ci.tree_id, cache))))
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repo_refresh.py", line 214, in trees
entries = [ o.id for o in t.tree_ids ]
AttributeError: 'NoneType' object has no attribute 'tree_ids'
And from taskd after committing a new SVN commit:
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/monq_model.py", line 219, in __call__
self.result = func(*self.args, **self.kwargs)
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/tasks/repo_tasks.py", line 35, in refresh
c.app.repo.refresh()
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repository.py", line 306, in refresh
refresh_repo(self, all_commits, notify)
File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repo_refresh.py", line 66, in refresh_repo
send_notifications(commit_ids)
TypeError: send_notifications() takes exactly 2 arguments (1 given)
Lastly, after that error got this (so not necessarily an error unto its own) when visiting a wiki page that that had commit references in it:
If I put any artifact reference (e.g. [r1] or [2fcfb5e9c477675949426450cbe6240b6488e217]) in a page, that page 500s upon render:
File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/templates/jinja_master/lib.html', line 2 in template
{% set related_artifacts = artifact.related_artifacts() %}
File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/artifact.py', line 106 in related_artifacts
ref = ArtifactReference.query.get(_id=ref_id)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/orm/mapper.py', line 226 in get
return self.session.get(self.mapped_class, kwargs['_id'])
File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/lib/stats.py', line 57 in inner
return func(*l, **kw)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/orm/ormsession.py', line 105 in get
result = self.find(cls, dict(_id=idvalue)).first()
File '/var/local/env-allura/lib/python2.7/site-packages/ming/orm/ormsession.py', line 294 in first
return self.next()
File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/lib/stats.py', line 57 in inner
return func(*l, **kw)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/orm/ormsession.py', line 247 in next
doc = self.ming_cursor.next()
File '/var/local/env-allura/lib/python2.7/site-packages/ming/base.py', line 61 in next
strip_extra=self._strip_extra)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/metadata.py', line 324 in make
return cls.m.make(data, allow_extra=allow_extra, strip_extra=strip_extra)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/metadata.py', line 238 in make
data, allow_extra=allow_extra, strip_extra=strip_extra)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/schema.py', line 329 in validate
return super(Document, self).validate(value, **kw)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/schema.py', line 229 in validate
return self._validate(value, **kw)
File '/var/local/env-allura/lib/python2.7/site-packages/ming/schema.py', line 349 in _validate
result.update(super(Document, self)._validate(d, allow_extra, strip_extra))
File '/var/local/env-allura/lib/python2.7/site-packages/ming/schema.py', line 297 in _validate
raise Invalid(msg, d, None, error_dict=error_dict)
Invalid: <class 'ming.metadata.Document<artifact_reference>'>:
artifact_reference:cls:callura.model.repo
Commit
p1
. is not a <class 'bson.binary.Binary'>
I don't have to be sitting on this - someone else could take it, since dstats is a high priority for me now
After locally fixing those typos I got this (while refreshing an svn repo):
And from taskd after committing a new SVN commit:
Lastly, after that error got this (so not necessarily an error unto its own) when visiting a wiki page that that had commit references in it:
~~~~
[Mon Jul 25 19:15:47 2011] [error] [client 127.0.0.1] File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/templates/jinja_master/lib.html', line 2 in template
[Mon Jul 25 19:15:47 2011] [error] [client 127.0.0.1] {% set related_artifacts = artifact.related_artifacts() %}
[Mon Jul 25 19:15:47 2011] [error] [client 127.0.0.1] File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/artifact.py', line 106 in related_artifacts
[Mon Jul 25 19:15:47 2011] [error] [client 127.0.0.1] ref = ArtifactReference.query.get(_id=ref_id)
... ming lines ...
[Mon Jul 25 19:13:45 2011] [error] [client 127.0.0.1] Invalid: <class 'ming.metadata.Document<artifact_reference="">'>:
[Mon Jul 25 19:13:45 2011] [error] [client 127.0.0.1] artifact_reference:cls:callura.model.repo
[Mon Jul 25 19:13:45 2011] [error] [client 127.0.0.1] Commit
[Mon Jul 25 19:13:45 2011] [error] [client 127.0.0.1] p1
[Mon Jul 25 19:13:45 2011] [error] [client 127.0.0.1] . is not a <class 'bson.binary.Binary'="">
~~~
Oh, and use rc/2020-rebased. It is rebased and includes a few commits from me
Back at you with tests and several fixes discovered when adding tests
Many ForgeSVN/Hg/Git tests fail with NotImplementedError: $addToSet. I'm on Ming==0.2.2dev-20110720
Version of Ming bumped
If I put any artifact reference (e.g.
[r1]
or[2fcfb5e9c477675949426450cbe6240b6488e217]
) in a page, that page 500s upon render:and allura.log shows this (not sure if relevant):
Update on rc/2020
I'm getting another error trying the same thing (commit references). Maybe we should have a test that exercises this?
Now with a test, and I was unable to duplicate the error you were getting.
To reproduce:
scm.new_refresh = true
P.S. can the new test assert rather than just print?