Search code examples
svntrac

Trac: Changesets lost after changing SVN repository path


Last evening I did some housekeeping on our code repository - basically moved the code from /repo/trunk to /repo/projectname/trunk.

I changed the repo path on my trac.ini - after which trac complained the repository needed to be resynced. So I ran:

trac-admin /var/trac/projectname resync

and all was well.

Then I checked the changesets against the ticket and found that trac no longer has a link to show the code against changesets - says "No changeset XXX in repository".

Has anyone here had the same issue they managed to solve? I need the broken links to the changeset fixed.

Thank you


Solution

  • Sounds to me like you did:

    svn mv <repobaseurl>/trunk <repobaseurl>/projectname/trunk
    

    Then changed trac.ini from

    repository_dir = /path/to/repo
    

    to

    repository_dir = /path/to/repo/projectname
    

    What you have done is to point Trac at a subset of your repository... namely, only the changesets that affect the projectname subdirectory of the repository. This is generally referred to as a "scoped" repository.

    You have a couple of choices:

    1. You can change the repository_dir back to what it was and you will see all your changesets, and will see the history going back across your reorg. Simple fix.
    2. You can use svndumptool.py to retroactively move all your changesets to have always been under projectname instead of the root of the repository and leave repository_dir as you have it. Harder fix, may not even be what you want.