#8001 Error with git status "T" in a commit


We need to handle the "T" status from git. Currently we error:

Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/tasks/repo_tasks.py", line 47, in clone
  File "/var/local/allura/Allura/allura/model/repository.py", line 533, in init_as_clone
    self.refresh(notify=False, new_clone=True)
  File "/var/local/allura/Allura/allura/model/repository.py", line 663, in refresh
    refresh_repo(self, all_commits, notify, new_clone)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 122, in refresh_repo
    compute_lcds(ci, model_cache, lcid_cache)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 544, in compute_lcds
    _compute_lcds(tree, model_cache)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 554, in _compute_lcds
    lcd = LastCommit._build(tree)
  File "/var/local/allura/Allura/allura/model/repository.py", line 1573, in _build
    prev_lcd_cid = cls._prev_commit_id(tree.commit, path)
  File "/var/local/allura/Allura/allura/model/repository.py", line 1537, in _prev_commit_id
    if not commit.parent_ids or path in commit.added_paths:
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.4.7-py2.7.egg/ming/utils.py", line 18, in __get__
    result = obj.__dict__[self.__name__] = self._func(obj)
  File "/var/local/allura/Allura/allura/model/repository.py", line 1241, in added_paths
    for path in self.paged_diffs()['added']:
  File "/var/local/allura/Allura/allura/model/repository.py", line 1170, in paged_diffs
    diffs = self.repo.paged_diffs(self._id, start, end)
  File "/var/local/allura/Allura/allura/model/repository.py", line 514, in paged_diffs
    return self._impl.paged_diffs(commit_id, start, end)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 702, in paged_diffs
KeyError: 'T'


  • Dave Brondsema

    Dave Brondsema - 2016-08-18
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
  • Dave Brondsema

    Dave Brondsema - 2016-08-18
    • status: in-progress --> review
  • Dave Brondsema

    Dave Brondsema - 2016-08-18

    fix on branch db/8001

    To test, make a commit in which you change a text file to a symlink or vice versa. Changing a file to a directory doesn't work. A gitsubmodule would probably trigger it too. Push that commit and view it.

  • Dave Brondsema

    Dave Brondsema - 2016-08-19
    • status: review --> closed
  • Dave Brondsema

    Dave Brondsema - 2016-12-14
    • Milestone: unreleased --> v1.6.0

Log in to post a comment.