Ticket #5993 (closed defect: fixed)
Opened 4 years ago
Last modified 2 years ago
Confusing error message when repository_dir has changed.
| Reported by: | anonymous | Owned by: | rblank |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12-multirepos |
| Component: | version control | Version: | |
| Severity: | minor | Keywords: | documentation multirepos |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description (last modified by cboos) (diff)
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
Change History
comment:1 Changed 4 years ago by cboos
- Description modified (diff)
- Keywords documentation added
- Milestone set to 0.11.1
comment:2 Changed 3 years ago by cboos
- Component changed from general to version control
- Keywords multirepos added
Let's not change that on 0.11 and check how this behaves on multirepos.
comment:3 Changed 3 years ago by cboos
- Milestone changed from 0.11-retriage to 0.12
comment:4 follow-up: ↓ 5 Changed 3 years ago by cboos
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.
comment:5 in reply to: ↑ 4 Changed 2 years ago by rblank
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 Changed 2 years ago by rblank
Oh, and concerning the original request, [8468] fixes the error message.
comment:7 Changed 2 years ago by cboos
- Owner changed from jonas to rblank
comment:8 Changed 2 years ago by cboos
- Milestone changed from 0.12 to 0.12-multirepos
comment:9 Changed 2 years ago by rblank
- Resolution set to fixed
- Status changed from new to 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.