The unified diff between revisions [95cbeaa8..] and [850c20aa..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "ChangeLog"
# from [8406d3d44ebe3cdcbf3a85455d06e9d8256b0e18]
# to [866f377f68993b88a0a668e26f85e5aa51259b98]
#
# patch "netsync.cc"
# from [4bdd084e4dd25d0a85c5287e99850c30c4f6cc66]
# to [b3cddb10629e909ba4bbb0a4a254cf80419a942e]
#
# patch "tests/t_netsync_unrelated.at"
# from [e267f934990722a892df9ef39c96c3407b327f03]
# to [e6549782dda0fd91bdbf9490021c25e1ee262c5c]
#
============================================================
--- ChangeLog 8406d3d44ebe3cdcbf3a85455d06e9d8256b0e18
+++ ChangeLog 866f377f68993b88a0a668e26f85e5aa51259b98
@@ -1,3 +1,11 @@
+2005-09-27 Matt Johnston <matt@ucc.asn.au>
+
+ * netsync.cc (ancestry_fetcher): new approach to requesting file
+ and manifest deltas and full data. Tries to be more efficient
+ for the vcache of recontstructed data, and conceptually simpler
+
+ * tests/t_netsync_unrelated.at: passes, remove XFAIL
+
2005-09-27 Richard Levitte <richard@levitte.org>
* monotone.texi (Tutorial): It seems like texi2pdf gets quite
============================================================
--- netsync.cc 4bdd084e4dd25d0a85c5287e99850c30c4f6cc66
+++ netsync.cc b3cddb10629e909ba4bbb0a4a254cf80419a942e
@@ -3633,10 +3633,14 @@ run_netsync_protocol(protocol_voice voic
//
// 2) foreach new head, traverse up the revision ancestry, building
// a set of reverse file/manifest deltas (we stop when we hit an
-// already-seen or existing-in-db rev). At the same time, build a
-// smaller set of forward deltas to files/manifests which exist in the
-// head revisions.
+// already-seen or existing-in-db rev).
//
+// at the same time, build up smaller set of forward deltas (files and
+// manifests). these have a file/manifest in the new head as the
+// destination, and end up having an item already existing in the
+// database as the source (or null, in which case full data is
+// requested).
+//
// 3) For each file/manifest in head, first request the forward delta
// (or full data if there is no path back to existing data). Then
// traverse up the set of reverse deltas, daisychaining our way until
@@ -3679,6 +3683,8 @@ ancestry_fetcher::ancestry_fetcher(sessi
request_manifests();
}
+// adds file deltas from the given changeset into the sets of forward
+// and reverse deltas
void
ancestry_fetcher::traverse_files(change_set const & cset)
{
@@ -3691,7 +3697,7 @@ ancestry_fetcher::traverse_files(change_
% parent_file % child_file);
I(!(parent_file == child_file));
- // XXX when changeset format is altered to have [...]->[] deltas on deletion,
+ // when changeset format is altered to have [...]->[] deltas on deletion,
// this assertion needs revisiting
I(!null_id(child_file));
@@ -3734,6 +3740,7 @@ ancestry_fetcher::traverse_files(change_
}
}
+// adds the given manifest deltas to the sets of forward and reverse deltas
void
ancestry_fetcher::traverse_manifest(manifest_id const & child_man,
manifest_id const & parent_man)
@@ -3762,8 +3769,6 @@ ancestry_fetcher::traverse_manifest(mani
d != fwd_manifest_deltas.upper_bound(child_man);
d++)
{
- L(F("size %d\n") % fwd_manifest_deltas.size());
- L(F("inserting %s->%s") % parent_man % d->second);
fwd_manifest_deltas.insert(make_pair(parent_man, d->second));
}
@@ -3772,6 +3777,8 @@ ancestry_fetcher::traverse_manifest(mani
}
}
+// traverse up the ancestry for each of the given new head revisions,
+// storing sets of file and manifest deltas
void
ancestry_fetcher::traverse_ancestry(set<revision_id> const & heads)
{
============================================================
--- tests/t_netsync_unrelated.at e267f934990722a892df9ef39c96c3407b327f03
+++ tests/t_netsync_unrelated.at e6549782dda0fd91bdbf9490021c25e1ee262c5c
@@ -16,9 +16,6 @@ MONOTONE_SETUP
# mentioned there; doing sideways deltas between heads, all sorts of
# possibilities for maybe-efficient algorithms.
-# This test is a bug report.
-AT_XFAIL_IF(true)
-
NETSYNC_SETUP
ADD_FILE(testfile1, [This is test file 1