# # # patch "ChangeLog" # from [ca34080825296d943f1a58cac5191ed2d73827e5] # to [078120811212b95f032b215623f50705a8eac853] # # patch "roster.cc" # from [7db14504971c5a26a8e5f6ae4726e4a05559be8d] # to [226dbdd384e482e23f7e835e8042a8543efa3158] # ============================================================ --- ChangeLog ca34080825296d943f1a58cac5191ed2d73827e5 +++ ChangeLog 078120811212b95f032b215623f50705a8eac853 @@ -1,5 +1,13 @@ 2006-04-05 Nathaniel Smith + * roster.cc (unify_roster_oneway): Discover that this code is not + really composable with arbitrary node_id_sources; add an assertion + to document the real interface, and a comment explaining why this + is the case, and why it is a problem for workspace merge and db + check. + +2006-04-05 Nathaniel Smith + * database_check.cc (check_sane): Remove dead code. 2006-04-05 Nathaniel Smith ============================================================ --- roster.cc 7db14504971c5a26a8e5f6ae4726e4a05559be8d +++ roster.cc 226dbdd384e482e23f7e835e8042a8543efa3158 @@ -1027,6 +1027,19 @@ if (temp_node(bid)) { node_id new_nid = nis.next(); + // the node_id_source provided to this function must only generate + // true node ids, because this code was written with the + // assumption that only true nids would come in or go out, and + // temp ids are used as an intermediate stage to indicate nodes + // that need true ids installed. + // FIXME: make everything work correctly when this node_id_source + // returns temp ids. This is needed for workspace merge support. + // FIXME: having done this, add a test in database_check.cc that + // for each revision, generates that rev's roster from scratch, + // and compares it to the one stored in the db. (Do the + // comparison using something like equal_up_to_renumbering, except + // should say if (!temp_node(a) && !temp_node(b)) I(a == b).) + I(!temp_node(new_nid)); a.replace_node_id(aid, new_nid); b.replace_node_id(bid, new_nid); b_new.erase(bid);