#
#
# patch "ChangeLog"
# from [cb4b6a0a1d87c65d9ed3518cd9b9fc096ebbee4c]
# to [ffaca9cc8b4ad39ccff397114de6176d408b8ae5]
#
# patch "NEWS"
# from [8d2354635c0468efea24cd26e5f934ef290557dc]
# to [a6459824697b83d3b11c1eb99e9b6f012284c2f5]
#
# patch "cmd_diff_log.cc"
# from [6e88a90a051633ad7d436799eb8a591573707622]
# to [5db45374e646424aab11a5e822d204ad92eb3bca]
#
# patch "monotone.texi"
# from [9631280e5ce9427b090430fbe1f6d00477bbf042]
# to [0246c4a5e9d216ebc2b5b8d30ad411f8fdd44345]
#
# patch "options_list.hh"
# from [35f36f423168154a9345e5ffeb35f38bbe09c300]
# to [689f39d3907893c43fc51ee90f4bfd523061277b]
#
# patch "tests/_--author,_--date/__driver__.lua"
# from [685f83bbed927d9943df44647b3ed051b90aa213]
# to [95cd21e42609ff40fb121e7e3ca1fa37bfe1aa22]
#
# patch "tests/log_and_selectors_returning_multiple_rids/__driver__.lua"
# from [8a725c9ac622ec550d86cfe1e4fbd6f5d7f167e2]
# to [ecdd5f0daf85648b2f9a2eefc5ac537a62676124]
#
# patch "tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua"
# from [a373fb9a5fa27a2ca5b65a30595978e4ac2c86ae]
# to [435a5c8c6dc10d39d0aa3e655640ac4048143dc8]
#
============================================================
--- ChangeLog cb4b6a0a1d87c65d9ed3518cd9b9fc096ebbee4c
+++ ChangeLog ffaca9cc8b4ad39ccff397114de6176d408b8ae5
@@ -1,5 +1,13 @@ 2006-12-21 Thomas Keller
+ * cmd_diff_log.cc: renamed --revision option to --to
+ * option_list.hh: new block for --to
+ * monotone.texi: ...documented here
+ * NEWS: ...noted here
+ * tests/*: ..honored appropriately
+
+2006-12-21 Thomas Keller
+
* NEWS: refined some sections and added notes about
fixes in automate inventory and the localization code
============================================================
--- NEWS 8d2354635c0468efea24cd26e5f934ef290557dc
+++ NEWS a6459824697b83d3b11c1eb99e9b6f012284c2f5
@@ -7,6 +7,10 @@ xxx Dec xx xx:xx:xx UTC 2006
- "mtn serve" no longer takes patterns on the command line.
Use the permissions hooks instead.
+ - the name of the option that denoted the revision from which
+ "mtn log" should start logging was renamed from "--revision"
+ to "--from"
+
- author selectors no longer have implicit wildcarding
- if you manually add entries to MTN/log while you are
============================================================
--- cmd_diff_log.cc 6e88a90a051633ad7d436799eb8a591573707622
+++ cmd_diff_log.cc 5db45374e646424aab11a5e822d204ad92eb3bca
@@ -603,12 +603,13 @@ CMD(log, N_("informative"), N_("[FILE] .
CMD(log, N_("informative"), N_("[FILE] ..."),
N_("print history in reverse order (filtering by 'FILE'). If one or more\n"
"revisions are given, use them as a starting point."),
- options::opts::last | options::opts::next | options::opts::revision
- | options::opts::brief | options::opts::diffs | options::opts::no_merges
- | options::opts::no_files | options::opts::to)
+ options::opts::last | options::opts::next
+ | options::opts::from | options::opts::to
+ | options::opts::brief | options::opts::diffs
+ | options::opts::no_merges | options::opts::no_files)
{
- if (app.opts.revision_selectors.size() == 0)
- app.require_workspace("try passing a --revision to start at");
+ if (app.opts.from.size() == 0)
+ app.require_workspace("try passing a --from revision to start at");
long last = app.opts.last;
long next = app.opts.next;
@@ -618,8 +619,8 @@ CMD(log, N_("informative"), N_("[FILE] .
frontier_t frontier(rev_cmp(!(next>0)));
revision_id first_rid; // for mapping paths to node ids when restricted
-
- if (app.opts.revision_selectors.size() == 0)
+
+ if (app.opts.from.size() == 0)
{
app.work.get_revision_id(first_rid);
rev_height height;
@@ -628,8 +629,8 @@ CMD(log, N_("informative"), N_("[FILE] .
}
else
{
- for (vector::const_iterator i = app.opts.revision_selectors.begin();
- i != app.opts.revision_selectors.end(); i++)
+ for (vector::const_iterator i = app.opts.from.begin();
+ i != app.opts.from.end(); i++)
{
set rids;
complete(app, (*i)(), rids);
@@ -640,7 +641,7 @@ CMD(log, N_("informative"), N_("[FILE] .
app.db.get_rev_height(*j, height);
frontier.push(make_pair(height, *j));
}
- if (i == app.opts.revision_selectors.begin())
+ if (i == app.opts.from.begin())
first_rid = *rids.begin();
}
}
@@ -652,7 +653,7 @@ CMD(log, N_("informative"), N_("[FILE] .
// User wants to trace only specific files
roster_t old_roster, new_roster;
- if (app.opts.revision_selectors.size() == 0)
+ if (app.opts.from.size() == 0)
{
temp_node_id_source nis;
app.work.get_base_and_current_roster_shape(old_roster,
@@ -737,7 +738,6 @@ CMD(log, N_("informative"), N_("[FILE] .
set seen;
revision_t rev;
-
while(! frontier.empty() && (last == -1 || last > 0)
&& (next == -1 || next > 0))
{
============================================================
--- monotone.texi 9631280e5ce9427b090430fbe1f6d00477bbf042
+++ monotone.texi 0246c4a5e9d216ebc2b5b8d30ad411f8fdd44345
@@ -3917,7 +3917,7 @@ @heading Viewing History
@end multitable
Unlike CVS log, monotone log can also be used without a workspace; but
-in this case you must pass a @option{--revision} argument to tell
+in this case you must pass a @option{--from} revision argument to tell
monotone where to start displaying the log from.
@heading Importing a New Project
@@ -4607,7 +4607,7 @@ @section Informative
changed within the current subdirectory of the workspace.
@item mtn log
address@hidden mtn log address@hidden address@hidden address@hidden [...]] address@hidden [...]] [--brief] [--no-merges] [--no-files] [--diffs] address@hidden [...]]
address@hidden mtn log address@hidden address@hidden address@hidden [...]] address@hidden [...]] [--brief] [--no-merges] [--no-files] [--diffs] address@hidden [...]]
This command prints out a log, in reverse-ancestry order, of small
history summaries. Each summary contains author, date, changelog and
@@ -4625,7 +4625,11 @@ @section Informative
revision in forward-ancestry order. This is useful to review changes
that will be applied to the workspace when @command{update} is run.
-if @address@hidden is given, log will only print entries for revisions
+If @address@hidden is given, the command starts tracing back through
+history from these revisions, otherwise it starts from the base revision of
+your workspace.
+
+If @address@hidden is given, log will only print entries for revisions
that would not also be printed when logging from the revisions specified in
@option{--to}. This is useful for reviewing changes between two points
in history.
@@ -4640,10 +4644,6 @@ @section Informative
Specifying @option{--diffs} causes the log output to include a unified
diff of the changes in each revision.
-If one or more revision IDs are given, the command starts tracing back
-through history from these revisions, otherwise it starts from the
-base revision of your workspace.
-
If one or more files are given, the command will only log the revisions
where those files are changed.
============================================================
--- options_list.hh 35f36f423168154a9345e5ffeb35f38bbe09c300
+++ options_list.hh 689f39d3907893c43fc51ee90f4bfd523061277b
@@ -486,6 +486,13 @@ GOPT(ticker, "ticker", std::string, ,
}
#endif
+OPT(from, "from", std::vector, , gettext_noop("revision(s) to start logging at"))
+#ifdef option_bodies
+{
+ from.push_back(utf8(arg));
+}
+#endif
+
OPT(to, "to", std::vector, , gettext_noop("revision(s) to stop logging at"))
#ifdef option_bodies
{
============================================================
--- tests/_--author,_--date/__driver__.lua 685f83bbed927d9943df44647b3ed051b90aa213
+++ tests/_--author,_--date/__driver__.lua 95cd21e42609ff40fb121e7e3ca1fa37bfe1aa22
@@ -1,10 +1,10 @@ rev = base_revision()
mtn_setup()
addfile("testfile", "floooooo")
check(mtn("commit", "--author=the_author", "--date=1999-12-31T12:00:00", "--branch=foo", "--message=foo"), 0, false, false)
rev = base_revision()
-check(mtn("log", "--revision", rev), 0, true, false)
+check(mtn("log", "--from", rev), 0, true, false)
check(qgrep('^Author: the_author', "stdout"))
check(qgrep('^Date: 1999-12-31T12:00:00', "stdout"))
============================================================
--- tests/log_and_selectors_returning_multiple_rids/__driver__.lua 8a725c9ac622ec550d86cfe1e4fbd6f5d7f167e2
+++ tests/log_and_selectors_returning_multiple_rids/__driver__.lua ecdd5f0daf85648b2f9a2eefc5ac537a62676124
@@ -16,7 +16,7 @@ check(raw_mtn("--db", test.root.."/test.
R2=base_revision()
check(raw_mtn("--db", test.root.."/test.db", "--root", test.root,
- "log", "--brief", "--revision", "d:2005-08-16"), 0, true, false)
+ "log", "--brief", "--from", "d:2005-08-16"), 0, true, false)
check(qgrep(R0, "stdout"))
check(qgrep(R1, "stdout"))
check(qgrep(R2, "stdout"))
============================================================
--- tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua a373fb9a5fa27a2ca5b65a30595978e4ac2c86ae
+++ tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua 435a5c8c6dc10d39d0aa3e655640ac4048143dc8
@@ -9,4 +9,4 @@ remove("_MTN")
rev = base_revision()
remove("_MTN")
+check(mtn("log", "--from", rev, "foo1"), 0, false, false)
-check(mtn("log", "--revision", rev, "foo1"), 0, false, false)