monotone

monotone Commit Details

Date:2010-01-03 20:53:48 (9 years 7 months ago)
Author:Markus Wanner
Branch:net.venge.monotone.cvsimport-branch-reconstruction
Commit:2eb20c5e2fedd4bdc388f7eec3dbd7dd416f17a7
Parents: e07adef47faa8790223c6cb0215990ced0aadf27
Message: * rcs_import.cc: make sure we don't find bogus cross paths by limiting

cross path search to the case both, path_a and path_b consist of more
than two blobs, restructure check_for_cross_path() a bit, so it doesn't
check twice after recursion, better graphviz file naming.
Changes:
Mrcs_import.cc (6 diffs)

File differences

rcs_import.cc
27312731
27322732
27332733
2734
2735
2736
2737
27342738
2739
2740
2741
27352742
27362743
27372744
......
27442751
27452752
27462753
2754
2755
2756
27472757
27482758
27492759
......
28232833
28242834
28252835
2826
2836
2837
2838
2839
28272840
28282841
28292842
......
28402853
28412854
28422855
2856
2857
2858
28432859
28442860
28452861
......
28572873
28582874
28592875
2876
28602877
28612878
28622879
2880
28632881
28642882
28652883
......
29122930
29132931
29142932
2915
2933
29162934
29172935
29182936
: "no switch needed"));
#endif
// If either path_a or path_b is only exactly two blobs long, there
// cannot be any kind of cross path. Skip the check is that case.
bool needs_cross_path_check = (path_a.size() > 2 && path_b.size() > 2);
vector<cvs_blob_index> cross_path;
if (needs_cross_path_check)
{
// FIXME: indentation
insert_iterator< vector< cvs_blob_index > >
ity_c(cross_path, cross_path.end());
false,
make_pair(invalid_blob, invalid_blob),
height_limit);
}
else
switch_needed = false;
if (!cross_path.empty())
{
// path from new_path_a to new_path_b.
check_for_cross_path(new_path_a, new_path_b, true);
}
}
}
else
{
// FIXME: indentation
// Short circuit if one of the above cross path resolution
// steps already require a DFS restart.
}
else
{
if (needs_cross_path_check)
{
// FIXME: indentation
// Extra check the other way around. Since either a DFS or
// our cross checks already guarantee that there are no more
// reverse cross paths, this should always succeed.
make_pair(invalid_blob, invalid_blob),
height_limit);
I(cross_path.empty());
}
handle_paths_of_cross_edge(path_a, path_b);
}
}
};
void handle_paths_of_cross_edge(vector<cvs_blob_index> & path_a,
i != path_b.end(); ++i)
blobs_to_show.push_back(*i);
write_graphviz_partial(cvs, "splitter", blobs_to_show, 5);
write_graphviz_partial(cvs, "branch_sanitizer", blobs_to_show, 5);
}
#endif

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status