[Unison-hackers] [unison-svn] r493 - trunk/src
schmitta at seas.upenn.edu
schmitta at seas.upenn.edu
Fri Apr 6 11:11:54 EDT 2012
Author: schmitta
Date: 2012-04-06 11:11:54 -0400 (Fri, 06 Apr 2012)
New Revision: 493
Modified:
trunk/src/RECENTNEWS
trunk/src/mkProjectInfo.ml
trunk/src/os.ml
Log:
- fixed a bug in the lookup of the host name on the server
Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS 2012-04-06 15:07:20 UTC (rev 492)
+++ trunk/src/RECENTNEWS 2012-04-06 15:11:54 UTC (rev 493)
@@ -1,3 +1,8 @@
+CHANGES FROM VERSION 2.45.1
+
+- fixed a bug in the lookup of the host name on the server
+
+-------------------------------
CHANGES FROM VERSION 2.45.-1
* Bit more preparation for beta release
Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml 2012-04-06 15:07:20 UTC (rev 492)
+++ trunk/src/mkProjectInfo.ml 2012-04-06 15:11:54 UTC (rev 493)
@@ -67,3 +67,4 @@
+
Modified: trunk/src/os.ml
===================================================================
--- trunk/src/os.ml 2012-04-06 15:07:20 UTC (rev 492)
+++ trunk/src/os.ml 2012-04-06 15:11:54 UTC (rev 493)
@@ -24,18 +24,21 @@
(* Assumption: Prefs are not loaded on server, so clientHostName is always *)
(* set to myCanonicalHostName. *)
+let localCanonicalHostName =
+ try System.getenv "UNISONLOCALHOSTNAME"
+ with Not_found -> Unix.gethostname()
+
let clientHostName : string Prefs.t =
- let myCanonicalHostName =
- try System.getenv "UNISONLOCALHOSTNAME"
- with Not_found -> Unix.gethostname()
- in
- Prefs.createString "clientHostName" myCanonicalHostName
+ Prefs.createString "clientHostName" localCanonicalHostName
"!set host name of client"
("When specified, the host name of the client will not be guessed" ^
"and the provided host name will be used to find the archive.")
-let myCanonicalHostName () = Prefs.read clientHostName
+let serverHostName = localCanonicalHostName
+let myCanonicalHostName () =
+ if !Trace.runningasserver then serverHostName else Prefs.read clientHostName
+
let tempFilePrefix = ".unison."
let tempFileSuffixFixed = ".unison.tmp"
let tempFileSuffix = ref tempFileSuffixFixed
More information about the Unison-hackers
mailing list