# # # patch "automate.cc" # from [493497597f006663f1d9e2348327a19e4774b54e] # to [047ae5ab7138ac06ededf854e74597c9b72b0954] # # patch "tests/automate_inventory_options/__driver__.lua" # from [e96e3d50ab1309fe882b71cc9be6c8bf5c61401d] # to [8e5f7502832947e0046dd024081501e3954b0f6b] # # patch "tests/automate_inventory_options/expected-no-ignored.stdout" # from [519651efd5079bae0e0643a2e10047e8d1094558] # to [84cbd13b0b318aec4666e1037e206ead17fd4a07] # # patch "tests/automate_inventory_options/expected-no-unchanged.stdout" # from [040cf70ac3fd8fd6a09810501ed95c99e7bb0326] # to [a8d26be14f5a35ce9bf0d4e1ae187ccac67798e6] # # patch "tests/automate_inventory_options/expected-no-unknown.stdout" # from [b76cb34843c7a555d212e23db24ee4a7d65b823f] # to [9d05880af03b2376cad55fd548a75c2e794582db] # # patch "tests/automate_inventory_options/expected-none.stdout" # from [040fb4b496e6bc1231ba5708e8cc4aa2dc1e0d63] # to [5ae35126c2b94ab6d8827179ba22adab576dfc3b] # # patch "tests/automate_inventory_options/expected-renames-both.stdout" # from [8f5826d8f74a3d30edad7a328d981151126c03ed] # to [82d839d12bd564927eb02d1afd5c87b36bfe8d0b] # # patch "tests/automate_inventory_options/expected-renames-source.stdout" # from [1125eb8cb01b4cb6d1c2faf20bafe8e2925ab408] # to [98075ff38b8a5622ea05d4969880fa2be741bbf3] # # patch "tests/automate_inventory_options/expected-renames-target-no-ignored.stdout" # from [7671a11ecac054da502e2886eab83621203acf1a] # to [5f9276b122a989d08eef334367323715c25f9d47] # # patch "tests/automate_inventory_options/expected-renames-target-no-unknown.stdout" # from [562260d809512a1f348b5a5a03645a8990223683] # to [bc9f2c6714b0ca56740f0b22cc4e8d6f5ed5f0cd] # # patch "tests/automate_inventory_options/expected-renames-target.stdout" # from [25a3a6605b33132d800814fde2362b768b638429] # to [956807cb660ef81894a614a0384c010c889327d0] # ============================================================ --- automate.cc 493497597f006663f1d9e2348327a19e4774b54e +++ automate.cc 047ae5ab7138ac06ededf854e74597c9b72b0954 @@ -1028,6 +1028,7 @@ CMD_AUTOMATE(inventory, N_("[PATH]...") find(states.begin(), states.end(), "rename_target") != states.end() || find(states.begin(), states.end(), "added") != states.end() || find(states.begin(), states.end(), "dropped") != states.end() || + find(states.begin(), states.end(), "missing") != states.end() || !changes.empty(); if (is_tracked && !has_changed && app.opts.no_unchanged) ============================================================ --- tests/automate_inventory_options/__driver__.lua e96e3d50ab1309fe882b71cc9be6c8bf5c61401d +++ tests/automate_inventory_options/__driver__.lua 8e5f7502832947e0046dd024081501e3954b0f6b @@ -1,5 +1,7 @@ -- Test 'automate inventory' options --no-ignored, --no-unchanged, --no-unknown -- and --no-corresponding-renames +-- +-- We don't test with --bookkeep-only, because we haven't gotten to it yet. mtn_setup() @@ -21,11 +23,19 @@ addfile("source/source_2", "source_2") mkdir("source") addfile("source/source_1", "source_1") addfile("source/source_2", "source_2") +addfile("source/rename_source", "rename") +addfile("source/missing", "missing") +addfile("source/dropped", "dropped") commit() +check(mtn("mv", "source/rename_source", "source/rename_target"), 0, true, false) +check(mtn("drop", "source/dropped"), 0, true, false) +remove("source/missing") + writefile("source/ignored_1", "ignored_1") writefile("source/unknown_1", "unknown_1") writefile("source/source_2", "source_2 changed") +addfile("source/added", "added") -- -- First with no options @@ -52,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:364:" .. readfile("expected-no-ignored.stdout")) == readfile("stdout")) +check(("0:0:l:889:" .. readfile("expected-no-ignored.stdout")) == readfile("stdout")) -- -- now check --no-corresponding-renames ============================================================ --- tests/automate_inventory_options/expected-no-ignored.stdout 519651efd5079bae0e0643a2e10047e8d1094558 +++ tests/automate_inventory_options/expected-no-ignored.stdout 84cbd13b0b318aec4666e1037e206ead17fd4a07 @@ -1,9 +1,38 @@ new_type "directory" path "source" old_type "directory" new_type "directory" fs_type "directory" status "known" + path "source/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + + path "source/dropped" +old_type "file" + fs_type "none" + status "dropped" + + path "source/missing" +old_type "file" +new_type "file" + fs_type "none" + status "missing" + + path "source/rename_source" +old_type "file" +new_path "source/rename_target" + fs_type "none" + status "rename_source" + + path "source/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "source/source_1" old_type "file" new_type "file" ============================================================ --- tests/automate_inventory_options/expected-no-unchanged.stdout 040cf70ac3fd8fd6a09810501ed95c99e7bb0326 +++ tests/automate_inventory_options/expected-no-unchanged.stdout a8d26be14f5a35ce9bf0d4e1ae187ccac67798e6 @@ -1,7 +1,36 @@ + path "source/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + + path "source/dropped" +old_type "file" + fs_type "none" + status "dropped" + path "source/ignored_1" fs_type "file" status "ignored" + path "source/missing" +old_type "file" +new_type "file" + fs_type "none" + status "missing" + + path "source/rename_source" +old_type "file" +new_path "source/rename_target" + fs_type "none" + status "rename_source" + + path "source/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "source/source_2" old_type "file" new_type "file" ============================================================ --- tests/automate_inventory_options/expected-no-unknown.stdout b76cb34843c7a555d212e23db24ee4a7d65b823f +++ tests/automate_inventory_options/expected-no-unknown.stdout 9d05880af03b2376cad55fd548a75c2e794582db @@ -1,13 +1,42 @@ new_type "directory" path "source" old_type "directory" new_type "directory" fs_type "directory" status "known" + path "source/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + + path "source/dropped" +old_type "file" + fs_type "none" + status "dropped" + path "source/ignored_1" fs_type "file" status "ignored" + path "source/missing" +old_type "file" +new_type "file" + fs_type "none" + status "missing" + + path "source/rename_source" +old_type "file" +new_path "source/rename_target" + fs_type "none" + status "rename_source" + + path "source/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "source/source_1" old_type "file" new_type "file" ============================================================ --- tests/automate_inventory_options/expected-none.stdout 040fb4b496e6bc1231ba5708e8cc4aa2dc1e0d63 +++ tests/automate_inventory_options/expected-none.stdout 5ae35126c2b94ab6d8827179ba22adab576dfc3b @@ -1,13 +1,42 @@ new_type "directory" path "source" old_type "directory" new_type "directory" fs_type "directory" status "known" + path "source/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + + path "source/dropped" +old_type "file" + fs_type "none" + status "dropped" + path "source/ignored_1" fs_type "file" status "ignored" + path "source/missing" +old_type "file" +new_type "file" + fs_type "none" + status "missing" + + path "source/rename_source" +old_type "file" +new_path "source/rename_target" + fs_type "none" + status "rename_source" + + path "source/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "source/source_1" old_type "file" new_type "file" ============================================================ --- tests/automate_inventory_options/expected-renames-both.stdout 8f5826d8f74a3d30edad7a328d981151126c03ed +++ tests/automate_inventory_options/expected-renames-both.stdout 82d839d12bd564927eb02d1afd5c87b36bfe8d0b @@ -1,9 +1,26 @@ new_path "target" path "source" old_type "directory" new_path "target" fs_type "none" status "rename_source" + path "source/dropped" +old_type "file" + fs_type "none" + status "dropped" + + path "source/missing" +old_type "file" +new_path "target/missing" + fs_type "none" + status "rename_source" + + path "source/rename_source" +old_type "file" +new_path "target/rename_target" + fs_type "none" + status "rename_source" + path "source/source_1" old_type "file" new_path "target/source_1" @@ -22,10 +39,28 @@ old_path "source" fs_type "directory" status "rename_target" "known" + path "target/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + path "target/ignored_1" fs_type "file" status "ignored" + path "target/missing" +new_type "file" +old_path "source/missing" + fs_type "none" + status "rename_target" "missing" + + path "target/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "target/source_1" new_type "file" old_path "source/source_1" ============================================================ --- tests/automate_inventory_options/expected-renames-source.stdout 1125eb8cb01b4cb6d1c2faf20bafe8e2925ab408 +++ tests/automate_inventory_options/expected-renames-source.stdout 98075ff38b8a5622ea05d4969880fa2be741bbf3 @@ -1,9 +1,26 @@ new_path "target" path "source" old_type "directory" new_path "target" fs_type "none" status "rename_source" + path "source/dropped" +old_type "file" + fs_type "none" + status "dropped" + + path "source/missing" +old_type "file" +new_path "target/missing" + fs_type "none" + status "rename_source" + + path "source/rename_source" +old_type "file" +new_path "target/rename_target" + fs_type "none" + status "rename_source" + path "source/source_1" old_type "file" new_path "target/source_1" ============================================================ --- tests/automate_inventory_options/expected-renames-target-no-ignored.stdout 7671a11ecac054da502e2886eab83621203acf1a +++ tests/automate_inventory_options/expected-renames-target-no-ignored.stdout 5f9276b122a989d08eef334367323715c25f9d47 @@ -1,9 +1,27 @@ old_path "source" path "target" new_type "directory" old_path "source" fs_type "directory" status "rename_target" "known" + path "target/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + + path "target/missing" +new_type "file" +old_path "source/missing" + fs_type "none" + status "rename_target" "missing" + + path "target/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "target/source_1" new_type "file" old_path "source/source_1" ============================================================ --- tests/automate_inventory_options/expected-renames-target-no-unknown.stdout 562260d809512a1f348b5a5a03645a8990223683 +++ tests/automate_inventory_options/expected-renames-target-no-unknown.stdout bc9f2c6714b0ca56740f0b22cc4e8d6f5ed5f0cd @@ -1,13 +1,31 @@ old_path "source" path "target" new_type "directory" old_path "source" fs_type "directory" status "rename_target" "known" + path "target/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + path "target/ignored_1" fs_type "file" status "ignored" + path "target/missing" +new_type "file" +old_path "source/missing" + fs_type "none" + status "rename_target" "missing" + + path "target/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "target/source_1" new_type "file" old_path "source/source_1" ============================================================ --- tests/automate_inventory_options/expected-renames-target.stdout 25a3a6605b33132d800814fde2362b768b638429 +++ tests/automate_inventory_options/expected-renames-target.stdout 956807cb660ef81894a614a0384c010c889327d0 @@ -1,13 +1,31 @@ old_path "source" path "target" new_type "directory" old_path "source" fs_type "directory" status "rename_target" "known" + path "target/added" +new_type "file" + fs_type "file" + status "added" "known" + changes "content" + path "target/ignored_1" fs_type "file" status "ignored" + path "target/missing" +new_type "file" +old_path "source/missing" + fs_type "none" + status "rename_target" "missing" + + path "target/rename_target" +new_type "file" +old_path "source/rename_source" + fs_type "file" + status "rename_target" "known" + path "target/source_1" new_type "file" old_path "source/source_1"