Edgewall Software
Modify

Opened 17 years ago

Closed 15 years ago

#5993 closed defect (fixed)

Confusing error message when repository_dir has changed.

Reported by: anonymous Owned by: Remy Blank
Priority: normal Milestone: 0.12-multirepos
Component: version control Version:
Severity: minor Keywords: documentation multirepos
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

The error one gets says:

TracError: The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.

However one need to do trac-admin <trac-env> resync.

Attachments (0)

Change History (9)

comment:1 by Christian Boos, 17 years ago

Description: modified (diff)
Keywords: documentation added
Milestone: 0.11.1

Probably even better would be a link to the relevant documentation.

comment:2 by Christian Boos, 15 years ago

Component: generalversion control
Keywords: multirepos added

Let's not change that on 0.11 and check how this behaves on multirepos.

comment:3 by Christian Boos, 15 years ago

Milestone: 0.11-retriage0.12

comment:4 by Christian Boos, 15 years ago

Unless I'm mistaken, there's no support for tracking repository moves in MultiRepos.

Several options:

  • expand repository add <repos> <dir> so that it supports changing <dir> if <repos> already exists
    • if the uuid is the same, that was simply a move, nothing else changes
    • otherwise, there's a resync
  • add a new repository set <repos> <key> <value>, in order to set metadata values
    • this can be reused for other things in the future, like setting the url (#1781), description, …
    • depending on the <key>, different side-effects would be triggered. For repository_dir, this would be the resync if the uuid changed

We could have similar features in the WebAdmin, but most important is to get them first in trac-admin.

in reply to:  4 comment:5 by Remy Blank, 15 years ago

Replying to cboos:

Unless I'm mistaken, there's no support for tracking repository moves in MultiRepos.

The repository path is editable in the admin panel, and when it changes, the notice suggests running trac-admin $ENV repository resync.

And changing the path without resyncing seems to work at first (when the repository has only moved), but it will actually fail at the next sync attempt, as repository_dir keeps track of the old name. So changing the directory currently requires a resync. We could remove that check, or replace it with a check on a repository ID.

add a new repository set <repos> <key> <value>, in order to set metadata values

I have done that in [8467], but currently the command doesn't have any side-effects, it only gives the same warnings as the admin panel.

  • depending on the <key>, different side-effects would be triggered. For repository_dir, this would be the resync if the uuid changed

The thing is, we currently don't have a backend-neutral way of checking if two repositories are the same. svn_fs has a UUID, cache doesn't have it, and neither does hg. So how would you know that a change in dir is a relocation as opposed to a repository change?

Oh wait, we do have get_base(), which in Subversion's case contains the UUID. But scoped repositories will have the same base as unscoped ones.

comment:6 by Remy Blank, 15 years ago

Oh, and concerning the original request, [8468] fixes the error message.

comment:7 by Christian Boos, 15 years ago

Owner: changed from Jonas Borgström to Remy Blank

comment:8 by Christian Boos, 15 years ago

Milestone: 0.120.12-multirepos

comment:9 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

I still haven't found a good way of finding out wheter two repositories are the same or not. So in the current state, we require a resync after a repository move. The original issue has been fixed, and both the admin panel and trac-admin allow changing repository metadata, so I'm closing this as fixed.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank 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.