# # # patch "cmd_list.cc" # from [001d3407a8d30b05a29f7e6bf63138696022fac9] # to [1003103a7784a9150135b61cdf6e84337e4842f5] # # patch "monotone.texi" # from [671f22bb0656bb4eb0c3ce345218fead1c673941] # to [320f240769885e3c80f0c3574fafbdf31b8a9463] # # patch "tests/importing_cvs_tricky_repo_with_tags/test.tags" # from [b8838f53fc6b7e0aee11074fa2e466e3615aa148] # to [0e376f92987174e84d147334850c1573219d6e89] # ============================================================ --- cmd_list.cc 001d3407a8d30b05a29f7e6bf63138696022fac9 +++ cmd_list.cc 1003103a7784a9150135b61cdf6e84337e4842f5 @@ -531,14 +531,22 @@ CMD(epochs, "epochs", "", CMD_REF(list), } } -CMD(tags, "tags", "", CMD_REF(list), "", +CMD(tags, "tags", "", CMD_REF(list), "[PATTERN]", N_("Lists all tags in the database"), "", - options::opts::none) + options::opts::exclude) { + globish inc("*", origin::internal); + if (args.size() == 1) + inc = globish(idx(args,0)(), origin::user); + else if (args.size() > 1) + throw usage(execid); + database db(app); set tags; project_t project(db); + cert_name branch = branch_cert_name; + project.get_tags(tags); for (set::const_iterator i = tags.begin(); i != tags.end(); ++i) @@ -546,9 +554,27 @@ CMD(tags, "tags", "", CMD_REF(list), "", key_identity_info identity; identity.id = i->key; project.complete_key_identity(app.lua, identity); - cout << i->name << ' ' - << i->ident << ' ' - << format_key(identity) << '\n'; + + vector certs; + project.get_revision_certs(i->ident, certs); + + globish exc(app.opts.exclude_patterns); + + if (inc.matches(i->name()) && !exc.matches(i->name())) + { + cout << i->name << ' ' << i->ident << ' '; + + for (vector::const_iterator c = certs.begin(); + c != certs.end(); ++c) + { + if (c->name == branch) + { + cout << c->value << ' '; + } + } + + cout << format_key(identity) << '\n'; + } } } ============================================================ --- monotone.texi 671f22bb0656bb4eb0c3ce345218fead1c673941 +++ monotone.texi 320f240769885e3c80f0c3574fafbdf31b8a9463 @@ -5841,15 +5841,22 @@ @section Informative If @var{pattern} is provided, it is used as a glob to limit the keys listed. Otherwise all keys in your database are listed. address@hidden mtn list branches address@hidden mtn ls branches address@hidden mtn list branches address@hidden address@hidden address@hidden mtn ls branches address@hidden address@hidden -This command lists all known branches in your database. +This command lists all known branches in your database. If address@hidden is provided, it is used as a glob to select the branches +listed, otherwise all branches are listed. If @option{-exclude} +options are provided they are used as globs to exclude specified +branches. address@hidden mtn list tags address@hidden mtn ls tags address@hidden mtn list tags address@hidden address@hidden address@hidden mtn ls tags address@hidden address@hidden -This command lists all known tags in your database. +This command lists all known tags in your database. If @var{pattern} +is provided, it is used as a glob to select the tags listed, otherwise +all tags are listed. If @option{-exclude} options are provided they +are used as globs to exclude specified tags. @item mtn list vars @item mtn ls vars ============================================================ --- tests/importing_cvs_tricky_repo_with_tags/test.tags b8838f53fc6b7e0aee11074fa2e466e3615aa148 +++ tests/importing_cvs_tricky_repo_with_tags/test.tags 0e376f92987174e84d147334850c1573219d6e89 @@ -1,3 +1,3 @@ -initial 7be6a094cb29307bed5bbacf40b3f3642222f413 address@hidden (46ec58576f...) -portable-branch-base 32ba3f451dcf277762ca1c328043df2e2ceebc17 address@hidden (46ec58576f...) -portable-branch-fork-20050601T0139 32ba3f451dcf277762ca1c328043df2e2ceebc17 address@hidden (46ec58576f...) +initial 7be6a094cb29307bed5bbacf40b3f3642222f413 foo.bar.redhat address@hidden (46ec58576f...) +portable-branch-base 32ba3f451dcf277762ca1c328043df2e2ceebc17 foo.bar address@hidden (46ec58576f...) +portable-branch-fork-20050601T0139 32ba3f451dcf277762ca1c328043df2e2ceebc17 foo.bar address@hidden (46ec58576f...)