Edgewall Software
Modify

Opened 8 years ago

Last modified 8 months ago

#12484 new defect

GitErrorSha is raised from /diff page when the git repository is empty

Reported by: Jun Omae Owned by:
Priority: normal Milestone: next-stable-1.6.x
Component: version control/changeset view Version: 1.0.11
Severity: minor Keywords: git
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

03:18:05 PM Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/changeset?old_path=%2Fempty.git&old=&new_path=%2Fempty.git&new='">, referrer 'http://127.0.0.1:3000/diff'
Traceback (most recent call last):
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/trac/web/main.py", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/trac/web/main.py", line 249, in dispatch
    resp = chosen_handler.process_request(req)
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py", line 301, in process_request
    prev_path, prev_rev = new_path, repos.previous_rev(new)
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/trac/versioncontrol/cache.py", line 397, in previous_rev
    return self.repos.previous_rev(self.normalize_rev(rev), path)
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/tracopt/versioncontrol/git/git_fs.py", line 599, in previous_rev
    return self.git.hist_prev_revision(rev)
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/tracopt/versioncontrol/git/PyGIT.py", line 643, in hist_prev_revision
    return self.history_relative_rev(sha, +1)
  File "/venv/trac/1.0.11/lib/python2.5/site-packages/tracopt/versioncontrol/git/PyGIT.py", line 622, in history_relative_rev
    raise GitErrorSha()
GitErrorSha:

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:2 by Ryan J Ollos, 4 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:3 by Ryan J Ollos, 8 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.