# # # patch "cmd_ws_commit.cc" # from [69206ddbec4e425ad95baa7043afe36df9104be3] # to [64f8bb9ce0646d2883aec8bf276e5182c197afc2] # # patch "roster.cc" # from [16c15616f8fb41e5809287495bb4f4df2012ef99] # to [3e46ae0e6698e47779091ef0b39f66cd31b1f2e2] # ============================================================ --- cmd_ws_commit.cc 69206ddbec4e425ad95baa7043afe36df9104be3 +++ cmd_ws_commit.cc 64f8bb9ce0646d2883aec8bf276e5182c197afc2 @@ -616,7 +616,7 @@ CMD(attr, N_("workspace"), N_("set PATH CMD(attr, N_("workspace"), N_("set PATH ATTR VALUE\nget PATH [ATTR]\ndrop PATH [ATTR]\nscan [PATH...]"), N_("set, get or drop file attributes\nor scan filesystem to determine monotone attributes for files in PATH(s)."), - option::opts::execute) + options::opts::execute) { if (args.size() < 1) throw usage(name); @@ -642,8 +642,8 @@ CMD(attr, N_("workspace"), N_("set PATH { vector pathargs(args.begin() + 1, args.end()); node_restriction mask(args_to_paths(pathargs), - args_to_paths(app.exclude_patterns), - app.depth, + args_to_paths(app.opts.exclude_patterns), + app.opts.depth, old_roster, new_roster, app.lua); app.work.perform_attr_scan(new_roster, mask); } @@ -657,7 +657,7 @@ CMD(attr, N_("workspace"), N_("set PATH node->attrs[a_key] = make_pair(true, a_value); - if (app.execute) + if (app.opts.execute) app.lua.hook_apply_attribute(a_key(), path, a_value(), false); } else if (subcmd == "drop") @@ -669,7 +669,7 @@ CMD(attr, N_("workspace"), N_("set PATH i != node->attrs.end(); ++i) { i->second = make_pair(false, ""); - if (app.execute) + if (app.opts.execute) app.lua.hook_apply_attribute(i->first(), path, string(""), true); } } @@ -682,7 +682,7 @@ CMD(attr, N_("workspace"), N_("set PATH node->attrs[a_key] = make_pair(false, ""); - if (app.execute) + if (app.opts.execute) app.lua.hook_apply_attribute(a_key(), path, string(""), true); } else ============================================================ --- roster.cc 16c15616f8fb41e5809287495bb4f4df2012ef99 +++ roster.cc 3e46ae0e6698e47779091ef0b39f66cd31b1f2e2 @@ -821,6 +821,7 @@ roster_t::set_attr(split_path const & pt if (i == n->attrs.end()) i = safe_insert(n->attrs, make_pair(name, make_pair(false, attr_value()))); + I(i->second != val); i->second = val; }