# # # patch "rcs_import.cc" # from [3ac086720db62d6994b544d9ff823c2bdca6883b] # to [b2acb887a406cb4ab01298b200ba0d7797744abc] # ============================================================ --- rcs_import.cc 3ac086720db62d6994b544d9ff823c2bdca6883b +++ rcs_import.cc b2acb887a406cb4ab01298b200ba0d7797744abc @@ -1270,7 +1270,8 @@ static void } static void -sanitize_rcs_file_timestamps(cvs_history & cvs) +sanitize_rcs_file_timestamps(cvs_history & cvs, + const cvs_event_ptr root_event) { while (1) { @@ -1278,7 +1279,7 @@ sanitize_rcs_file_timestamps(cvs_history // timestamp pairs which violate the corresponding dependency. stack< cvs_event_ptr > stack; set< cvs_event_ptr > done; - stack.push(cvs.root_event); + stack.push(root_event); list violations; @@ -1678,10 +1679,6 @@ import_rcs_file_with_cvs(string const & // link the pseudo trunk branch to the first event in the branch cvs.add_dependency(first_event, cvs.root_event); - // try to sanitize the timestamps within this RCS file with - // respect to the dependencies given. - sanitize_rcs_file_timestamps(cvs); - global_pieces.reset(); } @@ -3517,6 +3514,14 @@ import_cvs_repo(system_path const & cvsr walk_tree(file_path(), walker); } + // try to sanitize the timestamps within all RCS files with + // respect to the dependencies given. + { + for (blob_event_iter i = cvs.blobs[cvs.root_blob].begin(); + i != cvs.blobs[cvs.root_blob].end(); ++i) + sanitize_rcs_file_timestamps(cvs, *i); + } + // then we use algorithms from graph theory to get the blobs into // a logically meaningful ordering. {