summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin C. Pierce <bcpierce@cis.upenn.edu>2007-04-02 02:38:52 +0000
committerBenjamin C. Pierce <bcpierce@cis.upenn.edu>2007-04-02 02:38:52 +0000
commitfa55badf2c020bd24868bcfcf956390ae334a9b9 (patch)
tree5447176278f50ebe16cd488f723085926c81c5b0
parentc72ec81ee9a00da9cfba8636bfb67c81996d7982 (diff)
downloadunison-fa55badf2c020bd24868bcfcf956390ae334a9b9.zip
unison-fa55badf2c020bd24868bcfcf956390ae334a9b9.tar.gz
unison-fa55badf2c020bd24868bcfcf956390ae334a9b9.tar.bz2
* Set Fileinfo.CtimeStamp to 0, always, following suggestion by Jerome.
-rwxr-xr-xdoc/unison-manual.tex13
-rw-r--r--src/RECENTNEWS5
-rw-r--r--src/fileinfo.ml11
-rw-r--r--src/mkProjectInfo.ml1
-rw-r--r--src/update.ml2
5 files changed, 28 insertions, 4 deletions
diff --git a/doc/unison-manual.tex b/doc/unison-manual.tex
index f84b8a1..4022162 100755
--- a/doc/unison-manual.tex
+++ b/doc/unison-manual.tex
@@ -1540,9 +1540,9 @@ checked first.) If neither of these are set, then the directory
The preference \verb|maxbackups| controls how many previous versions of
each file are kept (including the current version).
-By default, backup files are named \verb|.unison.FILENAME.VERSION.bak|,
-where \verb|FILENAME| is the original filename and \verb|version| is the
-backup number (001 for the most recent, 002 for the next most recent,
+By default, backup files are named \verb|.bak.VERSION.FILENAME|,
+where \verb|FILENAME| is the original filename and \verb|VERSION| is the
+backup number (1 for the most recent, 2 for the next most recent,
etc.). This can be changed by setting the preferences \verb|backupprefix|
and/or \verb|backupsuffix|. If desired, \verb|backupprefix| may include a
directory prefix; this can be used with \verb|backuplocation = local| to put all
@@ -1692,6 +1692,13 @@ Alternatively, users of \verb|emacs| may find the following settings convenient:
(These commands are displayed here on two lines to avoid running off the
edge of the page. In your preference file, each command should be written on a
single line.)
+
+Users running emacs under windows may find something like this useful:
+\begin{verbatim}
+ merge = Name * -> C:\Progra~1\Emacs\emacs\bin\emacs.exe -q --eval
+ "(ediff-files """CURRENT1""" """CURRENT2""")"
+\end{verbatim}
+
Users running Mac OS X (you may need the Developer Tools installed to get
the {\tt opendiff} utility) may prefer
\begin{verbatim}
diff --git a/src/RECENTNEWS b/src/RECENTNEWS
index 8ae7d3f..eee1089 100644
--- a/src/RECENTNEWS
+++ b/src/RECENTNEWS
@@ -1,3 +1,8 @@
+CHANGES FROM VERSION 2.27.6
+
+* Set Fileinfo.CtimeStamp to 0, always, following suggestion by Jerome.
+
+-------------------------------
CHANGES FROM VERSION 2.27.5
* Truncate inode numbers to 31 bits, so that they can be transferred
diff --git a/src/fileinfo.ml b/src/fileinfo.ml
index 9eab1dd..7b5aaee 100644
--- a/src/fileinfo.ml
+++ b/src/fileinfo.ml
@@ -91,6 +91,13 @@ let set fspath path action newDesc =
type stamp =
InodeStamp of int (* inode number, for Unix systems *)
| CtimeStamp of float (* creation time, for windows systems *)
+ (* FIX [BCP, 3/07]: The Ctimestamp variant is actually bogus.
+ For file transfers, it appears that using the ctime to detect a
+ file change is completely ineffective as, when a file is deleted (or
+ renamed) and then replaced by another file, the new file inherits the
+ ctime of the old file. It is slightly harmful performancewise, as
+ fastcheck expects ctime to be preserved by renaming. Thus, we should
+ probably not use any stamp under Windows. *)
let pretendLocalOSIsWin32 =
Prefs.createBool "pretendwin" false
@@ -107,7 +114,9 @@ let stamp info =
if Prefs.read pretendLocalOSIsWin32 then CtimeStamp info.ctime else
match Util.osType with
`Unix -> InodeStamp info.inode
- | `Win32 -> CtimeStamp info.ctime
+ | `Win32 -> 0.0
+ (* Was "CtimeStamp info.ctime", but this is bogus: Windows
+ ctimes are not reliable. *)
let ressStamp info = Osx.stamp info.osX
diff --git a/src/mkProjectInfo.ml b/src/mkProjectInfo.ml
index c407df9..663092b 100644
--- a/src/mkProjectInfo.ml
+++ b/src/mkProjectInfo.ml
@@ -106,3 +106,4 @@ Printf.printf "NAME=%s\n" projectName;;
+
diff --git a/src/update.ml b/src/update.ml
index 1617310..6ca35c0 100644
--- a/src/update.ml
+++ b/src/update.ml
@@ -19,6 +19,8 @@ let debugignore = Trace.debug "ignore"
representation does not change between unison versions.) *)
(*FIX: change the approximate function in props.ml next time the
format is modified (see file props.ml for the new function) *)
+(*FIX: also change Fileinfo.stamp to drop the info.ctime component, next time the
+ format is modified *)
let archiveFormat = 22
module NameMap = MyMap.Make (Name)