# # patch "ChangeLog" # from [c5b6af776442ffcda8b25b0b94a9785795da0817] # to [9e0ee021f2b1d81700e96ab1f2705ee47ab7723f] # # patch "netsync.cc" # from [5d33f00ec5c8e80c76ace7d2cbeb494c8a99424a] # to [e1239ee221729406ac7a958d4f9f8740f774b127] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,15 @@ +2005-06-15 Richard Levitte
+ + * netsync.cc (struct session): Add a pattern regex cache. + (analyze_ancestry_graph): Use the regex cache instead of the + pattern string itself. This is especially important when the + pattern is used as an old-style collection. + (process_hello_cmd): Recreate the pattern regex cache with the + conversion of the pattern to a regex when it's used as an + old-style collection. + (process_auth_cmd): When the pattern changes, change the regex + cache as well. + 2005-06-14 Richard Levitte * std_hooks.lua (get_preferred_merge2_command, --- netsync.cc +++ netsync.cc @@ -226,6 +226,7 @@ bool arm(); utf8 pattern; + boost::regex pattern_re; id remote_peer_key_hash; rsa_keypair_id remote_peer_key_name; bool authenticated; @@ -435,6 +436,7 @@ protocol_version(constants::netcmd_current_protocol_version), armed(false), pattern(""), + pattern_re(".*"), remote_peer_key_hash(""), remote_peer_key_name(""), authenticated(false), @@ -458,6 +460,7 @@ N(patterns.size() == 1, F("client can only sync one pattern at a time")); this->pattern = idx(patterns, 0); + this->pattern_re = boost::regex(this->pattern()); } dbw.set_on_revision_written(boost::bind(&session::rev_written_callback, @@ -1113,8 +1116,6 @@ set