Edgewall Software

Opened 16 years ago

Closed 15 years ago

#4204 closed defect (fixed)

Resync broken

Reported by: M.v.Kalmthout_1@… Owned by: Christian Boos
Priority: high Milestone: 0.10.3
Component: admin/console Version: devel
Severity: normal Keywords:
Cc: trac@…, brad@… Branch:
Release Notes:
API Changes:
Internal Changes:


I changed the repository path so issued a trac-admin resync. Result:

Resyncing repository history...
Command failed: The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.

Reverting [4303] made the resync possible again. Using 0.10.x stable at [4310]

Attachments (0)

Change History (9)

comment:1 by Christian Boos, 16 years ago

I can't reproduce the problem, neither with r4303, nor with r4310, now even trying SQLite, PostgreSQL and MySQL in turn.

Are you sure that you're using a clean install? In particular, check the following: source:branches/0.10-stable/trac/scripts/admin.py@4310#L682

  1. Check that your corresponding file matches. For that, you can insert some print statement, for example.
  2. Does adding a cnx.commit() immediately after the execute help?
    • If yes, what's your database and bindings (+ the versions used)

comment:2 by M.v.Kalmthout_1@…, 16 years ago

I use a source installation using

./setup.py install  --force

So I think all files should be up to date ?

I changed the script as you suggest to:

        repos = self.__env.get_repository()
        cursor.execute("DELETE FROM system WHERE name='repository_dir'")

This solves my problem IF I use the following order:

  • add 'cnx.commit()'
  • resync the repository history
  • change the 'repository_dir'
  • resync again

For your information: following order still reproduces the error

  • add 'cnx.commit()'
  • change the 'repository_dir'
  • resync

Additional info:

  • repository_dir is only changed to an 'other' scope within the previous repository.
  • Python 2.4.4 (windows)
  • pysqlite-2.3.2.win32-py2.4
  • mod_python-3.2.10.win32-py2.4-apache2.0

Let me know if I you like me to do some additional tests or provide more info.

comment:3 by Lutz Frommberger <trac@…>, 16 years ago

Cc: trac@… added

I had the same issue with 4310 on a Debian Sarge with sqlite3. Let me know if you need more info.

comment:4 by Christian Boos, 16 years ago

Milestone: 0.10.3
Owner: changed from Christopher Lenz to Christian Boos
Priority: normalhigh
Status: newassigned

No, it's OK, I can reproduce it too now… oops ;)

Sorry for the delays.

comment:5 by Christian Boos, 16 years ago

Fixed in r4337 for 0.11 and r4338 for 0.10.3.

Thanks for the reports!

comment:6 by Christian Boos, 16 years ago

Resolution: fixed
Status: assignedclosed

Damn, first I failed to see the problem, now I forget to close it… there's something wrong with this ticket ;)

Must be the numbers…

comment:7 by brad <brad@…>, 15 years ago

Cc: brad@… added
Resolution: fixed
Status: closedreopened

I can recreate this at r4385 in 0.10-stable branch.

> trac-admin arclib resync
Resyncing repository history...
Command failed: The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.

comment:8 by Christian Boos, 15 years ago

Are you sure it's not an install issue, i.e. the trac/scripts/admin.py that gets used is older?

In any case, look at r4338, add a print in line 681 to check to above hypothesis. If you're really using > r4338, try to add a cnx.commit() on that line (i.e. immediately before the get_repository()).

comment:9 by anonymous, 15 years ago

Resolution: fixed
Status: reopenedclosed

okay, I'm a blockhead. I was not fully switched over from SQLite to Postgres with this project/repos/env. When I got it back fully to PG (and noted this in trac.ini), and deleted the 'repository_dir' record from 'system', things worked fine. Sorry for the noise.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment

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