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 )
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 , 17 years ago
Description: | modified (diff) |
---|---|
Keywords: | documentation added |
Milestone: | → 0.11.1 |
comment:2 by , 16 years ago
Component: | general → version control |
---|---|
Keywords: | multirepos added |
Let's not change that on 0.11 and check how this behaves on multirepos.
comment:3 by , 16 years ago
Milestone: | 0.11-retriage → 0.12 |
---|
follow-up: 5 comment:4 by , 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. Forrepository_dir
, this would be the resync if the uuid changed
- this can be reused for other things in the future, like setting the
We could have similar features in the WebAdmin, but most important is to get them first in trac-admin.
comment:5 by , 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. Forrepository_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 , 15 years ago
Oh, and concerning the original request, [8468] fixes the error message.
comment:7 by , 15 years ago
Owner: | changed from | to
---|
comment:8 by , 15 years ago
Milestone: | 0.12 → 0.12-multirepos |
---|
comment:9 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
Probably even better would be a link to the relevant documentation.