Files for Crucible review disappear after deleting or renaming a repository
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Use Case
The Subversion URL for the repository was changed by: Created a new repository (NewReponame) with the new Subversion URL, then deleting the repository with the old Subversion URL (OldReponame). And now the existing reviews that pointed to the OldReponame do not work.
Want to delete a Fisheye repository (or move the crucible data to another server which does not have the same repositories), but still want to access the existing reviews that were created against this repository.
Symptoms
When viewing the Crucible reviews on Crucible 1.x the following error is reported while attempting to expand the file:
repository not available
Cause
In Crucible 1.6.* we introduced a means to cache file revisions within reviews so that, even if the repository is not available (e.g. deleted) the reviews will still display. Please refer to Store the contents of files in reviews.
However due to a bug that we have recently discovered, while the files are cached, it will not display these cached files unless the repository is available. This bug has been fixed in Crucible 2.0 - (See CRUC-1309 - Crucible MUST serve CrucibleRevisions it has, regardless of FE repository status.).
Resolution
Use Case 1: Editing a repository
If you have another Fisheye repository pointed to same URL but with a different name, then you can rename this repository back to the name that Crucible expects.
To do this, please do the following:
Shutdown you server.
Make a backup of your
FISHEYE_INST
directory.Rename your
FISHEYE_INST/var/cache/NEWREPONAME
toFISHEYE_INST/var/cache/OLDREPONAME
(whereOLDREPONAME
is the previous name of the repository).Edit your
FISHEYE_INST/config.xml
file and search for the new repository name.<repository store-diff="true" description="Desc" name="NewReponame" enabled="true">
In the above, the name of the repository is NewReponame (name="NewReponame"). Change the name to the old repository name:
<repository store-diff="true" description="Desc" name="OldReponame" enabled="true">
Restart your sever.
This way all of your existing reviews will work.
If there is a reason you cannot rename the repository back to the OldReponame
, follow the steps in Case 2.
Use Case 2: Deleting a repository
A workaround on Crucible 1.x is to create a repository within crucible using the SCM Light Plugin, such as the perforce light repository with the same name as the repository you deleted/moved/renamed/disabled.
This will allow Crucible to display all the reviews correctly and as the light SCM plugin repositories do not need to index (unlike Fisheye repositories), it will not impact your Crucible servers performance. Once you have close the reviews, you can delete the light SCM plugin repositories.
Was this helpful?