monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: 04a73419093a975b742bd0664d


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 04a73419093a975b742bd0664da0079b7001436f
Date: Fri, 18 Feb 2011 20:54:06 +0100 (CET)

revision:            04a73419093a975b742bd0664da0079b7001436f
date:                2011-02-07T22:16:14
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone
changelog:
merge of '3097a4d0bcebcdee81ceb7dc489e66377e619b6c'
     and 'e0b3a9b5b297bddb1c4c17cacd674ea67b9a5704'

manifest:
format_version "1"

new_manifest [8f3af6ef11070efb8cab11cde285d409c612fb36]

old_revision [3097a4d0bcebcdee81ceb7dc489e66377e619b6c]

patch "INSTALL_windows_native.txt"
 from [58778b6df48ac69f8fda2662e2ed2735b19d360a]
   to [720fd6b6c8f3696e572a3f2f5466b9518d1aadcf]

patch "Makefile.am"
 from [2ba4f23449d2bc049683b26e8603ee25c89c3201]
   to [3b41341b6a9e7ddf4e362b16f62032cb24b72ea1]

patch "NEWS"
 from [816c8281092cdc5fa5d9d0b7c345da5b53ce33da]
   to [a68115463e161bf4991b5ab5e2f81f807ac546c7]

patch "src/cmd.cc"
 from [a83ee4728d826c6d482f14f9515e3338a5f53caf]
   to [738af533e09611f04b922b5e9ab5f6eae894b918]

patch "src/database.cc"
 from [ade943af074000527e1f1f34d8afb0ad0f8a2bc9]
   to [8966518247a144a25de01b4ab8fa9e515661edfb]

patch "test/extra/bash_completion/__driver__.lua"
 from [48ab97476e92e8d9a6c11bdaa9696da8b3e5fc01]
   to [d73c7818279d25d09614bc078061c37d9db1ea4e]

patch "test/func/select_partial_id/__driver__.lua"
 from [33116ee71aca0e254b00f36c38ad6e420d48df23]
   to [3873488a56c7a0499730154c73782a043c6f377e]

old_revision [e0b3a9b5b297bddb1c4c17cacd674ea67b9a5704]

patch "Makefile.am"
 from [24ff4c7e4781e310e4db22d1de957387f861f65b]
   to [3b41341b6a9e7ddf4e362b16f62032cb24b72ea1]
============================================================
--- Makefile.am	2ba4f23449d2bc049683b26e8603ee25c89c3201
+++ Makefile.am	3b41341b6a9e7ddf4e362b16f62032cb24b72ea1
@@ -543,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'; } > $@ && \
============================================================
--- 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"))
============================================================
--- 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
============================================================
--- test/extra/bash_completion/__driver__.lua	48ab97476e92e8d9a6c11bdaa9696da8b3e5fc01
+++ 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 = {
============================================================
--- Makefile.am	24ff4c7e4781e310e4db22d1de957387f861f65b
+++ Makefile.am	3b41341b6a9e7ddf4e362b16f62032cb24b72ea1
@@ -577,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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]