Edgewall Software

Ticket #3854 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

initenv crashes: unable to create a trac environment for my project

Reported by: clive@… Owned by: cboos
Priority: high Milestone: 0.9.7
Component: version control Version: 0.9.6
Severity: major Keywords:
Cc:

Description

Repository indexing fails. There is nothing wrong with the repository according to svnadmin.

 /usr/share/trac/wiki-default/TracUpgrade => TracUpgrade
 /usr/share/trac/wiki-default/SandBox => SandBox
 /usr/share/trac/wiki-default/TracBrowser => TracBrowser
 /usr/share/trac/wiki-default/CamelCase => CamelCase
 /usr/share/trac/wiki-default/TracUnicode => TracUnicode
 Indexing repository
Failed to initialize environment. svn_time_from_cstring() argument 1 must be string, not None
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/scripts/admin.py", line 617, in do_initenv
    repos.sync()
  File "/var/lib/python-support/python2.4/trac/versioncontrol/cache.py", line 82, in sync
    changeset = self.repos.get_changeset(current_rev)
  File "/var/lib/python-support/python2.4/trac/versioncontrol/svn_fs.py", line 251, in get_changeset
    self.fs_ptr, self.pool)
  File "/var/lib/python-support/python2.4/trac/versioncontrol/svn_fs.py", line 470, in __init__
    date = core.svn_time_from_cstring(date, self.pool()) / 1000000
  File "libsvn/core.py", line 244, in svn_time_from_cstring
TypeError: svn_time_from_cstring() argument 1 must be string, not None

Then trying a resync I get the same (if with less detail) error:

% trac-admin test resync
Resyncing repository history...
Command failed: svn_time_from_cstring() argument 1 must be string, not None
%

starting up the environment (with tracd) then browsing to timeline now gives:

Python traceback
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/web/standalone.py", line 303, in _do_trac_req
    dispatch_request(path_info, req, env)
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/var/lib/python-support/python2.4/trac/Timeline.py", line 140, in process_request
    filters)
  File "/var/lib/python-support/python2.4/trac/versioncontrol/web_ui/changeset.py", line 116, in get_timeline_events
    chgset = repos.get_changeset(rev)
  File "/var/lib/python-support/python2.4/trac/versioncontrol/cache.py", line 42, in get_changeset
    self.sync()
  File "/var/lib/python-support/python2.4/trac/versioncontrol/cache.py", line 82, in sync
    changeset = self.repos.get_changeset(current_rev)
  File "/var/lib/python-support/python2.4/trac/versioncontrol/svn_fs.py", line 251, in get_changeset
    self.fs_ptr, self.pool)
  File "/var/lib/python-support/python2.4/trac/versioncontrol/svn_fs.py", line 470, in __init__
    date = core.svn_time_from_cstring(date, self.pool()) / 1000000
  File "libsvn/core.py", line 244, in svn_time_from_cstring
TypeError: svn_time_from_cstring() argument 1 must be string, not None

Attachments

Change History

Changed 2 years ago by cboos

  • owner changed from daniel to cboos
  • component changed from trac-admin to version control
  • milestone set to 0.9.7

source:tags/trac-0.9.6/trac/versioncontrol/svn_fs.py@#460:

    date = self._get_prop(core.SVN_PROP_REVISION_DATE)

It seems that in your case, the revision property svn:date is missing. While waiting for the fix, you can try to reset it manually (see http://svn.haxx.se/users/archive-2004-03/1370.shtml).

Should be backported to 0.10.1 as well.

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Fixed in all 3 branches in [3858:3860] (r3860 should have read backported to 0.9-stable, of course ...)

Note that the fix for 0.9.7 was exceptional, usually we simply tell people to upgrade to the latest stable version ;)

Add/Change #3854 (initenv crashes: unable to create a trac environment for my project)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.