# # patch "app_state.cc" # from [392734be5cdd5ba62dd214b28aa434e67b678171] # to [07daa7280d90fa32feb7769eed2a97fd4b10a940] # # patch "commands.cc" # from [711e8e878e0b90261086a5a2118f9bc221c692a1] # to [0fa1311866b0e30bee3d3b21ea3976f2d936ea7d] # --- app_state.cc +++ app_state.cc @@ -195,12 +195,13 @@ // careful about what goes in to the restricted path set we just // check for this special case here. - if (restrictions.find(dot) != restrictions.end()) + if ((-1 == depth) && restrictions.find(dot) != restrictions.end()) { return true; } fs::path test = mkpath(path()); + long branch_depth = 0; while (!test.empty()) { @@ -220,9 +221,17 @@ L(F("path '%s' not found in restricted path set; '%s' excluded\n") % test.string() % path()); } + + if (depth==branch_depth) return false; test = test.branch_path(); + ++branch_depth; } - + + if ((-1 != depth) && (restrictions.find(dot) != restrictions.end())) + { + return (branch_depth <= depth); + } + return false; } --- commands.cc +++ commands.cc @@ -1705,7 +1705,7 @@ "missing", "show database objects, or the current working copy manifest,\n" "or unknown, intentionally ignored, or missing state files", - OPT_NONE) + OPT_DEPTH) { if (args.size() == 0) throw usage(name);