# # # patch "revision.cc" # from [45ab55f0c66d5f4e4bd6ad31cc8ac4b370a637a3] # to [5e0f1237d50c8f318b6a73102446e46646d867d5] # # patch "roster.cc" # from [0615d22b6ac1016344df8323b861ed02bebe838d] # to [239ae8135b1d73bb14f44c2a88e8383c1767fc75] # # patch "tests/t_automate_get_manifest_of.at" # from [861f8c3fbaf0cfdaed8a22f195d3f96ded76ebec] # to [9c486b3d5af93c8854826aeabc9f01d42422eef1] # # patch "tests/t_automate_get_revision.at" # from [5b6959dece384787fd7723c86cbf40d70ead251c] # to [e92c9f1c2232af5374eab4258b5ca2e8967dd69c] # # patch "tests/t_cvsimport_drepper.at" # from [3db0e1cc27abf05a356ec12ea1cbc24e1175b0a1] # to [66e784892e504858f6bdfac5cd508d51d0b3e573] # # patch "tests/t_cvsimport_drepper2.at" # from [874da389b9e245a804f57b4961f5ff4f2a96c840] # to [c8c51a97cc4e7188336fc1e11421ef4d279ecf40] # # patch "tests/t_rosterify_attrs.at" # from [b0aaf4fce6eaa4d34e9236e46e9d4d852ad4ed9e] # to [5bb3025edb5706ff82bfdd61fd30f3e9df0ef1a5] # # patch "tests/t_rosterify_rename.at" # from [fd9e04171df0d76e4751c3929a2ff4a502d18ffb] # to [99cf14c901a2341534a388df1bbdd1f4a84aaf07] # # patch "tests/t_scan.at" # from [0f184e0d43389244694bb6900b4b0de97a18547b] # to [b27c459a9e7b8e0892cd531dd452acd69321c130] # ============================================================ --- revision.cc 45ab55f0c66d5f4e4bd6ad31cc8ac4b370a637a3 +++ revision.cc 5e0f1237d50c8f318b6a73102446e46646d867d5 @@ -1413,6 +1413,7 @@ { namespace syms { + std::string const format_version("format_version"); std::string const old_revision("old_revision"); std::string const new_manifest("new_manifest"); } @@ -1435,6 +1436,7 @@ { rev.check_sane(); basic_io::stanza st; + st.push_str_pair(syms::format_version, "1"); st.push_hex_pair(syms::new_manifest, rev.new_manifest.inner()()); printer.print_stanza(st); for (edge_map::const_iterator edge = rev.edges.begin(); @@ -1470,6 +1472,9 @@ MM(rev); rev.edges.clear(); std::string tmp; + parser.esym(syms::format_version); + parser.str(tmp); + I(tmp == "1"); parser.esym(syms::new_manifest); parser.hex(tmp); rev.new_manifest = manifest_id(tmp); ============================================================ --- roster.cc 0615d22b6ac1016344df8323b861ed02bebe838d +++ roster.cc 239ae8135b1d73bb14f44c2a88e8383c1767fc75 @@ -2065,6 +2065,7 @@ namespace syms { // roster symbols + string const format_version("format_version"); string const dir("dir"); string const file("file"); string const content("content"); @@ -2167,6 +2168,11 @@ bool print_local_parts) const { I(has_root()); + { + basic_io::stanza st; + st.push_str_pair(syms::format_version, "1"); + pr.print_stanza(st); + } for (dfs_iter i(root_dir); !i.finished(); ++i) { node_t curr = *i; @@ -2249,6 +2255,13 @@ nodes.clear(); root_dir.reset(); mm.clear(); + + { + pa.esym(syms::format_version); + std::string vers; + pa.str(vers); + I(vers == "1"); + } while(pa.symp()) { @@ -4125,8 +4138,10 @@ data mdat; MM(mdat); write_manifest_of_roster(r, mdat); - data expected("dir \"\"\n" + data expected("format_version \"1\"\n" "\n" + "dir \"\"\n" + "\n" "dir \"fo\"\n" "\n" "dir \"foo\"\n" @@ -4154,7 +4169,9 @@ // node_id order is a hassle. // root 1, foo 2, xx 3, fo 4, foo_bar 5, foo_ang 6, foo_zoo 7 - data expected(" dir \"\"\n" + data expected("format_version \"1\"\n" + "\n" + " dir \"\"\n" " ident \"1\"\n" " birth [1234123412341234123412341234123412341234]\n" "path_mark [1234123412341234123412341234123412341234]\n" ============================================================ --- tests/t_automate_get_manifest_of.at 861f8c3fbaf0cfdaed8a22f195d3f96ded76ebec +++ tests/t_automate_get_manifest_of.at 9c486b3d5af93c8854826aeabc9f01d42422eef1 @@ -1,11 +1,13 @@ # -*- Autoconf -*- AT_SETUP([automate get_manifest_of]) NEED_UNB64 MONOTONE_SETUP -AT_DATA(expected, [dir "" +AT_DATA(expected, [format_version "1" +dir "" + file "foo" content @<:@4cbd040533a2f43fc6691d773d510cda70f4126a@:>@ ]) ============================================================ --- tests/t_automate_get_revision.at 5b6959dece384787fd7723c86cbf40d70ead251c +++ tests/t_automate_get_revision.at e92c9f1c2232af5374eab4258b5ca2e8967dd69c @@ -1,10 +1,11 @@ # -*- Autoconf -*- AT_SETUP([automate get_revision]) NEED_UNB64 MONOTONE_SETUP -AT_DATA(expected, [new_manifest @<:@ee4a0fb04b83aaa7dc91fa796dd4d0feddc9f502@:>@ +AT_DATA(expected, [format_version "1" +new_manifest @<:@ee4a0fb04b83aaa7dc91fa796dd4d0feddc9f502@:>@ old_revision @<:@@:>@ ============================================================ --- tests/t_cvsimport_drepper.at 3db0e1cc27abf05a356ec12ea1cbc24e1175b0a1 +++ tests/t_cvsimport_drepper.at 66e784892e504858f6bdfac5cd508d51d0b3e573 @@ -6,8 +6,10 @@ NEED_UNGZB64 -AT_DATA(test.manifest, [dir "" +AT_DATA(test.manifest, [format_version "1" +dir "" + dir "src" file "src/objdump.c" ============================================================ --- tests/t_cvsimport_drepper2.at 874da389b9e245a804f57b4961f5ff4f2a96c840 +++ tests/t_cvsimport_drepper2.at c8c51a97cc4e7188336fc1e11421ef4d279ecf40 @@ -6,8 +6,10 @@ NEED_UNGZB64 -AT_DATA(test.manifest, [dir "" +AT_DATA(test.manifest, [format_version "1" +dir "" + dir "t" dir "t/libasm" ============================================================ --- tests/t_rosterify_attrs.at b0aaf4fce6eaa4d34e9236e46e9d4d852ad4ed9e +++ tests/t_rosterify_attrs.at 5bb3025edb5706ff82bfdd61fd30f3e9df0ef1a5 @@ -98,8 +98,10 @@ AT_CHECK(MONOTONE db rosterify, [], [ignore], [ignore]) # check the first manifest -AT_DATA([first_manifest_good], [dir "" +AT_DATA([first_manifest_good], [format_version "1" +dir "" + dir "testdir" attr "dir_foo" "bar" @@ -114,8 +116,10 @@ AT_CHECK(MONOTONE automate select i: | monotone automate toposort address@hidden | head -1 | monotone automate get_manifest_of address@hidden, [], [expout], [ignore]) # check the second manifest -AT_DATA([second_manifest_good], [dir "" +AT_DATA([second_manifest_good], [format_version "1" +dir "" + dir "testdir" attr "dir_foo" "baz" ============================================================ --- tests/t_rosterify_rename.at fd9e04171df0d76e4751c3929a2ff4a502d18ffb +++ tests/t_rosterify_rename.at 99cf14c901a2341534a388df1bbdd1f4a84aaf07 @@ -79,7 +79,8 @@ AT_CHECK(MONOTONE db rosterify, [], [ignore], [ignore]) # check the second revision -AT_DATA([expout], [new_manifest @<:@274cc1314b1218394f058f9174faa062aaf08531@:>@ +AT_DATA([expout], [format_version "1" +new_manifest @<:@274cc1314b1218394f058f9174faa062aaf08531@:>@ old_revision @<:@e9f446845505167b1b939cbcf1f5797372fe96f0@:>@ ============================================================ --- tests/t_scan.at 0f184e0d43389244694bb6900b4b0de97a18547b +++ tests/t_scan.at b27c459a9e7b8e0892cd531dd452acd69321c130 @@ -19,8 +19,10 @@ ]) AT_CHECK(CANONICALISE(foo/bar/testfile2)) -AT_DATA(manifest, [dir "" +AT_DATA(manifest, [format_version "1" +dir "" + dir "foo" dir "foo/bar"