# # patch "ChangeLog" # from [18d49951f0df2a781f2ceafd29a120354915574c] # to [4e51b4903141a949f5a0d5f99db220e9f5f7a0b4] # # patch "netsync.cc" # from [ae1621049348d574ecf3694807ba5e8dd167a34f] # to [a051a19a0dc623638494221324ed04b20d35b711] # # patch "ui.cc" # from [4bba764f10d15f4e0302e26825c28b37cd4a96e9] # to [81f19fda85b379e6e32241b99c9355fa8d0ff186] # # patch "ui.hh" # from [abe095ea2f6eae5256674235337553e076336f7a] # to [582fb0aff44602a587da60f79754f7d01e11a187] # =============================================== --- ChangeLog 18d49951f0df2a781f2ceafd29a120354915574c +++ ChangeLog 4e51b4903141a949f5a0d5f99db220e9f5f7a0b4 @@ -1,5 +1,12 @@ 2005-07-17 Nathaniel Smith + * ui.{cc,hh} (tick_write_dot::write_ticks): Start a new line when + too many dots have been written. + * netsync.cc (process_refine_cmd): Add comment noting a possible + optimization regarding subtree refinement. + +2005-07-17 Nathaniel Smith + * configure.ac, win32/monotone.iss, monotone.spec: * debian/changelog: Bump version numbers to 0.21. * NEWS: Commit to a timestamp. =============================================== --- netsync.cc ae1621049348d574ecf3694807ba5e8dd167a34f +++ netsync.cc a051a19a0dc623638494221324ed04b20d35b711 @@ -2326,6 +2326,9 @@ load_merkle_node(their_node.type, our_node->level + 1, subprefix, our_subtree); I(our_node->type == our_subtree->type); + // FIXME: it would be more efficient here, to instead of + // sending our subtree, just send the data for everything + // in the subtree. queue_refine_cmd(*our_subtree); } break; @@ -2425,6 +2428,10 @@ merkle_ptr our_subtree; load_merkle_node(our_node->type, our_node->level + 1, subprefix, our_subtree); + // FIXME: it would be more efficient here, to instead of + // sending our subtree, just send the data for everything + // in the subtree (except, possibly, the item they already + // have). queue_refine_cmd(*our_subtree); } break; @@ -2485,6 +2492,9 @@ merkle_ptr our_subtree; load_merkle_node(our_node->type, our_node->level + 1, subprefix, our_subtree); + // FIXME: it would be more efficient here, to instead of + // sending our subtree, just send the data for everything + // in the subtree (except, possibly, the dead thing). queue_refine_cmd(*our_subtree); } break; =============================================== --- ui.cc 4bba764f10d15f4e0302e26825c28b37cd4a96e9 +++ ui.cc 81f19fda85b379e6e32241b99c9355fa8d0ff186 @@ -186,6 +186,7 @@ void tick_write_dot::write_ticks() { + static const string tickline_prefix = "monotone: "; string tickline1, tickline2; bool first_tick = true; @@ -197,7 +198,8 @@ else { tickline1 = "monotone: ticks: "; - tickline2 = "\nmonotone: "; + tickline2 = "\n" + tickline_prefix; + chars_on_line = tickline_prefix.size(); } for (map::const_iterator i = ui.tickers.begin(); @@ -220,6 +222,12 @@ || ((i->second->ticks / i->second->mod) > (old->second / i->second->mod))) { + chars_on_line += i->second->shortname.size(); + if (chars_on_line > 72) + { + chars_on_line = tickline_prefix.size() + i->second->shortname.size(); + tickline2 += "\n" + tickline_prefix; + } tickline2 += i->second->shortname; if (old == last_ticks.end()) =============================================== --- ui.hh abe095ea2f6eae5256674235337553e076336f7a +++ ui.hh 582fb0aff44602a587da60f79754f7d01e11a187 @@ -60,6 +60,7 @@ void clear_line(); private: std::map last_ticks; + int chars_on_line; }; struct tick_write_nothing : virtual public tick_writer