Below is the file 'tests/t_netsync_unrelated.at' from this revision. You can also download the file.
AT_SETUP([(normal) netsync on partially unrelated revisions]) AT_KEYWORDS([netsync]) MONOTONE_SETUP # This tests netsync'ing # # A B # \ / # C # # where A starts out shared, but B and C do not. # For analysis and discussion of solutions, see: # http://lists.gnu.org/archive/html/monotone-devel/2004-11/msg00043.html # There are other strategies that might be good besides the one # mentioned there; doing sideways deltas between heads, all sorts of # possibilities for maybe-efficient algorithms. NETSYNC_SETUP ADD_FILE(testfile1, [This is test file 1 ]) COMMIT(testbranch) BASE=`BASE_REVISION` RUN_NETSYNC(pull, testbranch) CHECK_SAME_STDOUT(MONOTONE automate graph, MONOTONE2 automate graph) CHECK_SAME_STDOUT(MONOTONE ls certs $BASE, MONOTONE ls certs $BASE) AT_CHECK(rm -rf MT) AT_CHECK(MONOTONE setup --branch=testbranch ., [], [ignore], [ignore]) ADD_FILE(testfile2, [This is test file 2 ]) COMMIT(testbranch) UNRELATED=`BASE_REVISION` AT_CHECK(MONOTONE --branch=testbranch merge, [], [ignore], [ignore]) AT_CHECK(MONOTONE update, [], [ignore], [ignore]) MERGE=`BASE_REVISION` RUN_NETSYNC(pull, testbranch) CHECK_SAME_STDOUT(MONOTONE automate graph, MONOTONE2 automate graph) CHECK_SAME_STDOUT(MONOTONE ls certs $BASE, MONOTONE ls certs $BASE) CHECK_SAME_STDOUT(MONOTONE ls certs $UNRELATED, MONOTONE ls certs $UNRELATED) CHECK_SAME_STDOUT(MONOTONE ls certs $MERGE, MONOTONE ls certs $MERGE) AT_CLEANUP