#4560 SVN refresh error: 'NoneType' object has no attribute 'tree_ids'

v1.0.0
closed
sf-2 (994)
SCM
2015-08-20
2012-07-16
No

SVN refresh fails regularly with this error:

  File "/var/local/allura/ForgeSVN/forgesvn/model/svn.py", line 174, in clone_from
    self._repo.refresh(notify=False)
  File "/var/local/allura/Allura/allura/model/repository.py", line 317, in refresh
    refresh_repo(self, all_commits, notify)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 75, in refresh_repo
    compute_diffs(repo._id, cache, ci)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 275, in compute_diffs
    rhs_tree_ids = TreesDoc.m.get(_id=rhs_ci._id).tree_ids
AttributeError: 'NoneType' object has no attribute 'tree_ids'

Related

Tickets: #4552

Discussion

  • Cory Johns - 2012-07-18
    • status: open --> in-progress
    • assigned_to: Cory Johns
     
  • Cory Johns - 2012-07-18
    • status: in-progress --> code-review
    • qa: Dave Brondsema
     
  • Cory Johns - 2012-07-18

    allura:cj/4560

    To reproduce (before this fix):

    1) Create or import new SVN repo
    2) Confirm that all entries in repo_ci for that repo have null tree_ids

    use pyforge
    p_id = db.project.findOne({shortname: 'allura'})._id
    use project-data
    svn_aid = db.config.findOne({project_id: p_id, tool_name: 'svn'})._id
    svn_rid = db['svn-repository'].findOne({app_config_id: svn_aid})._id
    use pyforge
    db.repo_ci.find({repo_ids: svn_rid}, {message: 1, tree_id: 1})
    

    3) Run refresh while watching /var/log/allura/allura.log and confirm no errors

    4) View one or more commits in the tree browser

    5) Confirm that one or more entries in repo_ci for that repo have values in their tree_id

    db.repo_ci.find({repo_ids: svn_rid}, {message: 1, tree_id: 1})
    

    6) Run refresh while watching /var/log/allura/allura.log and confirm NoneType error

    To QA:

    Check out this branch, restart reactor, then do the above, confirming no errors on the last step.

     
  • Dave Brondsema

    Dave Brondsema - 2012-07-19
    • status: code-review --> validation
    • size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2012-07-19
    • status: validation --> closed
     

Log in to post a comment.