summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenjamin Pierce <bcpierce00@gmail.com>2016-05-23 12:10:52 -0400
committerBenjamin Pierce <bcpierce00@gmail.com>2016-05-23 12:10:52 -0400
commit63d0a582da3bf6bede43f73f80194011d4945f8c (patch)
treec1f956ca0d8df1e4ae0532236c46c927e4c49203 /src
parent8f1674874ffd3b6634ce6de0601f61fa5378ef34 (diff)
downloadunison-63d0a582da3bf6bede43f73f80194011d4945f8c.zip
unison-63d0a582da3bf6bede43f73f80194011d4945f8c.tar.gz
unison-63d0a582da3bf6bede43f73f80194011d4945f8c.tar.bz2
Add OCaml compiler version to connection header string
Diffstat (limited to 'src')
-rw-r--r--src/Makefile2
-rw-r--r--src/Makefile.ProjectInfo4
-rw-r--r--src/RECENTNEWS19
-rw-r--r--src/remote.ml11
4 files changed, 17 insertions, 19 deletions
diff --git a/src/Makefile b/src/Makefile
index ab21119..784ae1a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -80,7 +80,7 @@ text:
$(MAKE) -C .. text
doinstall: $(NAME)$(EXEC_EXT)
- if [ ! $(NAME) ]; then \
+ @if [ ! $(NAME) ]; then \
echo "makefile variable NAME not bound"; \
exit 1 \
; fi
diff --git a/src/Makefile.ProjectInfo b/src/Makefile.ProjectInfo
index 14c4772..f1c21da 100644
--- a/src/Makefile.ProjectInfo
+++ b/src/Makefile.ProjectInfo
@@ -1,3 +1,3 @@
-MAJORVERSION=2.49
-VERSION=2.49.543
+MAJORVERSION=2.50
+VERSION=2.50.0
NAME=unison
diff --git a/src/RECENTNEWS b/src/RECENTNEWS
index 0a5817d..e20fcaf 100644
--- a/src/RECENTNEWS
+++ b/src/RECENTNEWS
@@ -1,18 +1,10 @@
CHANGES FROM VERSION 2.49.543
-* Makefile fix
-
-
-
--------------------------------
-CHANGES FROM VERSION 2.49.543
-
+* Add OCaml compiler version (<= 4.02.1 or >= 4.02.2) to connection
+ header string that is exchanged when client connects to server, to
+ fail more cleanly when incompatible versions are recognized.
+* Bump version number to 2.50.0 to avoid confusion
* Fix description of where the command-line tool will be installed
-
-
--------------------------------
-CHANGES FROM VERSION 2.49.543
-
* Improve error report when failing on OCaml compiler version mismatch
-------------------------------
@@ -37,15 +29,12 @@ CHANGES FROM VERSION 2.49.8
* Update copyright dates to 2016
-
-
-------------------------------
CHANGES FROM VERSION 2.49.7
* Small fix to gtk2 UI per suggestion from Daniel Reichelt, to scan
profiles before main window is created. (second try)
-
-------------------------------
CHANGES FROM VERSION 2.49.6
diff --git a/src/remote.ml b/src/remote.ml
index f610932..aff40eb 100644
--- a/src/remote.ml
+++ b/src/remote.ml
@@ -915,7 +915,16 @@ let commandAvailable =
BUILDING CONNECTIONS TO THE SERVER
****************************************************************************)
-let connectionHeader = "Unison " ^ Uutil.myMajorVersion ^ "\n"
+let connectionHeader =
+ let (major,minor,patchlevel) =
+ Scanf.sscanf Sys.ocaml_version "%d.%d.%d" (fun x y z -> (x,y,z)) in
+ let compiler =
+ if major < 4
+ || major = 4 && minor <= 2
+ || major = 4 && minor = 2 && patchlevel <= 1
+ then "<= 4.01.1"
+ else ">= 4.01.2"
+ in "Unison " ^ Uutil.myMajorVersion ^ " with OCaml " ^ compiler ^ "\n"
let rec checkHeader conn buffer pos len =
if pos = len then