# # patch "ChangeLog" # from [2bad97578e3bf8ba92213fb7c2164d24e5d092c2] # to [bd1869a7aafeaaf0706d9161a8e8d833eaae0fe1] # # patch "commands.cc" # from [82065a698ea04492cefc84b2935774b9fc3b92a8] # to [134455c058e2ce0e5164b468922704efc7715213] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,9 @@ +2005-05-12 Grahame Bowland + + * commands.cc: Modify the "log" command to accept multiple + revisions on command line, and display the log for all + of those revisions. + 2005-05-11 Nathaniel Smith * std_hooks.lua (ignore_file): Organize a bit more, add --- commands.cc +++ commands.cc @@ -3434,31 +3434,39 @@ do_annotate(app, file, fid, rid); } -CMD(log, "informative", "[file]", - "print history in reverse order (filtering by 'file'). If a revision is\n" - "given, use it as a starting point.", +CMD(log, "informative", "[file] [--revision=REVISION [--revision=REVISION [...]]]", + "print history in reverse order (filtering by 'file'). If one or more revisions\n" + "are given, use them as a starting point.", OPT_DEPTH % OPT_REVISION) { - revision_id rid; file_path file; if (app.revision_selectors.size() == 0) app.require_working_copy(); - if (args.size() > 1 || app.revision_selectors.size() > 1) + if (args.size() > 1) throw usage(name); if (args.size() > 0) file=file_path(idx(args, 0)()); /* specified a file */ + set< pair > frontier; + if (app.revision_selectors.size() == 0) - get_revision_id(rid); + { + revision_id rid; + frontier.insert(make_pair(file, rid)); + } else - complete(app, idx(app.revision_selectors, 0)(), rid); + { + for (std::vector::const_iterator i = app.revision_selectors.begin(); + i != app.revision_selectors.end(); i++) { + revision_id rid; + complete(app, (*i)(), rid); + frontier.insert(make_pair(file, rid)); + } + } - set< pair > frontier; - frontier.insert(make_pair(file, rid)); - cert_name author_name(author_cert_name); cert_name date_name(date_cert_name); cert_name branch_name(branch_cert_name); @@ -3476,6 +3484,7 @@ for (set< pair >::const_iterator i = frontier.begin(); i != frontier.end(); ++i) { + revision_id rid; file = i->first; rid = i->second;