# # patch "ChangeLog" # from [57d565f3778c1c511828115215cbd8fd7e2555d7] # to [610b18234a1280d9840a5cb47c32cb7572df84d9] # # patch "change_set.cc" # from [f45da9e6d6bc784324d6f606a12d21c34a6f306d] # to [8721281fd257c827409baf2df2ec98e7883e0710] # # patch "diff_patch.cc" # from [509ae70941aa3c6f3769a8da148ec5a5e9e28cc6] # to [ef0c0571db4382835b2fa73475bd23cbe6a6ea33] # # patch "netsync.cc" # from [f923d6ad607a3193c29152a2902930ffc5bffed3] # to [af29d63f695bfb5b0ade7e9d50e098773266f211] # # patch "ui.cc" # from [f0e2ff249a83fa8a210f961d773ca560bb281592] # to [bf5397526968d5189f12fef56ecd4990f622beef] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,19 @@ +2005-04-16 Matt Johnston + + * change_set.cc (compose_rearrangement): remove logging statements + that were using noticable CPU time. + +2005-04-15 Olivier Andrieu + + * diff_patch.cc(guess_binary): do not use '\x00' as first + character of a C string ... + +2005-04-15 Sebastian Spaeth + + * ui.cc: print byte progress to one decimal place + in k or M. + * netsync.cc: update dot ticker every 1024 bytes. + 2005-04-15 Matt Johnston * change_set.cc (confirm_proper_tree): use bitsets rather than maps --- change_set.cc +++ change_set.cc @@ -761,15 +761,19 @@ if (old_path == new_path) { + /* L(F("skipping preserved %s %d : '%s'\n") % (path_item_type(old_item) == ptype_directory ? "directory" : "file") % curr % old_path); + */ continue; } + /* L(F("analyzing %s %d : '%s' -> '%s'\n") % (path_item_type(old_item) == ptype_directory ? "directory" : "file") % curr % old_path % new_path); + */ if (null_name(path_item_name(old_item))) { --- diff_patch.cc +++ diff_patch.cc @@ -25,7 +25,8 @@ { // these do not occur in ASCII text files // FIXME: this heuristic is (a) crap and (b) hardcoded. fix both these. - if (s.find_first_of("\x00\x01\x02\x03\x04\x05\x06\x0e\x0f" + if (s.find_first_of('\x00') != string::npos || + s.find_first_of("\x01\x02\x03\x04\x05\x06\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17\x18" "\x19\x1a\x1c\x1d\x1e\x1f") != string::npos) return true; --- netsync.cc +++ netsync.cc @@ -2884,8 +2884,8 @@ session sess(role, client_voice, collections, all_collections, app, address(), server.get_socketfd(), timeout); - sess.byte_in_ticker.reset(new ticker("bytes in", ">", 256, true)); - sess.byte_out_ticker.reset(new ticker("bytes out", "<", 256, true)); + sess.byte_in_ticker.reset(new ticker("bytes in", ">", 1024, true)); + sess.byte_out_ticker.reset(new ticker("bytes out", "<", 1024, true)); if (role == sink_role) { sess.cert_in_ticker.reset(new ticker("certs in", "c", 3)); --- ui.cc +++ ui.cc @@ -5,6 +5,7 @@ #include "transforms.hh" #include +#include #include // copyright (C) 2002, 2003 graydon hoare @@ -84,15 +85,28 @@ i != ui.tickers.end(); ++i) { string suffix; - int div = 1; + ostringstream disptick; if (i->second->kilocount && i->second->ticks >= 10000) - { - div = 1024; - suffix = "k"; + { // automatic unit conversion is enabled + float div; + if (i->second->ticks >= 1048576) { + // ticks >=1MB, use Mb + div = 1048576; + suffix = "M"; + } else { + // ticks <1MB, use kb + div = 1024; + suffix = "k"; + } + disptick << std::fixed << std::setprecision(1) << + (i->second->ticks / div); + } else { + // no automatic unit conversion. + disptick << i->second->ticks; } tickline += string(" [") - + i->first + ": " + lexical_cast(i->second->ticks / div) + + i->first + ": " + disptick.str() + suffix + "]"; }