# # # patch "automate.cc" # from [b23eced8b6c237fd768369cf7d32ba6119f19fe4] # to [7a4b18e445c1fe81e9bd61b759db3f0974e61cbc] # # patch "tests/automate_inventory/__driver__.lua" # from [e12ed1600e4dc846891575fd758971461ff8512f] # to [3dfb9ba03b255abf9470e6242d016f98fc4b4429] # # patch "tests/automate_inventory_options/__driver__.lua" # from [8e5f7502832947e0046dd024081501e3954b0f6b] # to [a5b9f432caf66ce4e5de60641dc8c018b54bf0c1] # # patch "tests/automate_inventory_options/expected-no-ignored.stdout" # from [84cbd13b0b318aec4666e1037e206ead17fd4a07] # to [8d87531d633398ec074c79a1196ab3fe3461437c] # # patch "tests/automate_inventory_options/expected-no-unchanged.stdout" # from [a8d26be14f5a35ce9bf0d4e1ae187ccac67798e6] # to [098d4e5d46fd9f072d9fe4b5ce57fa297806b09c] # # patch "tests/automate_inventory_options/expected-no-unknown.stdout" # from [9d05880af03b2376cad55fd548a75c2e794582db] # to [6f89120110a15a4979689a11d984037858245f60] # # patch "tests/automate_inventory_options/expected-none.stdout" # from [5ae35126c2b94ab6d8827179ba22adab576dfc3b] # to [8b56b8744aa7c03ece83e8f947a989b7afa66ed1] # # patch "tests/automate_inventory_options/expected-renames-both.stdout" # from [82d839d12bd564927eb02d1afd5c87b36bfe8d0b] # to [30c148e193838a02d0e041f8befc0c7d6b29c646] # # patch "tests/automate_inventory_options/expected-renames-target-no-ignored.stdout" # from [5f9276b122a989d08eef334367323715c25f9d47] # to [208a14ecc012d3880e47db2af06eef124f83ce1c] # # patch "tests/automate_inventory_options/expected-renames-target-no-unknown.stdout" # from [bc9f2c6714b0ca56740f0b22cc4e8d6f5ed5f0cd] # to [ae4773015e235754db26b51ceab35cf5944e7a5e] # # patch "tests/automate_inventory_options/expected-renames-target.stdout" # from [956807cb660ef81894a614a0384c010c889327d0] # to [fc960c1c87ed1111a6dd8dee9a5e9423aaf28c78] # # patch "tests/automate_inventory_restricted/__driver__.lua" # from [ab30596e5444d0134d518cf7e14f40e99a475ae8] # to [727c314a4b0ed6b29354a650e2f7721f4d753fc0] # # patch "tests/common/test_utils_inventory.lua" # from [d0343ce781bb1284387d194b7a3e50d2b7a52c0d] # to [b35c9485c565f8b9380c4481293d27a52c21a6bf] # ============================================================ --- automate.cc b23eced8b6c237fd768369cf7d32ba6119f19fe4 +++ automate.cc 7a4b18e445c1fe81e9bd61b759db3f0974e61cbc @@ -830,6 +830,7 @@ namespace symbol const old_path("old_path"); symbol const new_path("new_path"); symbol const status("status"); + symbol const birth("birth"); symbol const changes("changes"); } } @@ -960,6 +961,23 @@ inventory_determine_changes(inventory_it } } +static revision_id +inventory_determine_birth(inventory_item const & item, + roster_t const & old_roster, + marking_map const & old_marking) +{ + revision_id rid; + if (old_roster.has_node(item.new_node.id)) + { + node_t node = old_roster.get_node(item.new_node.id); + marking_map::const_iterator m = old_marking.find(node->self); + I(m != old_marking.end()); + marking_t mark = m->second; + rid = mark.birth_revision; + } + return rid; +} + // Name: inventory // Arguments: [PATH]... // Added in: 1.0 @@ -995,6 +1013,7 @@ CMD_AUTOMATE(inventory, N_("[PATH]...") F("this command can only be used in a single-parent workspace")); roster_t new_roster, old_roster = parent_roster(parents.begin()); + marking_map old_marking = parent_marking(parents.begin()); temp_node_id_source nis; work.get_current_roster_shape(db, nis, new_roster); @@ -1052,6 +1071,9 @@ CMD_AUTOMATE(inventory, N_("[PATH]...") vector changes; inventory_determine_changes(item, old_roster, changes); + revision_id birth_revision = + inventory_determine_birth(item, old_roster, old_marking); + bool is_tracked = find(states.begin(), states.end(), "unknown") == states.end() && find(states.begin(), states.end(), "ignored") == states.end(); @@ -1113,6 +1135,9 @@ CMD_AUTOMATE(inventory, N_("[PATH]...") // // finally output the previously recorded states and changes // + if (!birth_revision.inner()().empty()) + st.push_binary_pair(syms::birth, birth_revision.inner()); + I(!states.empty()); st.push_str_multi(syms::status, states); ============================================================ --- tests/automate_inventory/__driver__.lua e12ed1600e4dc846891575fd758971461ff8512f +++ tests/automate_inventory/__driver__.lua 3dfb9ba03b255abf9470e6242d016f98fc4b4429 @@ -20,6 +20,7 @@ commit() addfile("unchanged", "unchanged") addfile("patched", "patched") commit() +rev1 = base_revision() addfile("added", "added") writefile("unknown", "unknown") @@ -46,6 +47,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -74,6 +76,7 @@ new_type = "file", old_type = "file", new_type = "file", fs_type = "none", + birth = rev1, status = "missing"}) index = check_inventory (parsed, index, @@ -89,6 +92,7 @@ new_type = "file", new_type = "file", fs_type = "file", status = "known", + birth = rev1, changes = "content"}) index = check_inventory (parsed, index, @@ -96,6 +100,7 @@ old_path = "original", new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_target", "known"}}) -- skip test.db, test_hooks.lua, tester.log, ts-stderr, ts-stdin, ts-stdout @@ -106,6 +111,7 @@ new_type = "file", old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = "known"}) index = check_inventory (parsed, index, @@ -146,6 +152,7 @@ check_inventory (parsed, index, new_type = "file", old_path = "unchanged", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}, changes = "content"}) @@ -158,6 +165,7 @@ check_inventory (parsed, index, new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}, changes = "content"}) @@ -182,6 +190,7 @@ check_inventory (parsed, index, new_type = "file", old_path = "unchanged", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}}) index = find_basic_io_line (parsed, {name = "path", values = "unchanged"}) @@ -193,6 +202,7 @@ check_inventory (parsed, index, new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}}) ---------- @@ -221,6 +231,7 @@ check_inventory (parsed, find_basic_io_l new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_target", "known"}}) ---------- @@ -249,6 +260,7 @@ old_path = "original", new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}, changes = "content"}) @@ -261,6 +273,7 @@ old_path = "dropped", new_type = "file", old_path = "dropped", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}, changes = "content"}) @@ -273,6 +286,7 @@ old_path = "missing", new_type = "file", old_path = "missing", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}, changes = "content"}) @@ -295,6 +309,7 @@ old_path = "original", new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}}) check_inventory (parsed, find_basic_io_line (parsed, {name = "path", values = "missing"}), @@ -304,6 +319,7 @@ old_path = "dropped", new_type = "file", old_path = "dropped", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}}) check_inventory (parsed, find_basic_io_line (parsed, {name = "path", values = "original"}), @@ -313,6 +329,7 @@ old_path = "missing", new_type = "file", old_path = "missing", fs_type = "file", + birth = rev1, status = {"rename_source", "rename_target", "known"}}) ---------- @@ -374,6 +391,7 @@ old_path = "original", new_type = "file", old_path = "original", fs_type = "none", + birth = rev1, status = {"rename_target", "missing"}}) ---------- @@ -392,6 +410,7 @@ new_type = "file", old_type = "file", new_type = "file", fs_type = "none", + birth = rev1, status = {"missing"}}) check_inventory (parsed, find_basic_io_line (parsed, {name = "path", values = "renamed"}), @@ -424,6 +443,7 @@ old_path = "original", new_type = "file", old_path = "original", fs_type = "file", + birth = rev1, status = {"rename_target", "known"}, changes = "content"}) @@ -453,6 +473,7 @@ commit() mkdir("new_dir") commit() +rev2 = base_revision(); check(mtn("automate", "inventory", "--rcfile=inventory_hooks.lua"), 0, true, false) parsed = parse_basic_io(readfile("stdout")) @@ -461,6 +482,7 @@ new_type = "directory", old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev2, status = {"known"}}) remove("new_dir") @@ -522,6 +544,7 @@ commit() changes = {"content", "attrs"}}) commit() +rev3 = base_revision() check(mtn("automate", "inventory", "--rcfile=inventory_hooks.lua"), 0, true, false) parsed = parse_basic_io(readfile("stdout")) @@ -531,6 +554,7 @@ new_type = "file", old_type = "file", new_type = "file", fs_type = "file", + birth = rev3, status = {"known"}}) check(mtn("attr", "drop", "file-with-attributes", "foo"), 0, false, false) @@ -543,6 +567,7 @@ new_type = "file", old_type = "file", new_type = "file", fs_type = "file", + birth = rev3, status = {"known"}, changes = {"attrs"}}) ============================================================ --- tests/automate_inventory_options/__driver__.lua 8e5f7502832947e0046dd024081501e3954b0f6b +++ tests/automate_inventory_options/__driver__.lua a5b9f432caf66ce4e5de60641dc8c018b54bf0c1 @@ -62,7 +62,7 @@ canonicalize("stdout") -- make sure 'automate stdio' handles at least one of the inventory options as well check(mtn("automate", "stdio"), 0, true, false, "o10:no-ignored0:e l9:inventory6:sourcee") canonicalize("stdout") -check(("0:0:l:889:" .. readfile("expected-no-ignored.stdout")) == readfile("stdout")) +check(("0:0:l:1149:" .. readfile("expected-no-ignored.stdout")) == readfile("stdout")) -- -- now check --no-corresponding-renames ============================================================ --- tests/automate_inventory_options/expected-no-ignored.stdout 84cbd13b0b318aec4666e1037e206ead17fd4a07 +++ tests/automate_inventory_options/expected-no-ignored.stdout 8d87531d633398ec074c79a1196ab3fe3461437c @@ -1,7 +1,8 @@ new_type "directory" path "source" old_type "directory" new_type "directory" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" path "source/added" @@ -19,6 +20,7 @@ new_type "file" old_type "file" new_type "file" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "missing" path "source/rename_source" @@ -31,18 +33,21 @@ old_path "source/rename_source" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "source/source_1" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" path "source/source_2" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-no-unchanged.stdout a8d26be14f5a35ce9bf0d4e1ae187ccac67798e6 +++ tests/automate_inventory_options/expected-no-unchanged.stdout 098d4e5d46fd9f072d9fe4b5ce57fa297806b09c @@ -17,6 +17,7 @@ new_type "file" old_type "file" new_type "file" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "missing" path "source/rename_source" @@ -29,12 +30,14 @@ old_path "source/rename_source" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "source/source_2" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-no-unknown.stdout 9d05880af03b2376cad55fd548a75c2e794582db +++ tests/automate_inventory_options/expected-no-unknown.stdout 6f89120110a15a4979689a11d984037858245f60 @@ -1,7 +1,8 @@ new_type "directory" path "source" old_type "directory" new_type "directory" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" path "source/added" @@ -23,6 +24,7 @@ new_type "file" old_type "file" new_type "file" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "missing" path "source/rename_source" @@ -35,17 +37,20 @@ old_path "source/rename_source" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "source/source_1" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" path "source/source_2" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-none.stdout 5ae35126c2b94ab6d8827179ba22adab576dfc3b +++ tests/automate_inventory_options/expected-none.stdout 8b56b8744aa7c03ece83e8f947a989b7afa66ed1 @@ -1,7 +1,8 @@ new_type "directory" path "source" old_type "directory" new_type "directory" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" path "source/added" @@ -23,6 +24,7 @@ new_type "file" old_type "file" new_type "file" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "missing" path "source/rename_source" @@ -35,18 +37,21 @@ old_path "source/rename_source" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "source/source_1" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" path "source/source_2" old_type "file" new_type "file" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-renames-both.stdout 82d839d12bd564927eb02d1afd5c87b36bfe8d0b +++ tests/automate_inventory_options/expected-renames-both.stdout 30c148e193838a02d0e041f8befc0c7d6b29c646 @@ -37,6 +37,7 @@ old_path "source" new_type "directory" old_path "source" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/added" @@ -53,24 +54,28 @@ old_path "source/missing" new_type "file" old_path "source/missing" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "missing" path "target/rename_target" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_1" new_type "file" old_path "source/source_1" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_2" new_type "file" old_path "source/source_2" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-renames-target-no-ignored.stdout 5f9276b122a989d08eef334367323715c25f9d47 +++ tests/automate_inventory_options/expected-renames-target-no-ignored.stdout 208a14ecc012d3880e47db2af06eef124f83ce1c @@ -1,7 +1,8 @@ old_path "source" path "target" new_type "directory" old_path "source" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/added" @@ -14,24 +15,28 @@ old_path "source/missing" new_type "file" old_path "source/missing" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "missing" path "target/rename_target" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_1" new_type "file" old_path "source/source_1" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_2" new_type "file" old_path "source/source_2" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-renames-target-no-unknown.stdout bc9f2c6714b0ca56740f0b22cc4e8d6f5ed5f0cd +++ tests/automate_inventory_options/expected-renames-target-no-unknown.stdout ae4773015e235754db26b51ceab35cf5944e7a5e @@ -1,7 +1,8 @@ old_path "source" path "target" new_type "directory" old_path "source" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/added" @@ -18,23 +19,27 @@ old_path "source/missing" new_type "file" old_path "source/missing" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "missing" path "target/rename_target" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_1" new_type "file" old_path "source/source_1" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_2" new_type "file" old_path "source/source_2" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" changes "content" ============================================================ --- tests/automate_inventory_options/expected-renames-target.stdout 956807cb660ef81894a614a0384c010c889327d0 +++ tests/automate_inventory_options/expected-renames-target.stdout fc960c1c87ed1111a6dd8dee9a5e9423aaf28c78 @@ -1,7 +1,8 @@ old_path "source" path "target" new_type "directory" old_path "source" fs_type "directory" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/added" @@ -18,24 +19,28 @@ old_path "source/missing" new_type "file" old_path "source/missing" fs_type "none" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "missing" path "target/rename_target" new_type "file" old_path "source/rename_source" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_1" new_type "file" old_path "source/source_1" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" path "target/source_2" new_type "file" old_path "source/source_2" fs_type "file" + birth [cb271687054afd3c2b873c8994f206f08fb240d3] status "rename_target" "known" changes "content" ============================================================ --- tests/automate_inventory_restricted/__driver__.lua ab30596e5444d0134d518cf7e14f40e99a475ae8 +++ tests/automate_inventory_restricted/__driver__.lua 727c314a4b0ed6b29354a650e2f7721f4d753fc0 @@ -26,6 +26,7 @@ commit() addfile("dir_a/file_a", "original: dir_a file_a") addfile("dir_b/file_b", "original: dir_b file_b") commit() +rev1 = base_revision() -- Test that 'automate inventory' shows all directories check(mtn("automate", "inventory"), 0, true, false) @@ -37,6 +38,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -44,6 +46,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -51,6 +54,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -58,6 +62,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -65,6 +70,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -72,6 +78,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) -- skip the test files in root @@ -89,6 +96,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -96,6 +104,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -103,6 +112,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -110,6 +120,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) -- skip tester-generated files @@ -130,6 +141,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -137,6 +149,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) -- prove that we checked all the output @@ -155,6 +168,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -176,6 +190,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -183,6 +198,7 @@ index = check_inventory (parsed, index, new_type = "file", old_path = "dir_a/file_a", fs_type = "none", + birth = rev1, status = {"rename_target", "missing"}}) -- "missing" because of --bookkeep-only @@ -191,6 +207,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) checkexp ("checked all", #parsed, index-1) @@ -208,6 +225,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -228,6 +246,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -235,6 +254,7 @@ index = check_inventory (parsed, index, new_type = "file", old_path = "dir_a/file_a", fs_type = "file", + birth = rev1, status = {"rename_target", "known"}}) index = check_inventory (parsed, index, @@ -242,6 +262,7 @@ index = check_inventory (parsed, index, old_type = "file", new_type = "file", fs_type = "file", + birth = rev1, status = {"known"}}) checkexp ("checked all", #parsed, index-1) @@ -261,6 +282,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -268,6 +290,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -275,6 +298,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -305,6 +329,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -312,6 +337,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -319,6 +345,7 @@ index = check_inventory (parsed, index, old_type = "directory", new_type = "directory", fs_type = "directory", + birth = rev1, status = {"known"}}) index = check_inventory (parsed, index, @@ -376,6 +403,7 @@ index = check_inventory (parsed, index, new_type = "directory", old_path = "dir_a", fs_type = "directory", + birth = rev1, status = {"rename_target", "known" }}) index = check_inventory (parsed, index, @@ -383,6 +411,7 @@ index = check_inventory (parsed, index, new_type = "file", old_path = "dir_a/file_a", fs_type = "file", + birth = rev1, status = {"rename_target", "known" }}) checkexp ("checked all", #parsed, index-1) @@ -424,6 +453,7 @@ index = check_inventory (parsed, index, new_type = "directory", old_path = "dir_a", fs_type = "directory", + birth = rev1, status = {"rename_target", "known" }}) checkexp ("checked all", #parsed, index-1) ============================================================ --- tests/common/test_utils_inventory.lua d0343ce781bb1284387d194b7a3e50d2b7a52c0d +++ tests/common/test_utils_inventory.lua b35c9485c565f8b9380c4481293d27a52c21a6bf @@ -89,6 +89,11 @@ function check_inventory (parsed, parsed parsed_index = parsed_index + 1 end + if stanza.birth then + check_basic_io_line (parsed_index, parsed[parsed_index], "birth", stanza.birth, xfail) + parsed_index = parsed_index + 1 + end + if stanza.status then check_basic_io_line (parsed_index, parsed[parsed_index], "status", stanza.status, xfail) parsed_index = parsed_index + 1