allura-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenton Taylor" <ktay...@slashdotmedia.com>
Subject [allura:tickets] #8264 AssertionError from git branch lock file
Date Wed, 14 Nov 2018 23:47:10 GMT
- **status**: review --> closed
- **Comment**:

Merged.



---

** [tickets:#8264] AssertionError from git branch lock file**

**Status:** closed
**Milestone:** unreleased
**Created:** Wed Nov 14, 2018 07:25 PM UTC by Dave Brondsema
**Last Updated:** Wed Nov 14, 2018 07:43 PM UTC
**Owner:** Dave Brondsema


A temporary or stale branch lock file can cause this error:

```
File '/var/local/allura/ForgeGit/forgegit/model/git_repo.py', line 610 in branches
  return self._get_refs('branches')
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py',
line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py',
line 126 in run_and_log
  return func(*args, **kwargs)
File '/var/local/allura/ForgeGit/forgegit/model/git_repo.py', line 566 in _get_refs
  hex_sha = ref.commit.hexsha
File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-2.1.11-py2.7.egg/git/refs/symbolic.py',
line 200 in _get_commit
  obj = self._get_object()
File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-2.1.11-py2.7.egg/git/refs/symbolic.py',
line 193 in _get_object
  return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-2.1.11-py2.7.egg/git/refs/symbolic.py',
line 135 in dereference_recursive
  hexsha, ref_path = cls._get_ref_info(repo, ref_path)
File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-2.1.11-py2.7.egg/git/refs/symbolic.py',
line 184 in _get_ref_info
  return cls._get_ref_info_helper(repo, ref_path)
File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-2.1.11-py2.7.egg/git/refs/symbolic.py',
line 153 in _get_ref_info_helper
  assert(len(tokens) != 0)
AssertionError:
```

A quick fix is to `rm refs/heads/foo.lock` but it'd be better if we ignored this error.


---

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.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message