Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#2107 closed defect (fixed)

Trac "remembers" old subversion changesets when migrating from one repo to another

Reported by: anonymous Owned by: Christian Boos
Priority: normal Milestone: 0.9
Component: version control/changeset view Version: 0.8.4
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This is an initial setup issue. I set up Trac and Subversion with a test repo. I then removed the old subversion repo, and then installed the new production one. Trac showed in the Timeline page changesets from the initial testing repo.

The problem is that Trac stores this info in its own internal tables, node_change and revision. Deleting all the rows from these tables solved this problem. There should be some way of doing this from the admin interface.

Attachments (2)

warn-if-repository_dir-changed.patch (3.7 KB ) - added by Christian Boos 19 years ago.
Provide an explicit warning in case the repository_dir was changed but trac-admin resync has not been called
warn-if-repository_dir-changed.2.patch (5.2 KB ) - added by Christian Boos 19 years ago.
Updated patch, taking into account the above comments

Download all attachments as: .zip

Change History (11)

comment:1 by anonymous, 19 years ago

Resolution: worksforme
Status: newclosed

You need to do a trac-admin resync to fix the timeline.

by Christian Boos, 19 years ago

Provide an explicit warning in case the repository_dir was changed but trac-admin resync has not been called

comment:2 by Christian Boos, 19 years ago

Milestone: 0.9
Resolution: worksforme
Status: closedreopened

I actually had some code around which checked for that situation: attachment:warn-if-repository_dir-changed.patch

comment:3 by Christian Boos, 19 years ago

Owner: changed from Jonas Borgström to Christian Boos
Status: reopenednew

comment:4 by Christopher Lenz, 19 years ago

Looks like there's a duplicate call to repos.sync() in that patch. Also, Matt suggested on IRC that we can use INSERT OR REPLACE INTO ... instead of the two separate SQL statements.

comment:5 by Jonas Borgström, 19 years ago

Maybe we should use the repository uuid instead of the path to detect new repositories.

by Christian Boos, 19 years ago

Updated patch, taking into account the above comments

comment:6 by Christian Boos, 19 years ago

Priority: lownormal
Status: newassigned

comment:7 by Christian Boos, 19 years ago

Is it OK to apply the second iteration of the patch?

comment:8 by Christopher Lenz, 19 years ago

Yeah, looks good.

comment:9 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

Applied a slightly reworked patch in r2312:

  • check earlier for the Subversion API version
  • adapt the Repository Mock object in versioncontrol/tests/cache.py

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.