# # # patch "ChangeLog" # from [cf8c322e9e6e3463bfc32f52596586c8012848e8] # to [1725a569cbf01398d87debcb16981ac0e24986b5] # # patch "database.cc" # from [62fac6c9d0959ff3d284daa9caad20f23a758348] # to [0f90adb5a765051661760d886a200529e8fd4b42] # ============================================================ --- ChangeLog cf8c322e9e6e3463bfc32f52596586c8012848e8 +++ ChangeLog 1725a569cbf01398d87debcb16981ac0e24986b5 @@ -1,5 +1,9 @@ 2006-01-19 Nathaniel Smith + * database.cc (check_format): Small cleanups to previous change. + +2006-01-19 Nathaniel Smith + Fix bug reported by Henry Nestler, where 'serve' did not detect that the user had not run 'db rosterify'. * database.cc (check_rosterified): Rename to... ============================================================ --- database.cc 62fac6c9d0959ff3d284daa9caad20f23a758348 +++ database.cc 0f90adb5a765051661760d886a200529e8fd4b42 @@ -96,19 +96,19 @@ void database::check_format() { - results res_manifests, res_revisions, res_rosters; + results res_revisions; string manifests_query = "SELECT 1 FROM manifests LIMIT 1"; string revisions_query = "SELECT 1 FROM revisions LIMIT 1"; string rosters_query = "SELECT 1 FROM rosters LIMIT 1"; - fetch(res_manifests, one_col, any_rows, manifests_query.c_str()); fetch(res_revisions, one_col, any_rows, revisions_query.c_str()); - fetch(res_rosters, one_col, any_rows, rosters_query.c_str()); if (res_revisions.size() > 0) { // they have revisions, so they can't be _ancient_, but they still might // not have rosters + results res_rosters; + fetch(res_rosters, one_col, any_rows, rosters_query.c_str()); N(res_rosters.size() != 0, F("database %s contains revisions but no rosters\n" "if you are a project leader or doing local testing:\n" @@ -126,6 +126,8 @@ // trigger this check by taking a pre-roster monotone, doing "db // init; commit; db kill_rev_locally", and then upgrading to a // rosterified monotone.) + results res_manifests; + fetch(res_manifests, one_col, any_rows, manifests_query.c_str()); N(res_manifests.size() == 0, F("database %s contains manifests but no revisions\n" "this is a very old database; it needs to be upgraded\n"