glogiotatidis / gitissius

Distributed Issue Tracking for GIT
http://www.gitissius.org
Other
48 stars 8 forks source link

error on empty issiues list #5

Closed spinus closed 12 years ago

spinus commented 12 years ago

On new repo with few commits, when you try list issiues (without adding some issiue before) there is an error.

$ git issius list
Traceback (most recent call last):
  File "/home/spinus/usr/opt/lpython/bin/git-issius", line 9, in <module>
    load_entry_point('Gitissius==0.1.6', 'console_scripts', 'git-issius')()
  File "/home/spinus/usr/opt/lpython/lib/python2.7/site-packages/Gitissius-0.1.6-py2.7.egg/gitissius/gitissius.py", line 104, in main
    commands.command[command](sys.argv[2:])
  File "/home/spinus/usr/opt/lpython/lib/python2.7/site-packages/Gitissius-0.1.6-py2.7.egg/gitissius/commands/__init__.py", line 17, in __call__
    return self._execute(options, args)
  File "/home/spinus/usr/opt/lpython/lib/python2.7/site-packages/Gitissius-0.1.6-py2.7.egg/gitissius/commands/list_issues.py", line 48, in _execute
    rules=filters)
  File "/home/spinus/usr/opt/lpython/lib/python2.7/site-packages/Gitissius-0.1.6-py2.7.egg/gitissius/database.py", line 256, in filter
    matching_keys = self.issuedb.keys()
  File "/home/spinus/usr/opt/lpython/lib/python2.7/site-packages/Gitissius-0.1.6-py2.7.egg/gitissius/database.py", line 196, in issuedb
    self._build_issuedb()
  File "/home/spinus/usr/opt/lpython/lib/python2.7/site-packages/Gitissius-0.1.6-py2.7.egg/gitissius/database.py", line 229, in _build_issuedb
    obj = Issue.load(json.loads(common.git_repo[issue]))
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
glogiotatidis commented 12 years ago

Thxn for your bug report. I'm looking into this

glogiotatidis commented 12 years ago

I can't seem to be able to reproduce this bug. Can you please give me more details about your repo? Was it cloned from another repo?

spinus commented 12 years ago

Hi, a do it something like this:

513 git init 514 git issius list 515 git issius new 516 touch plik 517 git add plik 518 ls 519 git commit -m"init" 520 git issues 521 git issius 522 git issius list # error

glogiotatidis commented 12 years ago

OK thanks. Actually you did an "list" before even doing an initial commit on your repo, thus there is no "master" branch. This actually messes things up with git, which things the 'gitissius' is the master branch. It's quite special case, I'll try to fix that. Again thnx for reporting

glogiotatidis commented 12 years ago

Fixed in 2e683245d505cf1cd34837c9639f91ef7deaeeef

spinus commented 12 years ago

Thanks for fix. Question: if I did a "git init" and "git commit" it is not a initial commit which creates a branch master?

glogiotatidis commented 12 years ago

Yes, git commit creates the master branch. In your list of cmds., a got is sous list came before commit creating "gitissius" branch as master. That caused the problem.

On Dec 10, 2011 12:34 AM, "spinus" < reply@reply.github.com> wrote:

Thanks for fix. Question: if I did a "git init" and "git commit" it is not a initial commit which creates a branch master?


Reply to this email directly or view it on GitHub: https://github.com/glogiotatidis/gitissius/issues/5#issuecomment-3089859