| 68 | post-activate { |
| 69 | |
| 70 | ui_msg "* Trying to rebuild known repositories:" |
| 71 | |
| 72 | set exec_cmd exec |
| 73 | set fossil_list {fossil all list} |
| 74 | set fossil_rebuild {fossil rebuild} |
| 75 | |
| 76 | if [catch {eval $exec_cmd $fossil_list} repositories] { |
| 77 | ui_error "failed to execute $fossil_list" |
| 78 | } |
| 79 | |
| 80 | if [llength $repositories] { |
| 81 | foreach repo $repositories { |
| 82 | if {![catch {eval $exec_cmd $fossil_rebuild $repo} result]} { |
| 83 | ui_msg "* successfully rebuild $repo" |
| 84 | } else { |
| 85 | ui_msg "* failed to rebuild $repo" |
| 86 | } |
| 87 | } |
| 88 | } else { |
| 89 | ui_msg "* No repositories found" |
| 90 | } |
| 91 | |
| 92 | ui_msg "* Finished rebuilding repositories" |
| 93 | |
| 94 | } |
| 95 | |
| 96 | notes { |
| 97 | ************************************************ |
| 98 | * It is recommended to rebuild repositories * |
| 99 | * created with earlier versions of fossil. * |
| 100 | * To rebuild a repository run: * |
| 101 | * fossil rebuild /<path>/<to>/<repository> * |
| 102 | * Rebuilding a repository is a safe operation, * |
| 103 | * executing it more then once will not harm * |
| 104 | * the integrity of a repository. * |
| 105 | ************************************************ |
| 106 | } |
| 107 | |