#8431 handle dir/file/symlink changes better

v1.14.0
closed
None
General
nobody
2022-09-23
2022-05-20
No

If foo was a directory and then in the next commit it becomes a file (or a symlink in git) then this error occurs

File "/src/allura/Allura/allura/controllers/repository.py", line 688, in index
    is_text = filepath and tree.get_blob_by_path(filepath) and tree.get_blob_by_path(filepath).has_html_view
  File "/src/allura/Allura/allura/model/repository.py", line 1372, in get_blob_by_path
    obj = self.get_obj_by_path(path)
  File "/src/allura/Allura/allura/model/repository.py", line 1366, in get_obj_by_path
    obj = obj[p]
TypeError: 'Blob' object is not subscriptable

Discussion

  • Dave Brondsema

    Dave Brondsema - 2022-05-23
    • summary: handle git symlinks better --> handle dir/file/symlink changes better
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1,11 @@
    +If `foo` was a directory and then in the next commit it becomes a file (or a symlink in git) then this error occurs
    +
    +```pytb
    +File "/src/allura/Allura/allura/controllers/repository.py", line 688, in index
    +    is_text = filepath and tree.get_blob_by_path(filepath) and tree.get_blob_by_path(filepath).has_html_view
    +  File "/src/allura/Allura/allura/model/repository.py", line 1372, in get_blob_by_path
    +    obj = self.get_obj_by_path(path)
    +  File "/src/allura/Allura/allura/model/repository.py", line 1366, in get_obj_by_path
    +    obj = obj[p]
    +TypeError: 'Blob' object is not subscriptable
    +```
    
     
  • Dave Brondsema

    Dave Brondsema - 2022-05-23
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2022-05-23

    db/8431

     
  • Dave Brondsema

    Dave Brondsema - 2022-05-27
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2022-09-23
    • Milestone: unreleased --> v1.14.0
     

Log in to post a comment.