From 16e93934de41761976cbef87eeaffb6272424e17 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Wed, 6 Dec 2017 11:56:08 +0100 Subject: [PATCH 1/2] Fix visual_length_substring --- src/core/opamStd.ml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/opamStd.ml b/src/core/opamStd.ml index 9b31a42b8f9..013db09e45f 100644 --- a/src/core/opamStd.ml +++ b/src/core/opamStd.ml @@ -799,20 +799,20 @@ module OpamFormat = struct let visual_length_substring s ofs len = let rec aux acc i = if i >= len then acc - else match s.[i] with - | '\xc2'..'\xdf' -> aux (acc + (min 1 (len - i))) (i + 2) - | '\xe0'..'\xef' -> aux (acc + (min 2 (len - i))) (i + 3) - | '\xf0'..'\xf4' -> aux (acc + (min 3 (len - i))) (i + 4) + else match s.[ofs + i] with + | '\xc2'..'\xdf' -> aux (acc - min 1 (len - i)) (i + 2) + | '\xe0'..'\xef' -> aux (acc - min 2 (len - i)) (i + 3) + | '\xf0'..'\xf4' -> aux (acc - min 3 (len - i)) (i + 4) | '\027' -> (try - let j = String.index_from s (i+1) 'm' in - if j > ofs + len then acc + len - i else - aux (acc + j - i + 1) (j + 1) + let j = String.index_from s (ofs+i+1) 'm' - ofs in + if j > len then acc - (len - i) else + aux (acc - (j - i + 1)) (j + 1) with Not_found | Invalid_argument _ -> - acc + len - i) + acc - (len - i)) | _ -> aux acc (i + 1) in - len - aux 0 ofs + aux len 0 let visual_length s = visual_length_substring s 0 (String.length s) From dc44f50b29ec18aabd79d6dd3fa880f3edf129bd Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Wed, 13 Dec 2017 12:25:16 +0100 Subject: [PATCH 2/2] Bump to beta6 --- CHANGES | 4 ++++ configure | 18 +++++++++--------- configure.ac | 2 +- opam-client.opam | 6 +++--- opam-core.opam | 2 +- opam-devel.opam | 4 ++-- opam-format.opam | 4 ++-- opam-installer.opam | 4 ++-- opam-repository.opam | 4 ++-- opam-solver.opam | 4 ++-- opam-state.opam | 4 ++-- 11 files changed, 30 insertions(+), 26 deletions(-) diff --git a/CHANGES b/CHANGES index 3e081e6cc24..2286a1326db 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes prefixed with "(*)" are potentially breaking to scripts or existing repositories (changes that are automatically handled by the format upgrade tools are not marked). +2.0.0~beta6 +* Small UI fixes +* Fixed a rare case of looping while processing actions + 2.0.0~beta5 * Added timeout support to the solvers (default 1min) * Added `--unlock-base` to allow changing the compiler of a switch diff --git a/configure b/configure index 2e6f82a460b..5a79c811b51 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opam 2.0.0~beta5. +# Generated by GNU Autoconf 2.69 for opam 2.0.0~beta6. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -578,8 +578,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opam' PACKAGE_TARNAME='opam' -PACKAGE_VERSION='2.0.0~beta5' -PACKAGE_STRING='opam 2.0.0~beta5' +PACKAGE_VERSION='2.0.0~beta6' +PACKAGE_STRING='opam 2.0.0~beta6' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1243,7 +1243,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opam 2.0.0~beta5 to adapt to many kinds of systems. +\`configure' configures opam 2.0.0~beta6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1305,7 +1305,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opam 2.0.0~beta5:";; + short | recursive ) echo "Configuration of opam 2.0.0~beta6:";; esac cat <<\_ACEOF @@ -1406,7 +1406,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opam configure 2.0.0~beta5 +opam configure 2.0.0~beta6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1463,7 +1463,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opam $as_me 2.0.0~beta5, which was +It was created by opam $as_me 2.0.0~beta6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4977,7 +4977,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opam $as_me 2.0.0~beta5, which was +This file was extended by opam $as_me 2.0.0~beta6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5030,7 +5030,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opam config.status 2.0.0~beta5 +opam config.status 2.0.0~beta6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d37acde0337..43bfe3131be 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(opam,2.0.0~beta5) +AC_INIT(opam,2.0.0~beta6) AC_COPYRIGHT(Copyright 2012-2017 OcamlPro SAS) AC_CONFIG_MACRO_DIR([m4]) diff --git a/opam-client.opam b/opam-client.opam index 39d65ffb8b3..1906a1fca97 100644 --- a/opam-client.opam +++ b/opam-client.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -19,8 +19,8 @@ build: [ [make "%{name}%.install"] ] depends: [ - "opam-state" {= "2.0.0~beta5"} - "opam-solver" {= "2.0.0~beta5"} + "opam-state" {= "2.0.0~beta6"} + "opam-solver" {= "2.0.0~beta6"} "cmdliner" {>= "0.9.8"} "jbuilder" {build & >= "1.0+beta12"} ] diff --git a/opam-core.opam b/opam-core.opam index 0e9c9860502..e75e0c757f1 100644 --- a/opam-core.opam +++ b/opam-core.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " diff --git a/opam-devel.opam b/opam-devel.opam index 7b141a90ec3..8657575cc52 100644 --- a/opam-devel.opam +++ b/opam-devel.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -20,7 +20,7 @@ build: [ ] build-test: [make "tests"] depends: [ - "opam-client" {= "2.0.0~beta5"} + "opam-client" {= "2.0.0~beta6"} "cmdliner" {>= "0.9.8"} "jbuilder" {build & >= "1.0+beta12"} ] diff --git a/opam-format.opam b/opam-format.opam index 4663fc82534..5b14cc3c7dd 100644 --- a/opam-format.opam +++ b/opam-format.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -19,7 +19,7 @@ build: [ [make "%{name}%.install"] ] depends: [ - "opam-core" {= "2.0.0~beta5"} + "opam-core" {= "2.0.0~beta6"} "opam-file-format" {>= "2.0.0~beta5"} "jbuilder" {build & >= "1.0+beta12"} ] diff --git a/opam-installer.opam b/opam-installer.opam index b49ca2f0278..43239a437ec 100644 --- a/opam-installer.opam +++ b/opam-installer.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -21,7 +21,7 @@ build: [ [make "%{name}%.install"] ] depends: [ - "opam-format" {= "2.0.0~beta5"} + "opam-format" {= "2.0.0~beta6"} "cmdliner" {>= "0.9.8"} "jbuilder" {build & >= "1.0+beta12"} ] diff --git a/opam-repository.opam b/opam-repository.opam index 5ff2d487371..875c8dad8b8 100644 --- a/opam-repository.opam +++ b/opam-repository.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -19,7 +19,7 @@ build: [ [make "%{name}%.install"] ] depends: [ - "opam-format" {= "2.0.0~beta5"} + "opam-format" {= "2.0.0~beta6"} "jbuilder" {build & >= "1.0+beta12"} ] available: ocaml-version >= "4.02.3" diff --git a/opam-solver.opam b/opam-solver.opam index 1703ea950b0..b5f0f220ad7 100644 --- a/opam-solver.opam +++ b/opam-solver.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -19,7 +19,7 @@ build: [ [make "%{name}%.install"] ] depends: [ - "opam-format" {= "2.0.0~beta5"} + "opam-format" {= "2.0.0~beta6"} "mccs" {>= "1.1+4"} "dose3" {>= "5"} "cudf" {>= "0.7"} diff --git a/opam-state.opam b/opam-state.opam index 76be8e32267..0bc7345c3cc 100644 --- a/opam-state.opam +++ b/opam-state.opam @@ -1,5 +1,5 @@ opam-version: "1.2" -version: "2.0.0~beta5" +version: "2.0.0~beta6" maintainer: "opam-devel@lists.ocaml.org" authors: [ "Thomas Gazagnaire " @@ -19,7 +19,7 @@ build: [ [make "%{name}%.install"] ] depends: [ - "opam-repository" {= "2.0.0~beta5"} + "opam-repository" {= "2.0.0~beta6"} "jbuilder" {build & >= "1.0+beta12"} ] available: ocaml-version >= "4.02.3"