[Unison-hackers] [unison-svn] r455 - trunk/src
bcpierce@seas.upenn.edu
bcpierce at seas.upenn.edu
Sun Jun 6 08:43:26 EDT 2010
Author: bcpierce
Date: 2010-06-06 08:43:26 -0400 (Sun, 06 Jun 2010)
New Revision: 455
Modified:
trunk/src/RECENTNEWS
trunk/src/mkProjectInfo.ml
Log:
* Try again to fix version number
Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS 2010-06-06 12:41:29 UTC (rev 454)
+++ trunk/src/RECENTNEWS 2010-06-06 12:43:26 UTC (rev 455)
@@ -1,5 +1,14 @@
CHANGES FROM VERSION 2.41.-27
+* Try again to fix version number
+
+
+
+
+
+-------------------------------
+CHANGES FROM VERSION 2.41.-27
+
* Fix version number
Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml 2010-06-06 12:41:29 UTC (rev 454)
+++ trunk/src/mkProjectInfo.ml 2010-06-06 12:43:26 UTC (rev 455)
@@ -44,52 +44,6 @@
let revisionString = "$Rev: 425$";;
-(* BCP (1/10): This bit was added to help with getting Unison via bazaar, but it
- was never used much and I'm not confident it's working. I'll comment it out
- for now, but if it hasn't been needed or fixed in a few months, the next
- person that edits this file should delete it...
-
- (* extract a substring using a regular expression *)
- let extract_str re str =
- let _ = Str.search_forward (Str.regexp re) str 0 in
- Str.matched_group 1 str;;
- let extract_int re str = int_of_string (extract_str re str);;
-
- (* run the bzr tool to get version information for bzr branches *)
- exception BzrException of Unix.process_status;;
- let bzr args =
- let bzr = (try Sys.getenv "BZR" with Not_found -> "bzr") in
- let cmd = bzr ^ " " ^ args in
- let inc = Unix.open_process_in cmd in
- let buf = Buffer.create 16 in
- (try
- while true do
- Buffer.add_channel buf inc 1
- done
- with End_of_file -> ());
- let status = Unix.close_process_in inc in
- match status with
- Unix.WEXITED 0 -> Buffer.contents buf
- | _ -> raise (BzrException status);;
-
- let pointVersion = if String.length revisionString > 5
- then Scanf.sscanf revisionString "$Rev: %d " (fun x -> x) - pointVersionOrigin
- else (* Determining the pointVersionOrigin in bzr is kind of tricky:
- - The mentioned revision number might not be part of this branch
- - The mentioned revision number might be rhs of some merge
- - The bzr-svn plugin might be outdated or not installed at all
-
- On the whole, getting this to work seems too much effort for now.
- So we'll simply use the revno as is as the point version,
- and revisit offsetting them if unison should ever move its trunk to bzr.
-
- let pvo = extract_int "^revno:[ \t]*\\([0-9]+\\)[ \t]*$"
- (bzr ("log -r svn:" ^
- string_of_int pointVersionOrigin)) in
- *)
- extract_int "^\\([0-9]+\\)$" (bzr "revno") (* - pvo *);;
-*)
-
let pointVersion =
Scanf.sscanf revisionString "$Rev: %d " (fun x -> x) - pointVersionOrigin;;
@@ -102,3 +56,4 @@
+
More information about the Unison-hackers
mailing list