[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: 57a51f3171a947c89fd7def59d
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: 57a51f3171a947c89fd7def59d8c8affcdc7fe55 |
Date: |
Fri, 18 Feb 2011 20:54:15 +0100 (CET) |
revision: 57a51f3171a947c89fd7def59d8c8affcdc7fe55
date: 2011-02-08T03:00:15
author: address@hidden
branch: net.venge.monotone
changelog:
explicit merge of '04a73419093a975b742bd0664da0079b7001436f'
and '540b596407d150d5048a620ea7bbc853c134ea35'
manifest:
format_version "1"
new_manifest [8f3af6ef11070efb8cab11cde285d409c612fb36]
old_revision [04a73419093a975b742bd0664da0079b7001436f]
old_revision [540b596407d150d5048a620ea7bbc853c134ea35]
rename "contrib/dump-test-logs.sh"
to "extra/building/dump-test-logs.sh.in"
add_dir "extra/building"
add_dir "test/extra/dump-test-logs"
add_file "test/extra/bash_completion/bashrc"
content [50253c70d06f889a476b8333d5013c5512a1ef57]
add_file "test/extra/bash_completion/inputrc"
content [c8c7098b3ff90813e2877a5cef51dedd73c9c0f8]
add_file "test/extra/dump-test-logs/__driver__.lua"
content [91b6fe4e179e21879203d4891156c92c64f1f80d]
patch "INSTALL_windows_native.txt"
from [58778b6df48ac69f8fda2662e2ed2735b19d360a]
to [720fd6b6c8f3696e572a3f2f5466b9518d1aadcf]
patch "Makefile.am"
from [8f16b42b2e1f5193869adc53ea62c67dcfd5a8a6]
to [3b41341b6a9e7ddf4e362b16f62032cb24b72ea1]
patch "NEWS"
from [816c8281092cdc5fa5d9d0b7c345da5b53ce33da]
to [a68115463e161bf4991b5ab5e2f81f807ac546c7]
patch "doc/Makefile.am"
from [41b465f606184dd67d15f97a89b99207568bf110]
to [f9183332ce62e37d94cf978b6eb455b896c07c89]
patch "extra/building/dump-test-logs.sh.in"
from [4704860e558cd008279f58ba7ccd11b2a0789895]
to [a11744bbc3dfe9acf2678b5d3e846ced85629f44]
patch "src/cmd.cc"
from [a83ee4728d826c6d482f14f9515e3338a5f53caf]
to [738af533e09611f04b922b5e9ab5f6eae894b918]
patch "src/database.cc"
from [ade943af074000527e1f1f34d8afb0ad0f8a2bc9]
to [8966518247a144a25de01b4ab8fa9e515661edfb]
patch "test/extra/bash_completion/__driver__.lua"
from [b03741df3491cd5215c6e9c2104523ee58f03e47]
to [d73c7818279d25d09614bc078061c37d9db1ea4e]
patch "test/extra/bash_completion/complete_commit.exp"
from [439e4abfd8e54e82a86bc7d131fc3f4d2d22eb7b]
to [179fb7df2eb45341b0afb50473aff8500c547fc0]
patch "test/extra/bash_completion/complete_mtn_-.exp"
from [5518c9ce3d09dafac3f3b9e9f8493811f71846c9]
to [83a17fc2c594257ec71878f91b59564389fadb1b]
patch "test/extra/bash_completion/complete_propagate.exp"
from [409ea6ac7a02318153e0aaf92f28232e8de2465f]
to [779304f72ffc9d0b12a87253f81a7e7bbf467468]
patch "test/extra/bash_completion/library.exp"
from [106bcb86f31d51d9143a893c3ed19ea83e4d24b6]
to [fe2bdcd48b3dae04cf4863d11bccb42b98ad01d5]
patch "test/func/select_partial_id/__driver__.lua"
from [33116ee71aca0e254b00f36c38ad6e420d48df23]
to [3873488a56c7a0499730154c73782a043c6f377e]
============================================================
--- Makefile.am 8f16b42b2e1f5193869adc53ea62c67dcfd5a8a6
+++ Makefile.am 3b41341b6a9e7ddf4e362b16f62032cb24b72ea1
@@ -222,6 +222,7 @@ bin_SCRIPTS = mtnopt
EXTRA_PROGRAMS =
bin_SCRIPTS = mtnopt
+noinst_SCRIPTS = extra/building/dump-test-logs.sh
mtn_SOURCES = $(MOST_SOURCES) src/monotone.cc
nodist_mtn_SOURCES = src/std_hooks.cc src/schema.cc
@@ -241,17 +242,9 @@ src_lib3rdparty_a_SOURCES = $(BOOST_SAND
src_lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \
$(NETXX_SOURCES)
-htmldir = $(datadir)/doc/monotone/html
-html_DATA = doc/texinfo.css
+bashcompdir = $(sysconfdir)/bash_completion.d
+bashcomp_DATA = extra/shell/monotone.bash_completion
-htmlfiguredir = $(htmldir)/figures
-htmlfigure_DATA = $(PNG_FIGURES)
-
-htmlimagedir = $(htmldir)/images
-htmlimage_DATA = $(PNG_IMAGES)
-
-sysconf_DATA = extra/shell/monotone.bash_completion
-
# flags
# sets DEFS for just this object (autoconf's -DHAVE_CONFIG_H is useless)
@@ -353,7 +346,7 @@ EXTRA_DIST = \
\
src/package_revision.txt src/package_full_revision_dist.txt \
\
- contrib examples mac notes visualc
+ extra contrib examples mac notes visualc
# Message translation support
# INST_LINGUAS is set by configure, based on the po/LINGUAS file and
@@ -550,7 +543,7 @@ run_%_tests: Makefile
run_%_tests: Makefile
$(AM_V_GEN){ echo '#!/bin/sh'; \
echo 'export LANG=C'; \
- echo 'PATH=$(top_builddir):$(top_builddir)/test/bin:$$PATH'; \
+ echo 'PATH=$(abs_builddir):$(abs_builddir)/test/bin:$$PATH'; \
echo '$(top_builddir)/test/bin/tester $(srcdir)/test/$*-testsuite.lua "$$@"'; \
echo 'echo $$? > $(top_builddir)/test/$*.status'; \
echo 'exit 0'; } > $@ && \
@@ -584,7 +577,8 @@ mostlyclean-local:
mostlyclean-local:
rm -rf test/bin test/work
rm -f run_*_tests test/*.status test/src/testlib.cc util/txt2c
- set -ex; for d in test/unit/tests/*/__driver__.lua; do \
+ -set -x; \
+ ls test/unit/tests/*/__driver__.lua 2>/dev/null | while read d; do \
rm -f $$d; \
rmdir $${d%/*} || :; \
done
@@ -606,9 +600,9 @@ CLEAN_SRCS = src/std_hooks.cc unit/src/t
src/package_full_revision.txt src/package_full_revision_raw.txt \
mtn.1
-BUILT_SRCS = $(PCH_FILE) $(PCH_BUILD)
+BUILT_SOURCES = $(PCH_FILE) $(PCH_BUILD)
-CLEANFILES = $(bin_SCRIPTS) $(BUILT_SRCS) $(CLEAN_SRCS) $(CLEAN_POFILES)
+CLEANFILES = $(bin_SCRIPTS) $(bashcomp_DATA) $(BUILT_SOURCES) $(CLEAN_SRCS) $(CLEAN_POFILES)
# automake provides no nice way to build a helper program to execute
# on the build machine, so we need our own rule. almost all the
@@ -637,7 +631,7 @@ do_subst = sed -e 's,address@hidden
do_subst = sed -e 's,address@hidden@],$(PACKAGE_VERSION),' \
-e 's,address@hidden@],$(sysconfdir),'
-%: src/util/%.in
+%: src/util/%.in Makefile
$(V_subst)$(do_subst) < $< > $@ && chmod +x $@
extra/shell/monotone.bash_completion: extra/shell/monotone.bash_completion.in \
@@ -649,6 +643,10 @@ extra/shell/monotone.bash_completion: ex
sed -e '1,/address@hidden@]$$/d' < $< ) | \
$(do_subst) > $@
+extra/building/dump-test-logs.sh: extra/building/dump-test-logs.sh.in Makefile
+ $(MKDIR_P) extra/building
+ $(V_subst)$(do_subst) < $< > $@ && chmod +x $@
+
# This is phony, so that we always try to rebuild it. If it succeeds
# in calculating changes, it produces its target; otherwise, its
# target does not exist.
============================================================
--- NEWS 816c8281092cdc5fa5d9d0b7c345da5b53ce33da
+++ NEWS a68115463e161bf4991b5ab5e2f81f807ac546c7
@@ -94,6 +94,10 @@ XXX XXX XX XX:XX:XX UTC 2010
by default accept files ending with both, ".mtn" and ".db".
(fixes monotone issue 128)
+ - monotone gives now a proper error message when an incomplete
+ or partial identifier contains non-hex digits
+ (fixes monotone issue 143)
+
Internal
- The source tree has been reorganized. Sources, tests and documentation
============================================================
--- src/database.cc ade943af074000527e1f1f34d8afb0ad0f8a2bc9
+++ src/database.cc 8966518247a144a25de01b4ab8fa9e515661edfb
@@ -66,6 +66,7 @@
#include "lua_hooks.hh"
#include "outdated_indicator.hh"
#include "lru_writeback_cache.hh"
+#include "char_classifiers.hh"
// defined in schema.c, generated from schema.sql:
extern char const schema_constant[];
@@ -4223,6 +4224,12 @@ database_impl::add_prefix_matching_const
q.sql_cmd += "0"; // always false
else
{
+ for (string::const_iterator i = prefix.begin(); i != prefix.end(); ++i)
+ {
+ E(is_xdigit(*i), origin::user,
+ F("bad character '%c' in id name '%s'") % *i % prefix);
+ }
+
string lower_hex = prefix;
if (lower_hex.size() < constants::idlen)
lower_hex.append(constants::idlen - lower_hex.size(), '0');
@@ -4498,7 +4505,7 @@ database::get_var(var_key const & key, v
database::get_var(var_key const & key, var_value & value)
{
results res;
- imp->fetch(res, one_col, any_rows,
+ imp->fetch(res, one_col, any_rows,
query("SELECT value FROM db_vars "
"WHERE domain = ? AND name = ?")
% text(key.first())
============================================================
--- test/func/select_partial_id/__driver__.lua 33116ee71aca0e254b00f36c38ad6e420d48df23
+++ test/func/select_partial_id/__driver__.lua 3873488a56c7a0499730154c73782a043c6f377e
@@ -5,6 +5,10 @@ rev = base_revision()
commit()
rev = base_revision()
--- Check that automate select returns the correct id when given a partial one
+-- check that automate select returns the correct id when given a partial one
check(mtn("automate", "select", string.sub(rev,1,8)), 0, true, false)
-check(grep(rev, "stdout"), 0, false, false)
+check(qgrep(rev, "stdout"))
+
+-- also check that invalid hex digits in partial ids lead to a proper error message
+check(mtn("automate", "select", "p:abTcd"), 1, false, true)
+check(qgrep("bad character 'T' in id name 'abTcd'", "stderr"))
============================================================
--- contrib/dump-test-logs.sh 4704860e558cd008279f58ba7ccd11b2a0789895
+++ extra/building/dump-test-logs.sh.in a11744bbc3dfe9acf2678b5d3e846ced85629f44
@@ -9,8 +9,11 @@
# Conveniently enough, testlib.lua does most of the work for us.
-for log in tester_dir/*.log
+testsuites="tester unit func extra"
+
+for test in $testsuites
do
+ log=test/work/$test.log
if grep "0 failed" < $log > /dev/null 2>&1 &&
grep "0 succeeded unexpectedly" < $log > /dev/null 2>&1
then :
============================================================
--- src/cmd.cc a83ee4728d826c6d482f14f9515e3338a5f53caf
+++ src/cmd.cc 738af533e09611f04b922b5e9ab5f6eae894b918
@@ -909,11 +909,11 @@ CMD_NO_WORKSPACE(manpage, "manpage", "",
ss << man_section(_("See Also"));
ss << (F("info %s and the documentation on %s")
- % prog_name % man_bold("http://monotone.ca/docs")).str() << "\n";
+ % prog_name % man_bold("http://www.monotone.ca/docs")).str() << "\n";
ss << man_section("Bugs");
ss << (F("Please report bugs to %s.")
- % man_bold("http://savannah.nongnu.org/bugs/?group=monotone")).str()<< "\n";
+ % man_bold("https://code.monotone.ca/p/monotone/issues")).str()<< "\n";
ss << man_section("Authors");
ss << _("monotone was written originally by Graydon Hoare "
============================================================
--- INSTALL_windows_native.txt 58778b6df48ac69f8fda2662e2ed2735b19d360a
+++ INSTALL_windows_native.txt 720fd6b6c8f3696e572a3f2f5466b9518d1aadcf
@@ -25,7 +25,7 @@
| -> mingw-get-inst
| -> mingw-get-inst-20101030
| -> mingw-get-inst-20101030.exe
-boost | 1.45.1 | http://sourceforge.net/projects/boots/files/
+boost | 1.45.1 | http://sourceforge.net/projects/boost/files/
| -> boost -> 1.54.0 -> boost_1_45_0.tar.gz
Lua | 5.1.4 | http://www.lua.org/
| -> download
============================================================
--- doc/Makefile.am 41b465f606184dd67d15f97a89b99207568bf110
+++ doc/Makefile.am f9183332ce62e37d94cf978b6eb455b896c07c89
@@ -12,6 +12,15 @@ ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
ACLOCAL_AMFLAGS = -I m4
+htmldir = $(docdir)/html
+html_DATA = texinfo.css
+
+htmlfiguredir = $(htmldir)/figures
+htmlfigure_DATA = $(PNG_FIGURES)
+
+htmlimagedir = $(htmldir)/images
+htmlimage_DATA = $(PNG_IMAGES)
+
CHECK_SRCDIR_EQ_BUILDDIR=[ "`cd \"$(srcdir)\"; pwd`" = "`pwd`" ]
PDF_FIGURES= figures/branch-heads.pdf figures/cert.pdf \
@@ -87,7 +96,7 @@ AM_MAKEINFODOCHTMLFLAGS= -I $(top_srcdir
# Because automake already generates a html target that produces a single file
# HTML, we have to use a different target to make a multifile HTML.
-htmldir: monotone.texi $(srcdir)/version.texi $(doc_monotone_TEXINFOS) $(PNG_FIGURES) $(PNG_IMAGES) $(HTML_EXTRA)
+htmldir: monotone.texi $(srcdir)/version.texi $(monotone_TEXINFOS) $(PNG_FIGURES) $(PNG_IMAGES) $(HTML_EXTRA)
$(MKDIR_P) html.htp && \
cp $(addprefix $(srcdir)/,$(HTML_EXTRA)) html.htp
$(MKDIR_P) html.htp/figures && \
============================================================
--- test/extra/bash_completion/__driver__.lua b03741df3491cd5215c6e9c2104523ee58f03e47
+++ test/extra/bash_completion/__driver__.lua d73c7818279d25d09614bc078061c37d9db1ea4e
@@ -1,3 +1,7 @@
+skip_if(not existsonpath("expect"))
+check({"bash", "--version"}, 0, true)
+-- hashes/dictionaries/associative arrays are new in version 4
+skip_if(qgrep("bash[, ]*version 3", "stdout"))
mtn_setup()
local tests = {
@@ -14,8 +18,11 @@ local tests = {
function ()
addfile("prop-test", "foo")
commit("prop-br1")
- writefile("prop-test", "bar")
+ addfile("prop-test2", "bar")
commit("prop-bra2")
+ check(mtn("update","-r","h:prop-br1"), 0, false, false)
+ writefile("prop-test", "zoot")
+ commit("prop-br1")
end,
["cleanup"] =
function ()
@@ -45,6 +52,7 @@ function expect(test)
check({"expect",
"-c", "set mtn \""..cmd_as_str(mtn()).."\"",
"-c", "set initial_dir \""..initial_dir.."\"",
+ "-c", "set srcdir \""..srcdir.."\"",
"-c", "source library.exp",
"-f", test..".exp"}, 0, true, false)
check(grep("<<success>>", "stdout"), 0, false, false)
============================================================
--- test/extra/bash_completion/complete_commit.exp 439e4abfd8e54e82a86bc7d131fc3f4d2d22eb7b
+++ test/extra/bash_completion/complete_commit.exp 179fb7df2eb45341b0afb50473aff8500c547fc0
@@ -1,26 +1,29 @@
-# This test checks that monotone.bash_completion2 can handle arguments that
+# This test checks that monotone.bash_completion can handle arguments that
# are specified as 'PATH ...'
-set CTRLC \003
-set timeout 2
+send_user "\n===== BEGIN complete_commit =====\n"
+expect -re "@ $"
+send "\n$mtn commit -m 'foobar' "
+expect {
+ -ex " commit " {}
+ timeout { failure "' commit '"; exit }
+}
-send "$mtn commit -m 'foobar' \t\t"
-expect "mtn commit"
+send "\t"
expect {
- -ex "commit-test1" {
- expect {
- -ex "commit-test2" {
- }
- }
- }
- timeout { failure; exit }
+ -ex "commit-test1" {}
+ timeout { failure "'commit-test1'"; exit }
}
+expect {
+ -ex "commit-test2" {}
+ timeout { failure "'commit-test2'"; exit }
+}
-send "commit-test1 commit-test\t\t"
+send "commit-test1 commit-test\t"
expect {
- -ex "commit-test2" {
- success
- }
- timeout { failure; exit }
+ -ex "commit-test2" {}
+ timeout { failure "'commit-test1 commit-test2'"; exit }
}
-failure
+
+send_user "\n===== END complete_commit =====\n"
+success
============================================================
--- test/extra/bash_completion/complete_mtn_-.exp 5518c9ce3d09dafac3f3b9e9f8493811f71846c9
+++ test/extra/bash_completion/complete_mtn_-.exp 83a17fc2c594257ec71878f91b59564389fadb1b
@@ -1,13 +1,12 @@
# Check that something is compled with 'mtn -'
+send_user "\n===== BEGIN complete_mtn_- =====\n"
+expect -re "@ $"
send "$mtn -\t"
-#expect -ex "mtn -"
-send "\t"
expect {
- -timeout 2
- -- "--no-workspace" {
- success
- exit
- }
+ -gl "--no-workspace" {}
+ timeout { failure "'--no-workspace'"; exit }
}
-failure
+
+send_user "\n===== END complete_mtn_- =====\n"
+success
============================================================
--- test/extra/bash_completion/complete_propagate.exp 409ea6ac7a02318153e0aaf92f28232e8de2465f
+++ test/extra/bash_completion/complete_propagate.exp 779304f72ffc9d0b12a87253f81a7e7bbf467468
@@ -1,26 +1,38 @@
-set CTRLC \003
-set timeout 2
+send_user "\n===== BEGIN complete_propagate =====\n"
+expect -re "@ $"
+send_user "\n===== Testing for the 'propagate' command =====\n"
+send "\n$mtn propagate "
+expect {
+ -ex " propagate " {}
+ timeout { failure "' propagate '"; exit }
+}
-send "$mtn propagate \t\t"
-expect "mtn propagate"
+send "\t"
expect {
- -ex "prop-br1" {
- expect {
- -ex "prop-bra2" {
- }
- }
- }
- timeout { failure; exit }
+ -ex "prop-br1" {}
+ timeout { failure "'prop-bra1'"; exit }
}
+expect {
+ -ex "prop-bra2" {}
+ timeout { failure "'prop-bra2'"; exit }
+}
-send "$CTRLC\n\n"
+send "\003\n"
+expect -re "@ $"
+send_user "\n===== Testing that the 'propagate' completes the second branch correctly =====\n"
# One \t is enough for the second branch name to expand
-send "$mtn propagate prop-br1 prop-bra\t"
+send "\n$mtn propagate prop-br1 prop-bra"
expect {
- -ex "prop-bra2" {
- success
- }
- timeout { failure; exit }
+ -ex " propagate " {}
+ timeout { failure "' propagate '"; exit }
}
-failure
+
+send "\t"
+expect {
+ -ex "prop-bra2" {}
+ timeout { failure "'prop-bra2'"; exit }
+}
+
+send_user "\n===== END complete_propagate =====\n"
+success
============================================================
--- test/extra/bash_completion/library.exp 106bcb86f31d51d9143a893c3ed19ea83e4d24b6
+++ test/extra/bash_completion/library.exp fe2bdcd48b3dae04cf4863d11bccb42b98ad01d5
@@ -4,25 +4,25 @@ proc success {} {
send_user "\n<<success>>\n"
}
-proc failure {} {
- send_user "\n<<failure>>\n"
+proc failure {str} {
+ if {$str == ""} {
+ send_user "\n<<failure>>\n"
+ } else {
+ send_user "\n<<failure when expecting $str>>\n"
+ }
}
-send_user "mtn = $mtn\n"
-send_user "initial_dir = $initial_dir\n"
-send_user "PATH = $env(PATH)\n"
-spawn "bash" "-l"
-send "export PS1='@ '\n"
-send "export PS2='_@ '\n"
-send "pwd\n"
-# For some reason, it seems bash doesn't load the bash completion package,
-# even though started with -l...
-send ". /etc/bash_completion\n"
+set timeout 2
+set env(initial_dir) $initial_dir
+set env(srcdir) $srcdir
+spawn "bash" "--rcfile" "$srcdir/extra/bash_completion/bashrc"
+# If there is no completion package, it's no point trying this.
expect {
-timeout 1
- "bash: /etc/bash_completion: " { failure; exit }
+ "No bash completion package present." {
+ failure "No bash completion package present."; exit
+ }
}
send ". $initial_dir/extra/shell/monotone.bash_completion\n"
# Wait for the last line to be echoed
-expect "bash_completion2"
-#stty rows 512
+expect "shell/monotone.bash_completion"
============================================================
--- /dev/null
+++ test/extra/dump-test-logs/__driver__.lua 91b6fe4e179e21879203d4891156c92c64f1f80d
@@ -0,0 +1,6 @@
+check({"sh", initial_dir.."/extra/building/dump-test-logs.sh"},
+ 1, true, false)
+check(qgrep("^### test/work/tester.log ###$", "stdout")
+ and qgrep("^### test/work/unit.log ###$", "stdout")
+ and qgrep("^### test/work/func.log ###$", "stdout")
+ and qgrep("^### test/work/extra.log ###$", "stdout"))
============================================================
--- /dev/null
+++ test/extra/bash_completion/bashrc 50253c70d06f889a476b8333d5013c5512a1ef57
@@ -0,0 +1,30 @@
+# -*- shell-script -*-
+# Use emacs key bindings
+set -o emacs
+# Use bash strict mode
+#set -o posix
+# Set the prompts
+export PS1='@ '
+export PS2='> '
+# Configure readline
+export INPUTRC=$srcdir/extra/bash_completion/inputrc
+# Set dumb terminal
+#export TERM=dummy
+# Give us many columns
+stty columns 4000
+# Make sure to load the bash_completion package
+if [ "$BASH_COMPLETION" = "" ]; then
+ if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ elif [ -f /usr/local/etc/bash_completion ]; then
+ . /usr/local/etc/bash_completion
+ else
+ echo No bash completion package present.
+ exit
+ fi
+fi
+#
+echo Current settings
+echo pwd: $(pwd)
+echo initial_dir: $initial_dir
+echo srcdir: $srcdir
============================================================
--- /dev/null
+++ test/extra/bash_completion/inputrc c8c7098b3ff90813e2877a5cef51dedd73c9c0f8
@@ -0,0 +1,8 @@
+# Press TAB once to autocomplete
+set show-all-if-ambiguous on
+# No bell. No ^G in output
+set bell-style none
+# Don't query user about viewing the number of possible completions
+set completion-query-items -1
+# Don't use pager when showing completions
+set page-completions off
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: 57a51f3171a947c89fd7def59d8c8affcdc7fe55,
code <=