- **status**: in-progress --> review
- **Comment**:

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.



---

** [tickets:#8001] Error with git status "T" in a commit**

**Status:** review
**Milestone:** unreleased
**Created:** Tue Oct 06, 2015 02:33 PM UTC by Dave Brondsema
**Last Updated:** Thu Aug 18, 2016 06:14 PM UTC
**Owner:** Dave Brondsema


We need to handle the ["T" 
status](http://stackoverflow.com/questions/8691199/what-does-t-mean-in-git-status-it-isnt-in-the-man-page)
 from git.  Currently we error:

~~~~
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/tasks/repo_tasks.py", line 47, in clone
    cloned_from_url)
  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
    }[status]
KeyError: 'T'
~~~~


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.

Reply via email to