[Unison-hackers] [unison-svn] r306 - trunk/src
Benjamin C. Pierce
bcpierce at seas.upenn.edu
Sun Aug 24 10:52:45 EDT 2008
Author: bcpierce
Date: 2008-08-24 10:52:39 -0400 (Sun, 24 Aug 2008)
New Revision: 306
Modified:
trunk/src/NEWS
trunk/src/RECENTNEWS
trunk/src/mkProjectInfo.ml
trunk/src/stasher.ml
trunk/src/strings.ml
Log:
* Don't ignore files that look like backup files if the {\\tt
backuplocation} preference is set to {\\tt central}
Modified: trunk/src/NEWS
===================================================================
--- trunk/src/NEWS 2008-08-21 15:39:05 UTC (rev 305)
+++ trunk/src/NEWS 2008-08-24 14:52:39 UTC (rev 306)
@@ -1,5 +1,5 @@
-Changes in Version 2.31.3
+Changes in Version 2.31.4
Changes since 2.17:
* Major rewrite and cleanup of the whole Mac OS X graphical user
Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS 2008-08-21 15:39:05 UTC (rev 305)
+++ trunk/src/RECENTNEWS 2008-08-24 14:52:39 UTC (rev 306)
@@ -1,3 +1,9 @@
+CHANGES FROM VERSION 2.31.4
+
+* Don't ignore files that look like backup files if the {\\tt
+ backuplocation} preference is set to {\\tt central}
+
+-------------------------------
CHANGES FROM VERSION 2.31.3
* Updated documentation with recently added preferences.
Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml 2008-08-21 15:39:05 UTC (rev 305)
+++ trunk/src/mkProjectInfo.ml 2008-08-24 14:52:39 UTC (rev 306)
@@ -90,3 +90,4 @@
+
Modified: trunk/src/stasher.ml
===================================================================
--- trunk/src/stasher.ml 2008-08-21 15:39:05 UTC (rev 305)
+++ trunk/src/stasher.ml 2008-08-24 14:52:39 UTC (rev 306)
@@ -2,7 +2,7 @@
(* $I2: Last modified by lescuyer *)
(* Copyright 1999-2008 (see COPYING for details) *)
-(*------------------------------------------------------------------------------------*)
+(* --------------------------------------------------------------------------*)
(* Preferences for backing up and stashing *)
let debug = Util.debug "stasher"
@@ -147,7 +147,7 @@
let _ = Pred.alias backupcurrent "backupcurrent"
let _ = Pred.alias backupcurrentnot "backupcurrentnot"
-(*------------------------------------------------------------------------------------*)
+(* ---------------------------------------------------------------------------*)
(* NB: We use Str.regexp here because we need group matching to retrieve
and increment version numbers from backup file names. We only use
@@ -185,8 +185,8 @@
else
raise (Util.Fatal "Either backupprefix or backupsuffix must contain '$VERSION'")
-(* We ignore files whose name ends in .unison.bak, since people may still have these lying around
- from using previous versions of Unison. *)
+(* We ignore files whose name ends in .unison.bak, since people may still have these
+ lying around from using previous versions of Unison. *)
let oldBackupPrefPathspec = "Name *.unison.bak"
(* This function creates Rx regexps based on the preferences to ignore
@@ -209,10 +209,14 @@
match dir_rx with
None -> "Regex " ^ full
| Some _ -> "Regex " ^ dir in
- debug (fun () ->
- Util.msg "New pattern being added to ignore preferences: %s\n" theRegExp);
+
Globals.addRegexpToIgnore oldBackupPrefPathspec;
- Globals.addRegexpToIgnore theRegExp
+ if Prefs.read backuplocation = "local" then begin
+ debug (fun () ->
+ Util.msg "New pattern being added to ignore preferences (for backup files):\n %s\n"
+ theRegExp);
+ Globals.addRegexpToIgnore theRegExp
+ end
(* We use references for functions that compute the prefixes and suffixes
in order to avoid using functions from the Str module each time we need them. *)
Modified: trunk/src/strings.ml
===================================================================
--- trunk/src/strings.ml 2008-08-21 15:39:05 UTC (rev 305)
+++ trunk/src/strings.ml 2008-08-24 14:52:39 UTC (rev 306)
@@ -4,7 +4,7 @@
let docs =
("about", ("About Unison",
"Unison File Synchronizer\n\
- Version 2.31.3\n\
+ Version 2.31.4\n\
\n\
"))
::
@@ -2560,8 +2560,8 @@
\n\
"))
::
- ("news", ("Changes in Version 2.31.3",
- "Changes in Version 2.31.3\n\
+ ("news", ("Changes in Version 2.31.4",
+ "Changes in Version 2.31.4\n\
\n\
\032 Changes since 2.17:\n\
\032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\
More information about the Unison-hackers
mailing list