From bcpierce at seas.upenn.edu Fri May 1 21:57:37 2009 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Fri, 1 May 2009 21:57:37 -0400 Subject: [Unison-hackers] [unison-svn] r320 - in trunk/src: . lwt ubase uimacnew/uimacnew.xcodeproj Message-ID: <200905020157.n421vbQr005424@yaws.seas.upenn.edu> Author: bcpierce Date: 2009-05-01 21:57:23 -0400 (Fri, 01 May 2009) New Revision: 320 Modified: trunk/src/Makefile.OCaml trunk/src/RECENTNEWS trunk/src/TODO.txt trunk/src/abort.ml trunk/src/case.ml trunk/src/case.mli trunk/src/checksum.ml trunk/src/checksum.mli trunk/src/clroot.ml trunk/src/clroot.mli trunk/src/common.ml trunk/src/common.mli trunk/src/copy.ml trunk/src/external.ml trunk/src/external.mli trunk/src/fileinfo.ml trunk/src/fileinfo.mli trunk/src/files.ml trunk/src/files.mli trunk/src/fileutil.ml trunk/src/fileutil.mli trunk/src/fingerprint.ml trunk/src/fingerprint.mli trunk/src/fspath.ml trunk/src/fspath.mli trunk/src/globals.ml trunk/src/globals.mli trunk/src/linkgtk.ml trunk/src/linkgtk2.ml trunk/src/linktext.ml trunk/src/linktk.ml trunk/src/lock.ml trunk/src/lock.mli trunk/src/lwt/pqueue.ml trunk/src/lwt/pqueue.mli trunk/src/main.ml trunk/src/mkProjectInfo.ml trunk/src/name.ml trunk/src/name.mli trunk/src/os.ml trunk/src/os.mli trunk/src/osx.ml trunk/src/osx.mli trunk/src/path.ml trunk/src/path.mli trunk/src/pixmaps.ml trunk/src/pred.ml trunk/src/pred.mli trunk/src/props.ml trunk/src/props.mli trunk/src/recon.ml trunk/src/recon.mli trunk/src/remote.ml trunk/src/remote.mli trunk/src/sortri.ml trunk/src/sortri.mli trunk/src/stasher.ml trunk/src/strings.mli trunk/src/test.ml trunk/src/test.mli trunk/src/transfer.ml trunk/src/transfer.mli trunk/src/transport.ml trunk/src/transport.mli trunk/src/tree.ml trunk/src/tree.mli trunk/src/ubase/rx.ml trunk/src/ubase/rx.mli trunk/src/ubase/safelist.ml trunk/src/ubase/safelist.mli trunk/src/ubase/trace.ml trunk/src/ubase/trace.mli trunk/src/ubase/uarg.ml trunk/src/ubase/util.ml trunk/src/ubase/util.mli trunk/src/ui.mli trunk/src/uicommon.ml trunk/src/uicommon.mli trunk/src/uigtk2.ml trunk/src/uigtk2.mli trunk/src/uimacnew/uimacnew.xcodeproj/project.pbxproj trunk/src/uitext.ml trunk/src/uitext.mli trunk/src/update.ml trunk/src/update.mli trunk/src/uutil.ml trunk/src/uutil.mli trunk/src/xferhint.ml trunk/src/xferhint.mli Log: * Update copyright notices and add GPLv3 boilerplate to .ml files (.mli files are left with a short copyright line, to reduce clutter) Modified: trunk/src/Makefile.OCaml =================================================================== --- trunk/src/Makefile.OCaml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/Makefile.OCaml 2009-05-02 01:57:23 UTC (rev 320) @@ -155,6 +155,8 @@ endif endif +MINOSXVERSION=10.5 + # NOTE: the OCAMLLIBDIR is not getting passed correctly? # The two cases for cltool are needed because Xcode 2.1+ # builds in build/Default/, and earlier versions use build/ @@ -162,9 +164,9 @@ # sed -e's/@@VERSION@@/$(VERSION)/' $(UIMACDIR)/Info.plist.template > $(UIMACDIR)/Info.plist (cd $(UIMACDIR); xcodebuild OCAMLLIBDIR="$(OCAMLLIBDIR)" SYMROOT=build) if [ -e $(UIMACDIR)/build/Default ]; then \ - gcc -mmacosx-version-min=10.4 $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon; \ + gcc -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon; \ else \ - gcc -mmacosx-version-min=10.4 $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Unison.app/Contents/MacOS/cltool -framework Carbon; \ + gcc -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Unison.app/Contents/MacOS/cltool -framework Carbon; \ fi # OCaml objects for the bytecode version Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/RECENTNEWS 2009-05-02 01:57:23 UTC (rev 320) @@ -1,11 +1,19 @@ +CHANGES FROM VERSION 2.32.6 + +* Update copyright notices and add GPLv3 boilerplate to .ml files + (.mli files are left with a short copyright line, to reduce clutter) + +------------------------------- CHANGES FROM VERSION 2.32.5 +* Update copyright notices and add GPLv3 boilerplate to .ml files + (.mli files are left with a short copyright line, to reduce clutter) + * Ignore one hour differences for deciding whether a file may have been updated. This avoids slow update detection after daylight saving time changes under Windows. This makes it slightly more likely to miss an update, but that should be safe enough. -------------------------------- CHANGES FROM VERSION 2.32.4 * Text UI now includes the current time in its completion message @@ -39,20 +47,11 @@ shortcut-copying completely unrelated files that happen to also have zero length!). - - - - - - ------------------------------- CHANGES FROM VERSION 2.32.0 * Bumped version number to reflect newly added preference - - - ------------------------------- CHANGES FROM VERSION 2.31.11 @@ -69,35 +68,21 @@ * Add some suggestions to TODO file - - - - - ------------------------------- CHANGES FROM VERSION 2.31.10 * Another slight tweak. - - - - ------------------------------- CHANGES FROM VERSION 2.31.9 * Slight tweak to the last commit, suggested by Rasmus. - - - ------------------------------- CHANGES FROM VERSION 2.31.8 * (Forgot to add a couple of new files.) - - ------------------------------- CHANGES FROM VERSION 2.31.5 @@ -113,8 +98,6 @@ * Logging tweak. - - ------------------------------- CHANGES FROM VERSION 2.31.5 @@ -130,29 +113,11 @@ * Logging tweak. +* Resizing the update window vertically no longer moves the status + label. Fix contributed by Pedro Melo. - ------------------------------- -CHANGES FROM VERSION 2.31.5 -* A special hack for Rasmus, who has a special situation that requires - the utimes-setting program to run 'setuid root' (and we do not want - all of Unison to run setuid, so we just spin off an external utility - to do it). This functionality is disabled by default and requires - editing the source code (changing 'false' to 'true' on line 496 of - props.ml) and recompiling to enable. If there are other people that - want it, we can easily make it accessible using a preference - instead, but I prefer not to add a preference until someone else - requests it, to avoid creating an incompatible version. - -* Logging tweak. - - -CHANGES FROM VERSION 2.31.5 - -Resizing the update window vertically no longer moves the status label. Fix contributed by Pedro Melo. -------------------------------- - CHANGES FROM VERSION 2.31.4 * Don't ignore files that look like backup files if the {\\tt @@ -194,16 +159,11 @@ * Record some current TODO items - - - ------------------------------- CHANGES FROM VERSION 2.30.3 * Update docs - - ------------------------------- CHANGES FROM VERSION 2.30.2 @@ -219,14 +179,12 @@ * A better fix for the "single file transfer failed in large directory" issue. - ------------------------------- CHANGES FROM VERSION 2.29.9 * Trying a possible fix for the "assert failure in remote.ml" bug (thanks Jerome!) - ------------------------------- CHANGES FROM VERSION 2.29.8 @@ -236,7 +194,6 @@ still supported, for backwards compatibility, but they do not appear in the documentation. - ------------------------------- CHANGES FROM VERSION 2.29.7 @@ -253,9 +210,6 @@ whether a partially transferred file already exists or not. (Rsync doesn't seem to care about this, but other utilities may.) - - - ------------------------------- CHANGES FROM VERSION 2.29.7 @@ -272,15 +226,11 @@ whether a partially transferred file already exists or not. (Rsync doesn't seem to care about this, but other utilities may.) - - - ------------------------------- CHANGES FROM VERSION 2.29.6 * Fix a small bug in the external copyprog setup. - ------------------------------- CHANGES FROM VERSION 2.29.5 @@ -289,8 +239,6 @@ This should hopefully make Unison a little more approachable for new users.) - - ------------------------------- CHANGES FROM VERSION 2.29.4 @@ -303,7 +251,6 @@ * Updated copyright notices to 2008. :-) - ------------------------------- CHANGES FROM VERSION 2.29.3 @@ -317,7 +264,6 @@ * Automatically supply "user@" in argument to external copy program. - ------------------------------- CHANGES FROM VERSION 2.29.1 @@ -363,13 +309,11 @@ Unison is run, it will continue filling in this temporary directory, skipping transferring files that it finds are already there. - ------------------------------- CHANGES FROM VERSION 2.28.51 * Propagating changes from 2.27 branch - ------------------------------- CHANGES FROM VERSION 2.28.51 @@ -512,7 +456,6 @@ * Add couple of missing files. - ------------------------------- CHANGES FROM VERSION 2.28.4 @@ -543,7 +486,6 @@ with fastcheck. This *might* fix the bug that Karl M. has reported. (Copying fix into trunk.) - ------------------------------- CHANGES FROM VERSION 2.28.-2 Modified: trunk/src/TODO.txt =================================================================== --- trunk/src/TODO.txt 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/TODO.txt 2009-05-02 01:57:23 UTC (rev 320) @@ -250,6 +250,16 @@ * SMALL FUNCTIONALITY IMPROVEMENTS * ================================ +**** When I tell unison to ignore a file whose name has a comma in it, + then unison adds to the preferences file a line like: + ignore = Path{this file, has a comma} + which gets interpreted as "this file" OR " has a comma". + unison should be escaping that comma and write it as \, instead. + +**** Please let me say + root = ~/bla + instead of requiring me to give an absolute path to my home dir. + **** The archive should indicate whether it is case-dependant or not. (This is important for correctness -- if the case-insensitive flag is set differently on different runs, things can get very confused!) Modified: trunk/src/abort.ml =================================================================== --- trunk/src/abort.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/abort.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/abort.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let debug = Trace.debug "abort" let files = ref ([] : Uutil.File.t list) Modified: trunk/src/case.ml =================================================================== --- trunk/src/case.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/case.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/case.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* The update detector, reconciler, and transporter behave differently *) (* depending on whether the local and/or remote file system is case *) (* insensitive. This pref is set during the initial handshake if any one of *) Modified: trunk/src/case.mli =================================================================== --- trunk/src/case.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/case.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/case.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) val insensitive : unit -> bool Modified: trunk/src/checksum.ml =================================================================== --- trunk/src/checksum.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/checksum.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/checksum.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* The checksum (or fast fingerprinting) algorithm must be fast and has to *) (* be called in a rolling fashion (i.e. we must be able to calculate a new *) (* checksum when provided the current checksum, the outgoing character and *) Modified: trunk/src/checksum.mli =================================================================== --- trunk/src/checksum.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/checksum.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/checksum.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) type t = int type u = int array Modified: trunk/src/clroot.ml =================================================================== --- trunk/src/clroot.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/clroot.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/clroot.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* This file parses the unison command-line arguments that specify replicas. The syntax for replicas is based on that of Modified: trunk/src/clroot.mli =================================================================== --- trunk/src/clroot.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/clroot.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/clroot.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Command-line roots *) type clroot = Modified: trunk/src/common.ml =================================================================== --- trunk/src/common.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/common.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/common.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + type hostname = string (* Canonized roots *) Modified: trunk/src/common.mli =================================================================== --- trunk/src/common.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/common.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/common.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (***************************************************************************) (* COMMON TYPES USED BY ALL MODULES *) Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/copy.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/copy.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let (>>=) = Lwt.bind let debug = Trace.debug "copy" Modified: trunk/src/external.ml =================================================================== --- trunk/src/external.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/external.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/external.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (*****************************************************************************) (* RUNNING EXTERNAL PROGRAMS *) (*****************************************************************************) Modified: trunk/src/external.mli =================================================================== --- trunk/src/external.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/external.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/external.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) val runExternalProgram : string -> Unix.process_status * string val readChannelTillEof : in_channel -> string Modified: trunk/src/fileinfo.ml =================================================================== --- trunk/src/fileinfo.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fileinfo.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/fileinfo.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let debugV = Util.debug "fileinfo+" type typ = [ `ABSENT | `FILE | `DIRECTORY | `SYMLINK ] Modified: trunk/src/fileinfo.mli =================================================================== --- trunk/src/fileinfo.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fileinfo.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileinfo.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) type typ = [`ABSENT | `FILE | `DIRECTORY | `SYMLINK] val type2string : typ -> string Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/files.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/files.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common open Lwt open Fileinfo Modified: trunk/src/files.mli =================================================================== --- trunk/src/files.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/files.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/files.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* As usual, these functions should only be called by the client (i.e., in *) (* the same address space as the user interface). *) Modified: trunk/src/fileutil.ml =================================================================== --- trunk/src/fileutil.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fileutil.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/fileutil.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* Convert backslashes in a string to forward slashes. Useful in Windows. *) let backslashes2forwardslashes s0 = try Modified: trunk/src/fileutil.mli =================================================================== --- trunk/src/fileutil.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fileutil.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileutil.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Convert backslashes in a string to forward slashes. Useful in Windows. *) val backslashes2forwardslashes : string -> string Modified: trunk/src/fingerprint.ml =================================================================== --- trunk/src/fingerprint.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fingerprint.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/fingerprint.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* NOTE: IF YOU CHANGE TYPE "FINGERPRINT", THE ARCHIVE FORMAT CHANGES; *) (* INCREMENT "UPDATE.ARCHIVEFORMAT" *) type t = string Modified: trunk/src/fingerprint.mli =================================================================== --- trunk/src/fingerprint.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fingerprint.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fingerprint.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) type t Modified: trunk/src/fspath.ml =================================================================== --- trunk/src/fspath.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fspath.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/fspath.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* Defines an abstract type of absolute filenames (fspaths). Keeping the *) (* type abstract lets us enforce some invariants which are important for *) (* correct behavior of some system calls. *) Modified: trunk/src/fspath.mli =================================================================== --- trunk/src/fspath.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/fspath.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fspath.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Defines an abstract type of absolute filenames (fspaths) *) Modified: trunk/src/globals.ml =================================================================== --- trunk/src/globals.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/globals.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/globals.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common let debug = Trace.debug "globals" Modified: trunk/src/globals.mli =================================================================== --- trunk/src/globals.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/globals.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/globals.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Global variables and functions needed by top-level modules and user *) (* interfaces *) Modified: trunk/src/linkgtk.ml =================================================================== --- trunk/src/linkgtk.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/linkgtk.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,19 @@ (* Unison file synchronizer: src/linkgtk.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + module TopLevel = Main.Body(Uigtk.Body) Modified: trunk/src/linkgtk2.ml =================================================================== --- trunk/src/linkgtk2.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/linkgtk2.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,19 @@ (* Unison file synchronizer: src/linkgtk2.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + module TopLevel = Main.Body(Uigtk2.Body) Modified: trunk/src/linktext.ml =================================================================== --- trunk/src/linktext.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/linktext.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,19 @@ (* Unison file synchronizer: src/linktext.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + module TopLevel = Main.Body(Uitext.Body) Modified: trunk/src/linktk.ml =================================================================== --- trunk/src/linktk.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/linktk.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,19 @@ (* Unison file synchronizer: src/linktk.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + module TopLevel = Main.Body(Uitk.Body) Modified: trunk/src/lock.ml =================================================================== --- trunk/src/lock.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/lock.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/lock.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let rename oldFile newFile = begin try Unix.link oldFile newFile with Unix.Unix_error _ -> () end; let res = try (Unix.LargeFile.stat oldFile).Unix.LargeFile.st_nlink = 2 Modified: trunk/src/lock.mli =================================================================== --- trunk/src/lock.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/lock.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lock.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* A simple utility module for setting and releasing inter-process locks using entries in the filesystem. *) Modified: trunk/src/lwt/pqueue.ml =================================================================== --- trunk/src/lwt/pqueue.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/lwt/pqueue.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/lwt/pqueue.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + module type OrderedType = sig type t Modified: trunk/src/lwt/pqueue.mli =================================================================== --- trunk/src/lwt/pqueue.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/lwt/pqueue.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lwt/pqueue.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) module type OrderedType = sig Modified: trunk/src/main.ml =================================================================== --- trunk/src/main.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/main.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/main.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* ---------------------------------------------------------------------- *) (* This is the main program -- the thing that gets executed first when Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/mkProjectInfo.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -103,3 +103,4 @@ + Modified: trunk/src/name.ml =================================================================== --- trunk/src/name.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/name.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/name.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* NOTE: IF YOU CHANGE TYPE "NAME", THE ARCHIVE FORMAT CHANGES; INCREMENT "UPDATE.ARCHIVEFORMAT" *) type t = string Modified: trunk/src/name.mli =================================================================== --- trunk/src/name.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/name.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/name.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) type t Modified: trunk/src/os.ml =================================================================== --- trunk/src/os.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/os.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/os.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* This file attempts to isolate operating system specific details from the *) (* rest of the program. *) Modified: trunk/src/os.mli =================================================================== --- trunk/src/os.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/os.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/os.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) val myCanonicalHostName : string Modified: trunk/src/osx.ml =================================================================== --- trunk/src/osx.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/osx.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/osx.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + external isMacOSXPred : unit -> bool = "isMacOSX" let isMacOSX = isMacOSXPred () Modified: trunk/src/osx.mli =================================================================== --- trunk/src/osx.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/osx.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/osx.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) val init : bool -> unit val isMacOSX : bool Modified: trunk/src/path.ml =================================================================== --- trunk/src/path.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/path.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/path.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* Defines an abstract type of relative pathnames *) type 'a path = string Modified: trunk/src/path.mli =================================================================== --- trunk/src/path.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/path.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/path.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Abstract type of relative pathnames *) type 'a path Modified: trunk/src/pixmaps.ml =================================================================== --- trunk/src/pixmaps.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/pixmaps.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/pixmaps.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let copyAB color = [| (* width height num_colors chars_per_pixel *) " 28 14 2 1"; Modified: trunk/src/pred.ml =================================================================== --- trunk/src/pred.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/pred.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/pred.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let debug = Util.debug "pred" (********************************************************************) Modified: trunk/src/pred.mli =================================================================== --- trunk/src/pred.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/pred.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pred.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Predicates over paths. Modified: trunk/src/props.ml =================================================================== --- trunk/src/props.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/props.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/props.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let debug = Util.debug "props" module type S = sig Modified: trunk/src/props.mli =================================================================== --- trunk/src/props.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/props.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/props.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* File properties: time, permission, length, etc. *) Modified: trunk/src/recon.ml =================================================================== --- trunk/src/recon.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/recon.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/recon.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common (* ------------------------------------------------------------------------- *) Modified: trunk/src/recon.mli =================================================================== --- trunk/src/recon.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/recon.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/recon.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) val reconcileAll : Common.updateItem list Common.oneperpath Modified: trunk/src/remote.ml =================================================================== --- trunk/src/remote.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/remote.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/remote.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* XXX - Check exception handling Modified: trunk/src/remote.mli =================================================================== --- trunk/src/remote.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/remote.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/remote.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) module Thread : sig val unwindProtect : (unit -> 'a Lwt.t) -> (exn -> unit Lwt.t) -> 'a Lwt.t Modified: trunk/src/sortri.ml =================================================================== --- trunk/src/sortri.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/sortri.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/sortri.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common let dbgsort = Util.debug "sort" Modified: trunk/src/sortri.mli =================================================================== --- trunk/src/sortri.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/sortri.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/sortri.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Sort a list of recon items according to the current setting of various preferences (defined in sort.ml, and accessible from the Modified: trunk/src/stasher.ml =================================================================== --- trunk/src/stasher.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/stasher.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,7 +1,22 @@ (* Unison file synchronizer: src/stasher.ml *) (* $I2: Last modified by lescuyer *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* --------------------------------------------------------------------------*) (* Preferences for backing up and stashing *) Modified: trunk/src/strings.mli =================================================================== --- trunk/src/strings.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/strings.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/strings.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) val docs : (string * (string * string)) list Modified: trunk/src/test.ml =================================================================== --- trunk/src/test.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/test.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/test.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let (>>=) = Lwt.(>>=) (* ---------------------------------------------------------------------- *) Modified: trunk/src/test.mli =================================================================== --- trunk/src/test.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/test.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/test.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Internal self-tests *) Modified: trunk/src/transfer.ml =================================================================== --- trunk/src/transfer.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/transfer.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/transfer.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* rsync compression algorithm To compress, we use a compression buffer with a size a lot Modified: trunk/src/transfer.mli =================================================================== --- trunk/src/transfer.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/transfer.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transfer.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Rsync : general algorithm description Modified: trunk/src/transport.ml =================================================================== --- trunk/src/transport.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/transport.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/transport.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common open Lwt Modified: trunk/src/transport.mli =================================================================== --- trunk/src/transport.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/transport.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transport.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Executes the actions implied by the reconItem list. *) val transportItem : Modified: trunk/src/tree.ml =================================================================== --- trunk/src/tree.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/tree.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/tree.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + type ('a, 'b) t = Node of ('a * ('a, 'b) t) list * 'b option | Leaf of 'b Modified: trunk/src/tree.mli =================================================================== --- trunk/src/tree.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/tree.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/tree.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* An ('a, 'b) t is a tree with 'a-labeled arcs and 'b-labeled nodes. *) (* Labeling for the internal nodes is optional *) Modified: trunk/src/ubase/rx.ml =================================================================== --- trunk/src/ubase/rx.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/rx.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,20 @@ (* Unison file synchronizer: src/ubase/rx.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + (* Inspired by some code and algorithms from Mark William Hopkins (regexp.tar.gz, available in the comp.compilers file archive) Modified: trunk/src/ubase/rx.mli =================================================================== --- trunk/src/ubase/rx.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/rx.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/rx.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) type t Modified: trunk/src/ubase/safelist.ml =================================================================== --- trunk/src/ubase/safelist.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/safelist.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/ubase/safelist.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let filterBoth f l = let rec loop r1 r2 = function [] -> (List.rev r1, List.rev r2) Modified: trunk/src/ubase/safelist.mli =================================================================== --- trunk/src/ubase/safelist.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/safelist.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/safelist.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* All functions here are tail recursive and will work for arbitrary sized lists (unlike some of the standard ones). The intention is that Modified: trunk/src/ubase/trace.ml =================================================================== --- trunk/src/ubase/trace.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/trace.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/ubase/trace.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (* ---------------------------------------------------------------------- *) (* Choosing where messages go *) Modified: trunk/src/ubase/trace.mli =================================================================== --- trunk/src/ubase/trace.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/trace.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/trace.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* ---------------------------------------------------------------------- *) (* Debugging support *) Modified: trunk/src/ubase/uarg.ml =================================================================== --- trunk/src/ubase/uarg.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/uarg.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/uarg.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* by Xavier Leroy, projet Cristal, INRIA Rocquencourt *) (* Slightly modified by BCP, July 1999 *) Modified: trunk/src/ubase/util.ml =================================================================== --- trunk/src/ubase/util.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/util.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/ubase/util.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (*****************************************************************************) (* CASE INSENSITIVE COMPARISON *) (*****************************************************************************) Modified: trunk/src/ubase/util.mli =================================================================== --- trunk/src/ubase/util.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ubase/util.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/util.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Miscellaneous utility functions and datatypes *) Modified: trunk/src/ui.mli =================================================================== --- trunk/src/ui.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/ui.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ui.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* The module Ui provides only the user interface signature. Implementations are provided by Uitext and Uitk. *) Modified: trunk/src/uicommon.ml =================================================================== --- trunk/src/uicommon.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uicommon.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/uicommon.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common open Lwt Modified: trunk/src/uicommon.mli =================================================================== --- trunk/src/uicommon.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uicommon.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uicommon.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* Kinds of UI *) type interface = Modified: trunk/src/uigtk2.ml =================================================================== --- trunk/src/uigtk2.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uigtk2.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/uigtk2.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common open Lwt Modified: trunk/src/uigtk2.mli =================================================================== --- trunk/src/uigtk2.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uigtk2.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/uigtk2.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) module Body : Uicommon.UI Modified: trunk/src/uimacnew/uimacnew.xcodeproj/project.pbxproj =================================================================== --- trunk/src/uimacnew/uimacnew.xcodeproj/project.pbxproj 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uimacnew/uimacnew.xcodeproj/project.pbxproj 2009-05-02 01:57:23 UTC (rev 320) @@ -669,7 +669,7 @@ baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */; buildSettings = { LIBRARY_SEARCH_PATHS = ""; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; USER_HEADER_SEARCH_PATHS = $OCAMLLIBDIR; }; name = Development; Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uitext.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/uitext.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common open Lwt Modified: trunk/src/uitext.mli =================================================================== --- trunk/src/uitext.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uitext.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/uitext.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) module Body : Uicommon.UI Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/update.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/update.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + open Common let (>>=) = Lwt.(>>=) @@ -650,7 +665,7 @@ ("When this preference is set, Unison will ignore any lock files " ^ "that may have been left over from a previous run of Unison that " ^ "was interrupted while reading or writing archive files; by default, " - ^ "when Unison sees these lock files it will stop and request manual" + ^ "when Unison sees these lock files it will stop and request manual " ^ "intervention. This " ^ "option should be set only if you are {\\em positive} that no other " ^ "instance of Unison might be concurrently accessing the same archive " Modified: trunk/src/update.mli =================================================================== --- trunk/src/update.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/update.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/update.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) module NameMap : Map.S with type key = Name.t Modified: trunk/src/uutil.ml =================================================================== --- trunk/src/uutil.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uutil.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/uutil.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + (*****************************************************************************) (* Unison name and version *) (*****************************************************************************) Modified: trunk/src/uutil.mli =================================================================== --- trunk/src/uutil.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/uutil.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uutil.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* This module collects a number of low-level, Unison-specific utility functions. It is kept separate from the Util module so that that module Modified: trunk/src/xferhint.ml =================================================================== --- trunk/src/xferhint.ml 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/xferhint.ml 2009-05-02 01:57:23 UTC (rev 320) @@ -1,6 +1,21 @@ (* Unison file synchronizer: src/xferhint.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + let debug = Trace.debug "xferhint" let xferbycopying = Modified: trunk/src/xferhint.mli =================================================================== --- trunk/src/xferhint.mli 2009-04-29 14:36:48 UTC (rev 319) +++ trunk/src/xferhint.mli 2009-05-02 01:57:23 UTC (rev 320) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/xferhint.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) (* This module maintains a cache that can be used to map an Os.fingerprint to a (Fspath.t * Path.t) naming a file that *may* From bcpierce at seas.upenn.edu Fri May 1 22:30:33 2009 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Fri, 1 May 2009 22:30:33 -0400 Subject: [Unison-hackers] [unison-svn] r321 - in trunk: doc src Message-ID: <200905020230.n422UXLR006632@yaws.seas.upenn.edu> Author: bcpierce Date: 2009-05-01 22:30:31 -0400 (Fri, 01 May 2009) New Revision: 321 Modified: trunk/doc/changes.tex trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/strings.ml Log: * Move descriptions of recent changes to documentation. Modified: trunk/doc/changes.tex =================================================================== --- trunk/doc/changes.tex 2009-05-02 01:57:23 UTC (rev 320) +++ trunk/doc/changes.tex 2009-05-02 02:30:31 UTC (rev 321) @@ -1,24 +1,142 @@ +\begin{changesfromversion}{2.31} +\item Small user interface changes +\begin{itemize} +\item Small change to text UI "scanning..." messages, to print just + directories (hopefully making it clearer that individual files are + not necessarily being fingerprinted). +\end{itemize} +\item Minor fixes and improvements: +\begin{itemize} +\item Ignore one hour differences when deciding whether a file may have + been updated. This avoids slow update detection after daylight + saving time changes under Windows. This makes Unison slightly more + likely to miss an update, but it should be safe enough. +\item Fix a small bug that was affecting mainly windows users. We need to + commit the archives at the end of the sync even if there are no + updates to propagate because some files (in fact, if we've just + switched to DST on windows, a LOT of files) might have new modtimes + in the archive. (Changed the text UI only. It's less clear where + to change the GUI.) +\item Don't delete the temp file when a transfer fails due to a + fingerprint mismatch (so that we can have a look and see why!) We've also + added more debugging code togive more informative error messages when we + encounter the dreaded and longstanding "assert failed during file + transfer" bug +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.27} +\item If Unison is interrupted during a directory transfer, it will now +leave the partially transferred directory intact in a temporary +location. (This maintains the invariant that new files/directories are +transferred either completely or not at all.) The next time Unison is run, +it will continue filling in this temporary directory, skipping transferring +files that it finds are already there. +\item We've added experimental support for invoking an external file +transfer tool for whole-file copies instead of Unison's built-in transfer +protocol. Three new preferences have been added: +\begin{itemize} +\item {\tt copyprog} is a string giving the name (and command-line +switches, if needed) of an external program that can be used to copy large +files efficiently. By default, rsync is invoked, but other tools such as +scp can be used instead by changing the value of this preference. (Although +this is not its primary purpose, rsync is actually a pretty fast way of +copying files that don't already exist on the receiving host.) For files +that do already exist on (but that have been changed in one replica), Unison +will always use its built-in implementation of the rsync algorithm. +\item Added a "copyprogrest" preference, so that we can give different +command lines for invoking the external copy utility depending on whether a +partially transferred file already exists or not. (Rsync doesn't seem to +care about this, but other utilities may.) +\item {\tt copythreshold} is an integer (-1 by default), indicating above what +filesize (in megabytes) Unison should use the external copying utility +specified by copyprog. Specifying 0 will cause ALL copies to use the +external program; a negative number will prevent any files from using it. +(Default is -1.) +\end{itemize} +Thanks to Alan Schmitt for a huge amount of hacking and to an anonymous +sponsor for suggesting and underwriting this extension. +\item Small improvements: +\begin{itemize} +\item Added a new preference, {\tt dontchmod}. By default, Unison uses the +{\tt chmod} system call to set the permission bits of files after it has +copied them. But in some circumstances (and under some operating systems), +the chmod call always fails. Setting this preference completely prevents +Unison from ever calling {\tt chmod}. +\item Don't ignore files that look like backup files if the {\tt + backuplocation} preference is set to {\tt central} +\item Shortened the names of several preferences. The old names are also +still supported, for backwards compatibility, but they do not appear in the +documentation. +\item Lots of little documentation tidying. (In particular, preferences are +separated into Basic and Advanced! This should hopefully make Unison a +little more approachable for new users. +\item Unison can sometimes fail to transfer a file, giving the unhelpful +message "Destination updated during synchronization" even though the file +has not been changed. This can be caused by programs that change either the +file's contents \emph{or} the file's extended attributes without changing +its modification time. It's not clear what is the best fix for this -- it +is not Unison's fault, but it makes Unison's behavior puzzling -- but at +least Unison can be more helpful about suggesting a workaround (running once +with {\tt fastcheck} set to false). The failure message has been changed to +give this advice. +\item Further improvements to the OS X GUI (thanks to Alan Schmitt and Craig +Federighi). +\end{itemize} +\item Very preliminary support for triggering Unison from an external + filesystem-watching utility. The current implementation is very + simple, not efficient, and almost completely untested---not ready + for real users. But if someone wants to help improve it (e.g., + by writing a filesystem watcher for your favorite OS), please make + yourself known! + + On the Unison side, the new behavior is very simple: + \begin{itemize} + \item use the text UI + \item start Unison with the command-line flag "-repeat FOO", + where FOO is name of a file where Unison should look + for notifications of changes + \item when it starts up, Unison will read the whole contents + of this file (on both hosts), which should be a + newline-separated list of paths (relative to the root + of the synchronization) and synchronize just these paths, + as if it had been started with the "-path=xxx" option for + each one of them + \item when it finishes, it will sleep for a few seconds and then + examine the watchfile again; if anything has been added, it + will read the new paths, synchronize them, and go back to + sleep + \item that's it! + \end{itemize} + To use this to drive Unison "incrementally," just start it in + this mode and start up a tool (on each host) to watch for + new changes to the filesystem and append the appropriate paths + to the watchfile. Hopefully such tools should not be too hard + to write. +\item Bug fixes: +\begin{itemize} +\item Fixed a bug that was causing new files to be created with + permissions 0x600 instead of using a reasonable default (like + 0x644), if the 'perms' flag was set to 0. (Bug reported by Ben + Crowell.) +\item Follow maxthreads preference when transferring directories. +\end{itemize} +\end{changesfromversion} + \begin{changesfromversion}{2.17} \item Major rewrite and cleanup of the whole Mac OS X graphical user interface by Craig Federighi. Thanks, Craig!!! - \item Small fix to ctime (non-)handling in update detection under windows with fastcheck. -\end{changesfromversion} - -\begin{changesfromversion}{2.17} \item Several small fixes to the GTK2 UI to make it work better under Windows [thanks to Karl M for these]. - \item The backup functionality has been completely rewritten. The external interface has not changed, but numerous bugs, irregular behaviors, and cross-platform inconsistencies have been corrected. - \item The Unison project now accepts donations via PayPal. If you'd like to donate, you can find a link to the donation page on the \URL{http://www.cis.upenn.edu/~bcpierce/unison/lists.html}{Unison home page}. - \item Some important safety improvements: \begin{itemize} \item Added a new \verb|mountpoint| preference, which can be used to specify @@ -26,13 +144,11 @@ (otherwise Unison aborts). This can be used to avoid potentially dangerous situations when Unison is used with removable media such as external hard drives and compact flash cards. - \item The confirmation of ``big deletes'' is now controlled by a boolean preference \verb|confirmbigdeletes|. Default is true, which gives the same behavior as previously. (This functionality is at least partly superceded by the \verb|mountpoint| preference, but it has been left in place in case it is useful to some people.) - \item If Unison is asked to ``follow'' a symbolic link but there is nothing at the other end of the link, it will now flag this path as an error, rather than treating the symlink itself as missing or deleted. @@ -47,37 +163,28 @@ \item Added \verb|forcepartial| and \verb|preferpartial| preferences, which behave like \verb|force| and \verb|prefer| but can be specified on a per-path basis. [Thanks to Alan Schmitt for this.] - \item A bare-bones self test feature was added, which runs unison through some of its paces and checks that the results are as expected. The coverage of the tests is still very limited, but the facility has already been very useful in debugging the new backup functionality (especially in exposing some subtle cross-platform issues). - \item Refined debugging code so that the verbosity of individual modules can be controlled separately. Instead of just putting '-debug verbose' on the command line, you can put '-debug update+', which causes all the extra messages in the Update module, but not other modules, to be printed. Putting '-debug verbose' causes all modules to print with maximum verbosity. - \item Removed \verb|mergebatch| preference. (It never seemed very useful, and its semantics were confusing.) - \item Rewrote some of the merging functionality, for better cooperation with external Harmony instances. - \item Changed the temp file prefix from \verb|.#| to \verb|.unison|. - \item Compressed the output from the text user interface (particularly when run with the \verb|-terse| flag) to make it easier to interpret the results when Unison is run several times in succession from a script. - \item Diff and merge functions now work under Windows. - \item Changed the order of arguments to the default diff command (so that the + and - annotations in diff's output are reversed). - \item Added \verb|.mpp| files to the ``never fastcheck'' list (like \verb|.xls| files). \end{itemize} @@ -134,24 +241,20 @@ internals have been rationalized and there are a number of new features. See the manual (in particular, the description of the \verb|backupXXX| preferences) for details. - \item Incorporated patches for ipv6 support, contributed by Samuel Thibault. (Note that, due to a bug in the released OCaml 3.08.3 compiler, this code will not actually work with ipv6 unless compiled with the CVS version of the OCaml compiler, where the bug has been fixed; however, ipv4 should continue to work normally.) - \item OSX interface: \begin{itemize} \item Incorporated Ben Willmore's cool new icon for the Mac UI. \end{itemize} - \item Small fixes: \begin{itemize} \item Fixed off by one error in month numbers (in printed dates) reported by Bob Burger \end{itemize} - \end{changesfromversion} \begin{changesfromversion}{2.12.0} @@ -169,14 +272,11 @@ (without changing the major version number) and new tarballs re-released as needed. When this process converges, the patched beta version will be dubbed stable. - \item Warning (failure in batch mode) when one path is completely emptied. This prevents Unison from deleting everything on one replica when the other disappear. - \item Fix diff bug (where no difference is shown the first time the diff command is given). - \item User interface changes: \begin{itemize} \item Improved workaround for button focus problem (GTK2 UI) @@ -197,7 +297,6 @@ \item Include profile name in the GTK2 window name \item Added bindings ',' (same as '<') and '.' (same as '>') in the GTK2 UI \end{itemize} - \item Mac GUI: \begin{itemize} \item actions like < and > scroll to the next item as necessary. @@ -214,8 +313,6 @@ \item Size of left and right columns is now large enough so that "PropsChanged" is not cut off. \end{itemize} - - \item Minor changes: \begin{itemize} \item Disable multi-threading when both roots are local @@ -241,12 +338,10 @@ they occur in the diff preference \item Improvements to syncing resource forks between Macs via a non-Mac system. \end{itemize} - \end{changesfromversion} \begin{changesfromversion}{2.10.2} \item \incompatible{} Archive format has changed. - \item Source code availability: The Unison sources are now managed using Subversion. One nice side-effect is that anonymous checkout is now possible, like this: @@ -257,7 +352,6 @@ (modulo one day) sources in the web export directory. To receive commit logs for changes to the sources, subscribe to the \verb|unison-hackers| list (\ONEURL{http://www.cis.upenn.edu/~bcpierce/unison/lists.html}). - \item Text user interface: \begin{itemize} \item Substantial reworking of the internal logic of the text UI to make it @@ -266,7 +360,6 @@ the client is running on a Unix system and the {\tt EMACS} environment variable is set to anything other than the empty string. \end{itemize} - \item Native OS X gui: \begin{itemize} \item Added a synchronize menu item with keyboard shortcut @@ -274,7 +367,6 @@ \item Fixes to compile for Panther \item Miscellaneous improvements and bugfixes \end{itemize} - \item Small changes: \begin{itemize} \item Changed the filename checking code to apply to Windows only, instead @@ -316,9 +408,7 @@ Warning: the new merging functionality is not completely compatible with old versions! Check the manual for details. - \item Files larger than 2Gb are now supported. - \item Added preliminary (and still somewhat experimental) support for the Apple OS X operating system. \begin{itemize} @@ -341,7 +431,6 @@ \item Minor functionality changes: \begin{itemize} - \item Added an {\tt ignorelocks} preference, which forces Unison to override left-over archive locks. (Setting this preference is dangerous! Use it only if you are positive you know what you are doing.) @@ -357,7 +446,6 @@ {\tt assumeContentsAreImmutableNot}, which overrides the first, similarly to {\tt ignorenot}. (Later amendment: these preferences are now called {\tt immutable} and {\tt immutablenot}.) - \item The {\tt ignorecase} flag has been changed from a boolean to a three-valued preference. The default setting, called {\tt default}, checks the operating systems running on the client and server and ignores filename case if either of them is @@ -365,40 +453,33 @@ this behavior. If you have been setting {\tt ignorecase} on the command line using {\tt -ignorecase=true} or {\tt -ignorecase=false}, you will need to change to {\tt -ignorecase true} or {\tt -ignorecase false}. - \item a new preference, 'repeat', for the text user interface (only). If 'repeat' is set to a number, then, after it finishes synchronizing, Unison will wait for that many seconds and then start over, continuing this way until it is killed from outside. Setting repeat to true will automatically set the batch preference to true. - \item Excel files are now handled specially, so that the {\tt fastcheck} optimization is skipped even if the {\tt fastcheck} flag is set. (Excel does some naughty things with modtimes, making this optimization unreliable and leading to failures during change propagation.) - \item The ignorecase flag has been changed from a boolean to a three-valued preference. The default setting, called 'default', checks the operating systems running on the client and server and ignores filename case if either of them is OSX or Windows. Setting ignorecase to 'true' or 'false' overrides this behavior. - \item Added a new preference, 'repeat', for the text user interface (only, at the moment). If 'repeat' is set to a number, then, after it finishes synchronizing, Unison will wait for that many seconds and then start over, continuing this way until it is killed from outside. Setting repeat to true will automatically set the batch preference to true. - \item The 'rshargs' preference has been split into 'rshargs' and 'sshargs' (mainly to make the documentation clearer). In fact, 'rshargs' is no longer mentioned in the documentation at all, since pretty much everybody uses ssh now anyway. \end{itemize} - \item Documentation \begin{itemize} \item The web pages have been completely redesigned and reorganized. (Thanks to Alan Schmitt for help with this.) \end{itemize} - \item User interface improvements \begin{itemize} \item Added a GTK2 user interface, capable (among other things) of displaying filenames @@ -412,7 +493,6 @@ \item Several small improvements to the text user interface, including a progress display. \end{itemize} - \item Bug fixes (too numerous to count, actually, but here are some): \begin{itemize} \item The {\tt maxthreads} preference works now. @@ -432,7 +512,6 @@ \item Incorporated a fix by Dmitry Bely for setting utimes of read-only files on Win32 systems. \end{itemize} - \item Installation / portability: \begin{itemize} \item Unison now compiles with OCaml version 3.07 and later out of the box. @@ -491,11 +570,11 @@ Unix \item Small improvements: \begin{itemize} - \item If neither the {\\tt USERPROFILE} nor the {\\tt HOME} environment + \item If neither the {\tt USERPROFILE} nor the {\tt HOME} environment variables are set, then Unison will put its temporary commit log - (called {\\tt DANGER.README}) into the directory named by the - {\\tt UNISON} environment variable, if any; otherwise it will use - {\\tt C:}. + (called {\tt DANGER.README}) into the directory named by the + {\tt UNISON} environment variable, if any; otherwise it will use + {\tt C:}. \item alternative set of values for fastcheck: yes = true; no = false; default = auto. \item -silent implies -contactquietly @@ -549,7 +628,7 @@ update detection are now noted in the log file. \item \verb|[END]| messages in log now use a briefer format \item Changed the text UI startup sequence so that - {\\tt ./unison -ui text} will use the default profile instead of failing. + {\tt ./unison -ui text} will use the default profile instead of failing. \item Made some improvements to the error messages. \item Added some debugging messages to remote.ml. \end{itemize} Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2009-05-02 01:57:23 UTC (rev 320) +++ trunk/src/RECENTNEWS 2009-05-02 02:30:31 UTC (rev 321) @@ -1,527 +1,6 @@ -CHANGES FROM VERSION 2.32.6 +CHANGES FROM VERSION 2.32.7 -* Update copyright notices and add GPLv3 boilerplate to .ml files - (.mli files are left with a short copyright line, to reduce clutter) +* Move descriptions of recent changes to documentation. -------------------------------- -CHANGES FROM VERSION 2.32.5 -* Update copyright notices and add GPLv3 boilerplate to .ml files - (.mli files are left with a short copyright line, to reduce clutter) - -* Ignore one hour differences for deciding whether a file may have - been updated. This avoids slow update detection after daylight - saving time changes under Windows. This makes it slightly more - likely to miss an update, but that should be safe enough. - -CHANGES FROM VERSION 2.32.4 - -* Text UI now includes the current time in its completion message - -* Fix a small bug that was affecting mainly windows users. We need to - commit the archives at the end of the sync even if there are no - updates to propagate because some files (in fact, if we've just - switched to DST on windows, a LOT of files) might have new modtimes - in the archive. (Changed the text UI only. It's less clear where - to change the GUI.) - -* Small improvement to text UI "scanning..." messages, to print just - directories (hopefully making it clearer that individual files are - not necessarily being fingerprinted). - - ------------------------------- -CHANGES FROM VERSION 2.32.2 - -* Don't delete the temp file when a transfer fails due to a - fingerprint mismatch (so that we can have a look and see why!) - -------------------------------- -CHANGES FROM VERSION 2.32.1 - -* Applied a patch from Karl M to make the GTK2 version build with - OCaml 3.11 on Windows. - -* Don't use shortcuts or external copy programs to transfer - zero-length files (to avoid confusing status messages about - shortcut-copying completely unrelated files that happen to also have - zero length!). - -------------------------------- -CHANGES FROM VERSION 2.32.0 - -* Bumped version number to reflect newly added preference - -------------------------------- -CHANGES FROM VERSION 2.31.11 - -* Fixed a bug that was causing new files to be created with - permissions 0x600 instead of using a reasonable default (like - 0x644), if the 'perms' flag was set to 0. (Bug reported by Ben - Crowell.) - -* Added a new preference, 'dontchmod'. By default, Unison uses the - 'chmod' system call to set the permission bits of files after it has - copied them. But in some circumstances (and under some operating - systems), the chmod call always fails. Setting this preference - completely prevents Unison from ever calling chmod. - -* Add some suggestions to TODO file - -------------------------------- -CHANGES FROM VERSION 2.31.10 - -* Another slight tweak. - -------------------------------- -CHANGES FROM VERSION 2.31.9 - -* Slight tweak to the last commit, suggested by Rasmus. - -------------------------------- -CHANGES FROM VERSION 2.31.8 - -* (Forgot to add a couple of new files.) - -------------------------------- -CHANGES FROM VERSION 2.31.5 - -* A special hack for Rasmus, who has a special situation that requires - the utimes-setting program to run 'setuid root' (and we do not want - all of Unison to run setuid, so we just spin off an external utility - to do it). This functionality is disabled by default and requires - editing the source code (changing 'false' to 'true' on line 496 of - props.ml) and recompiling to enable. If there are other people that - want it, we can easily make it accessible using a preference - instead, but I prefer not to add a preference until someone else - requests it, to avoid creating an incompatible version. - -* Logging tweak. - -------------------------------- -CHANGES FROM VERSION 2.31.5 - -* A special hack for Rasmus, who has a special situation that requires - the utimes-setting program to run 'setuid root' (and we do not want - all of Unison to run setuid, so we just spin off an external utility - to do it). This functionality is disabled by default and requires - editing the source code (changing 'false' to 'true' on line 496 of - props.ml) and recompiling to enable. If there are other people that - want it, we can easily make it accessible using a preference - instead, but I prefer not to add a preference until someone else - requests it, to avoid creating an incompatible version. - -* Logging tweak. - -* Resizing the update window vertically no longer moves the status - label. Fix contributed by Pedro Melo. - -------------------------------- - -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. - -* Applied patch from Antoine Reilles for NetBSD compilation - -* Makefile tidying - -------------------------------- -CHANGES FROM VERSION 2.31.2 - -* Added a bit of debugging code for Alan. - -------------------------------- -CHANGES FROM VERSION 2.31.1 - -* Fixed a small bug with resuming interrupted file transfers when both - replicas are local. -------------------------------- -CHANGES FROM VERSION 2.31.-1 - -* Fixed a couple of file-transfer bugs. (One was about copying - resource forks. Another was about restarting interrupted transfers - on files where exactly zero bytes had been transferred so far and - the file had been created with null permissions -- believe it or - not, this is possible with rsync!) This required a protocol change, - so I'm also bumping the version number. - -------------------------------- -CHANGES FROM VERSION 2.30.4 - -* Work on text UI to prepare for new filesystem watcher functionality - -* Record some current TODO items - -------------------------------- -CHANGES FROM VERSION 2.30.3 - -* Update docs - -------------------------------- -CHANGES FROM VERSION 2.30.2 - -fix quoting for Unix - -------------------------------- -CHANGES FROM VERSION 2.30.1 - -- Fixed handling of paths containing spaces when using rsync -- Better error report for fingerprint mismatch -------------------------------- -CHANGES FROM VERSION 2.30.0 - -* A better fix for the "single file transfer failed in large directory" issue. - -------------------------------- -CHANGES FROM VERSION 2.29.9 - -* Trying a possible fix for the "assert failure in remote.ml" bug - (thanks Jerome!) - -------------------------------- -CHANGES FROM VERSION 2.29.8 - -* Updated documentation. - -* Shortened the names of several preferences. The old names are also - still supported, for backwards compatibility, but they do not appear - in the documentation. - -------------------------------- -CHANGES FROM VERSION 2.29.7 - -* Squashed a bug in transferring partially transferred directories - containing symlinks. - -* Squashed some more bugs in partial rsync transfers (rsync, oddly, - creates files with zero permissions and then on the next run - discovers that it cannot write to the file it partially wrote - before!). - -* Added a "copyprogrest" preference, so that we can give different - command lines for invoking the external copy utility depending on - whether a partially transferred file already exists or not. (Rsync - doesn't seem to care about this, but other utilities may.) - -------------------------------- -CHANGES FROM VERSION 2.29.7 - -* Squashed a bug in transferring partially transferred directories - containing symlinks. - -* Squashed some more bugs in partial rsync transfers (rsync, oddly, - creates files with zero permissions and then on the next run - discovers that it cannot write to the file it partially wrote - before!). - -* Added a "copyprogrest" preference, so that we can give different - command lines for invoking the external copy utility depending on - whether a partially transferred file already exists or not. (Rsync - doesn't seem to care about this, but other utilities may.) - -------------------------------- -CHANGES FROM VERSION 2.29.6 - -* Fix a small bug in the external copyprog setup. - -------------------------------- -CHANGES FROM VERSION 2.29.5 - -* Lots of little documentation tidying. (In particular, I finally - spent the time to separate preferences into Basic and Advanced! - This should hopefully make Unison a little more approachable for new - users.) - -------------------------------- -CHANGES FROM VERSION 2.29.4 - -* When using the internal transfer method, remove any temp file on the - destination (which may be left over from a previous interrupted run - of Unison) before starting the transfer. - -* Fixed (hopefully!) the bug causing Unison to backup the new archive - version after a (partially or fully) successful merge. - -* Updated copyright notices to 2008. :-) - -------------------------------- -CHANGES FROM VERSION 2.29.3 - -* Updated documentation to describe new features - -* Changed units of copythreshold to kilobytes - -* Added -z to flags for external rsync program -------------------------------- -CHANGES FROM VERSION 2.29.2 - -* Automatically supply "user@" in argument to external copy program. - -------------------------------- -CHANGES FROM VERSION 2.29.1 - -Follow maxthreads preference when transferring directories. -------------------------------- -CHANGES FROM VERSION 2.29.0 - -This version introduces some pretty big changes, by BCP in -collaboration with Alan Schmitt. We've tested them minimally, but -this version should be considered "only for the adventurous" for the -moment. - -* Added some more debugging code to remote.ml to give more informative - error messages when we encounter the (dreaded and longstanding) - "assert failed during file transfer" bug - -* Experimental support for invoking an external file transfer tool for - whole-file copies instead of Unison's built-in transfer protocol. - - Two new preferences have been added: - - - copyprog is a string giving the name (and command-line switches, - if needed) of an external program that can be used to copy large - files efficiently. By default, rsync is invoked, but other - tools such as scp can be used instead by changing the value of - this preference. (Although this is not its primary purpose, - rsync is actually a pretty fast way of copying files that don't - already exist on the receiving host.) For files that do already - exist on (but that have been changed in one replica), Unison - will always use its built-in implementation of the rsync - algorithm. - - - copythreshold is an integer (-1 by default), indicating above - what filesize (in megabytes) Unison should use the external - copying utility specified by copyprog. Specifying 0 will cause - ALL copies to use the external program; a negative number will - prevent any files from using it. (Default is -1.) - -* If Unison is interrupted during a directory transfer, it will now - leave the partially transferred directory intact in a temporary - location. (This maintains the invariant that new files/directories - are transferred either completely or not at all.) The next time - Unison is run, it will continue filling in this temporary directory, - skipping transferring files that it finds are already there. - -------------------------------- -CHANGES FROM VERSION 2.28.51 - -* Propagating changes from 2.27 branch - -------------------------------- -CHANGES FROM VERSION 2.28.51 - -* Propagating changes from 2.27 branch - - -------------------------------- -CHANGES FROM VERSION 2.28.45 - -* Unison can sometimes fail to transfer a file, giving the unhelpful - message "Destination updated during synchronization" even though the - file has not been changed. This can be caused by programs that - change either the file's contents *or* the file's extended - attributes without changing its modification time. I'm not sure - what is the best fix for this -- it is not Unison's fault, but it - makes Unison's behavior puzzling -- but at least Unison can be more - helpful about suggesting a workaround (running once with 'fastcheck' - set to false). The failure message has been changed to give this - advice. - -* Upgraded to GPL version 3 and added copyright notice to - documentation files. - -------------------------------- -CHANGES FROM VERSION 2.28.36 - -* Transfer changes from 2.27 branch - -------------------------------- -------------------------------- -CHANGES FROM VERSION 2.28.29 - -* Propagage changes from 2.27 branch. - - -------------------------------- -CHANGES FROM VERSION 2.28.23 - -* Small improvement to error message when no archive files are - found (thanks to Norman Ramsey). - -* Patch from Karl M for GTK2 UI: - 1) reverts the problematic (when no profile is used) - reloadProfile on the restart button. - 2) it adds a reloadProfile call after the detectCmd for - rescanning unsynchronized items. - 3) it turns off confirmBigDeletes on a rescan and checks it - before issuing a warning popup. - 4) it adjusts the status results width so that everything fits. - -------------------------------- -CHANGES FROM VERSION 2.28.17 - -* Applying a patch from Karl M to make the Restart button reload the - profile in the uigtk2 UI. - -* Fixed a bug in the merge code (new archive was not being backed up). - Minor improvements to the merge code to make it say more about what - it's doing and why. - - -------------------------------- -CHANGES FROM VERSION 2.28.16 - -More Mac UI improvements -* Revert the combo ProgressIndicator / status message (couldn't get the flicker to go away...) -* Improved file change icons - - Lighter color / slight gradient wash - - Icons for Absent (opposite side of an add) and Unmodified (opposite side of a one sided change) -- these give the line balance -* Display panel for errors occuring during Connecting... phase - -------------------------------- -CHANGES FROM VERSION 2.28.15 - -Test commit. - -------------------------------- -CHANGES FROM VERSION 2.28.13 - -* Roll back non-fix for GTK2 UI - -------------------------------- -CHANGES FROM VERSION 2.28.11 - -* Added some files left out of the previous commit. - -* Fix for GTK2 UI, suggested by Karl M - -------------------------------- -CHANGES FROM VERSION 2.28.9 - -* More Mac GUI goodness from Craig. - -Enhancements: - - Default table layout is now outline view (middle choice in outline control) - - Outline layout initial does "smart expand" to open one screen full - - Action icons - Lighter parent icons - - Icons for Left / Right work (Added, Modified, Deleted) - -Bug Fixes: - - Fix problem with file Details not showing - - Sort by Action not working - - Missing status for some items (on right) - - Reset view contents (clear recon items) when re-syncing - - Action icons -- Fix upside-down question mark - - Fix centering of "Connecting..." message when panel is resized - - Force to progress to 100% when done - -Known Issues: - -1) The most controversial "enhancement" here is the replacement of the - text for Left / Right (e.g. "Modified", "Deleted") with more - compact / colorful icons. These icons are perhaps was too "loud", - but Craig thinks that if he can tone them down a bit that this will - be an improvement. [Actually, I like them pretty well as-is.] - - Any icon artists out there? - -2) The rendering of the status message in the main ProgressIndicator - is currently leading to flicker. - -------------------------------- -CHANGES FROM VERSION 2.28.8 - -* Some more files needed for Craig's updated Mac GUI. - -------------------------------- -CHANGES FROM VERSION 2.28.6 - -* More improvements to the OSX GUI from Craig Federighi, including a very - nice new "nested directory" display style and per-file progress bars. Any - unison hackers using Macs are invited to check out the new UI and post - any bugs or suggestions for improvement to the unison-hackers list. - - (There is one known issue that sometimes causes the list of changes to be - redisplayed incorrectly after an Ignore command.) - -------------------------------- -CHANGES FROM VERSION 2.28.5 - -* Add couple of missing files. - -------------------------------- -CHANGES FROM VERSION 2.28.4 - -* Apply experimental patch from Craig Federighi, which seems to fix - the deadlocks and crashes in new OSX UI. (Actually, this is a major - rewrite and cleanup of the whole Cocoa UI.) Thanks, Craig!!! - - It would be great if some Mac users could help stress-test this fix. - -------------------------------- -CHANGES FROM VERSION 2.28.4 - -* Apply experimental patch from Craig Federighi, which seems to fix - the deadlocks and crashes in new OSX UI. (Actually, this is a major - rewrite and cleanup of the whole Cocoa UI.) Thanks, Craig!!! - - It would be great if some Mac users could help stress-test this fix. - -------------------------------- -CHANGES FROM VERSION 2.28.3 - -* Another fix to ctime (non-)handling - -------------------------------- -CHANGES FROM VERSION 2.28.1 - -* Small fix to ctime (non-)handling in update detection under windows - with fastcheck. This *might* fix the bug that Karl M. has reported. - (Copying fix into trunk.) - -------------------------------- -CHANGES FROM VERSION 2.28.-2 - -* Very preliminary support for triggering Unison from an external - filesystem-watching utility. The current implementation is very - simple, not efficient, and almost completely untested. Not ready - for real users. But if someone wants to help me improve it (e.g., - by writing a filesystem watcher for your favorite OS), please let - me know. - - On the Unison side, the new behavior is incredibly simple: - - use the text UI - - start Unison with the command-line flag "-repeat FOO", - where FOO is name of a file where Unison should look - for notifications of changes - - when it starts up, Unison will read the whole contents - of this file (on both hosts), which should be a - newline-separated list of paths (relative to the root - of the synchronization) and synchronize just these paths, - as if it had been started with the "-path=xxx" option for - each one of them - - when it finishes, it will sleep for a few seconds and then - examine the watchfile again; if anything has been added, it - will read the new paths, synchronize them, and go back to - sleep - - that's it! - - To use this to drive Unison "incrementally," just start it in - this mode and start up a tool (on each host) to watch for - new changes to the filesystem and append the appropriate paths - to the watchfile. Hopefully such tools should not be too hard - to write. - - Since I'm an OSX user, I'm particularly interested in writing a - watcher tool for this platform. If anybody knows about - programming against the Spotlight API and can give me a hand, - that would be much appreciated. - -------------------------------- Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2009-05-02 01:57:23 UTC (rev 320) +++ trunk/src/mkProjectInfo.ml 2009-05-02 02:30:31 UTC (rev 321) @@ -104,3 +104,4 @@ + Modified: trunk/src/strings.ml =================================================================== --- trunk/src/strings.ml 2009-05-02 01:57:23 UTC (rev 320) +++ trunk/src/strings.ml 2009-05-02 02:30:31 UTC (rev 321) @@ -4,7 +4,7 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.32.1\n\ + Version 2.32.7\n\ \n\ ")) :: @@ -1154,7 +1154,7 @@ \032-debug xxx debug module xxx ('all' -> everything, 'verbose' -> more)\n\ \032-diff xxx command for showing differences between files\n\ \032-dontchmod When set, never use the chmod system call\n\ - \032-dumbtty do not change terminal settings in text UI (default true)\n\ + \032-dumbtty do not change terminal settings in text UI\n\ \032-fastcheck xxx do fast update detection (true/false/default)\n\ \032-forcepartial xxx add a pattern to the forcepartial list\n\ \032-height n height (in lines) of main window in graphical interface\n\ @@ -1458,7 +1458,7 @@ \032 that may have been left over from a previous run of Unison that\n\ \032 was interrupted while reading or writing archive files; by\n\ \032 default, when Unison sees these lock files it will stop and\n\ - \032 request manualintervention. This option should be set only if\n\ + \032 request manual intervention. This option should be set only if\n\ \032 you are positive that no other instance of Unison might be\n\ \032 concurrently accessing the same archive files (e.g., because\n\ \032 there was only one instance of unison running and it has just\n\ @@ -2582,16 +2582,133 @@ \n\ ")) :: - ("news", ("Changes in Version 2.32.1", - "Changes in Version 2.32.1\n\ + ("news", ("Changes in Version 2.32.7", + "Changes in Version 2.32.7\n\ \n\ + \032 Changes since 2.31:\n\ + \032 * Small user interface changes\n\ + \032 + Small change to text UI \"scanning...\" messages, to print just\n\ + \032 directories (hopefully making it clearer that individual\n\ + \032 files are not necessarily being fingerprinted).\n\ + \032 * Minor fixes and improvements:\n\ + \032 + Ignore one hour differences when deciding whether a file may\n\ + \032 have been updated. This avoids slow update detection after\n\ + \032 daylight saving time changes under Windows. This makes Unison\n\ + \032 slightly more likely to miss an update, but it should be safe\n\ + \032 enough.\n\ + \032 + Fix a small bug that was affecting mainly windows users. We\n\ + \032 need to commit the archives at the end of the sync even if\n\ + \032 there are no updates to propagate because some files (in\n\ + \032 fact, if we've just switched to DST on windows, a LOT of\n\ + \032 files) might have new modtimes in the archive. (Changed the\n\ + \032 text UI only. It's less clear where to change the GUI.)\n\ + \032 + Don't delete the temp file when a transfer fails due to a\n\ + \032 fingerprint mismatch (so that we can have a look and see\n\ + \032 why!) We've also added more debugging code togive more\n\ + \032 informative error messages when we encounter the dreaded and\n\ + \032 longstanding \"assert failed during file transfer\" bug\n\ + \n\ + \032 Changes since 2.27:\n\ + \032 * If Unison is interrupted during a directory transfer, it will now\n\ + \032 leave the partially transferred directory intact in a temporary\n\ + \032 location. (This maintains the invariant that new files/directories\n\ + \032 are transferred either completely or not at all.) The next time\n\ + \032 Unison is run, it will continue filling in this temporary\n\ + \032 directory, skipping transferring files that it finds are already\n\ + \032 there.\n\ + \032 * We've added experimental support for invoking an external file\n\ + \032 transfer tool for whole-file copies instead of Unison's built-in\n\ + \032 transfer protocol. Three new preferences have been added:\n\ + \032 + copyprog is a string giving the name (and command-line\n\ + \032 switches, if needed) of an external program that can be used\n\ + \032 to copy large files efficiently. By default, rsync is\n\ + \032 invoked, but other tools such as scp can be used instead by\n\ + \032 changing the value of this preference. (Although this is not\n\ + \032 its primary purpose, rsync is actually a pretty fast way of\n\ + \032 copying files that don't already exist on the receiving\n\ + \032 host.) For files that do already exist on (but that have been\n\ + \032 changed in one replica), Unison will always use its built-in\n\ + \032 implementation of the rsync algorithm.\n\ + \032 + Added a \"copyprogrest\" preference, so that we can give\n\ + \032 different command lines for invoking the external copy\n\ + \032 utility depending on whether a partially transferred file\n\ + \032 already exists or not. (Rsync doesn't seem to care about\n\ + \032 this, but other utilities may.)\n\ + \032 + copythreshold is an integer (-1 by default), indicating above\n\ + \032 what filesize (in megabytes) Unison should use the external\n\ + \032 copying utility specified by copyprog. Specifying 0 will\n\ + \032 cause ALL copies to use the external program; a negative\n\ + \032 number will prevent any files from using it. (Default is -1.)\n\ + \032 Thanks to Alan Schmitt for a huge amount of hacking and to an\n\ + \032 anonymous sponsor for suggesting and underwriting this extension.\n\ + \032 * Small improvements:\n\ + \032 + Added a new preference, dontchmod. By default, Unison uses\n\ + \032 the chmod system call to set the permission bits of files\n\ + \032 after it has copied them. But in some circumstances (and\n\ + \032 under some operating systems), the chmod call always fails.\n\ + \032 Setting this preference completely prevents Unison from ever\n\ + \032 calling chmod.\n\ + \032 + Don't ignore files that look like backup files if the\n\ + \032 backuplocation preference is set to central\n\ + \032 + Shortened the names of several preferences. The old names are\n\ + \032 also still supported, for backwards compatibility, but they\n\ + \032 do not appear in the documentation.\n\ + \032 + Lots of little documentation tidying. (In particular,\n\ + \032 preferences are separated into Basic and Advanced! This\n\ + \032 should hopefully make Unison a little more approachable for\n\ + \032 new users.\n\ + \032 + Unison can sometimes fail to transfer a file, giving the\n\ + \032 unhelpful message \"Destination updated during\n\ + \032 synchronization\" even though the file has not been changed.\n\ + \032 This can be caused by programs that change either the file's\n\ + \032 contents or the file's extended attributes without changing\n\ + \032 its modification time. It's not clear what is the best fix\n\ + \032 for this - it is not Unison's fault, but it makes Unison's\n\ + \032 behavior puzzling - but at least Unison can be more helpful\n\ + \032 about suggesting a workaround (running once with fastcheck\n\ + \032 set to false). The failure message has been changed to give\n\ + \032 this advice.\n\ + \032 + Many improvements to the OS X GUI (thanks to Alan Schmitt and\n\ + \032 Craig Federighi), including a very nice new \"nested\n\ + \032 directory\" display style and per-file progress bars.\n\ + \032 * Very preliminary support for triggering Unison from an external\n\ + \032 filesystem-watching utility. The current implementation is very\n\ + \032 simple, not efficient, and almost completely untested--not ready\n\ + \032 for real users. But if someone wants to help improve it (e.g., by\n\ + \032 writing a filesystem watcher for your favorite OS), please make\n\ + \032 yourself known!\n\ + \032 On the Unison side, the new behavior is very simple:\n\ + \032 + use the text UI\n\ + \032 + start Unison with the command-line flag \"-repeat FOO\", where\n\ + \032 FOO is name of a file where Unison should look for\n\ + \032 notifications of changes\n\ + \032 + when it starts up, Unison will read the whole contents of\n\ + \032 this file (on both hosts), which should be a\n\ + \032 newline-separated list of paths (relative to the root of the\n\ + \032 synchronization) and synchronize just these paths, as if it\n\ + \032 had been started with the \"-path=xxx\" option for each one of\n\ + \032 them\n\ + \032 + when it finishes, it will sleep for a few seconds and then\n\ + \032 examine the watchfile again; if anything has been added, it\n\ + \032 will read the new paths, synchronize them, and go back to\n\ + \032 sleep\n\ + \032 + that's it!\n\ + \032 To use this to drive Unison \"incrementally,\" just start it in this\n\ + \032 mode and start up a tool (on each host) to watch for new changes\n\ + \032 to the filesystem and append the appropriate paths to the\n\ + \032 watchfile. Hopefully such tools should not be too hard to write.\n\ + \032 * Bug fixes:\n\ + \032 + Fixed a bug that was causing new files to be created with\n\ + \032 permissions 0x600 instead of using a reasonable default (like\n\ + \032 0x644), if the 'perms' flag was set to 0. (Bug reported by\n\ + \032 Ben Crowell.)\n\ + \032 + Follow maxthreads preference when transferring directories.\n\ + \n\ \032 Changes since 2.17:\n\ \032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\ \032 interface by Craig Federighi. Thanks, Craig!!!\n\ \032 * Small fix to ctime (non-)handling in update detection under\n\ \032 windows with fastcheck.\n\ - \n\ - \032 Changes since 2.17:\n\ \032 * Several small fixes to the GTK2 UI to make it work better under\n\ \032 Windows [thanks to Karl M for these].\n\ \032 * The backup functionality has been completely rewritten. The\n\ @@ -3017,13 +3134,10 @@ \032 * Fixed potential deadlock when synchronizing between Windows and\n\ \032 Unix\n\ \032 * Small improvements:\n\ - \032 + If neither the\n\ - \032 tt USERPROFILE nor the\n\ - \032 tt HOME environment variables are set, then Unison will put\n\ - \032 its temporary commit log (called\n\ - \032 tt DANGER.README) into the directory named by the\n\ - \032 tt UNISON environment variable, if any; otherwise it will use\n\ - \032 tt C:.\n\ + \032 + If neither the USERPROFILE nor the HOME environment variables\n\ + \032 are set, then Unison will put its temporary commit log\n\ + \032 (called DANGER.README) into the directory named by the UNISON\n\ + \032 environment variable, if any; otherwise it will use C:.\n\ \032 + alternative set of values for fastcheck: yes = true; no =\n\ \032 false; default = auto.\n\ \032 + -silent implies -contactquietly\n\ @@ -3070,9 +3184,8 @@ \032 + Paths that are not synchronized because of conflicts or\n\ \032 errors during update detection are now noted in the log file.\n\ \032 + [END] messages in log now use a briefer format\n\ - \032 + Changed the text UI startup sequence so that\n\ - \032 tt ./unison -ui text will use the default profile instead of\n\ - \032 failing.\n\ + \032 + Changed the text UI startup sequence so that ./unison -ui\n\ + \032 text will use the default profile instead of failing.\n\ \032 + Made some improvements to the error messages.\n\ \032 + Added some debugging messages to remote.ml.\n\ \n\ From bcpierce at seas.upenn.edu Fri May 1 22:31:51 2009 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Fri, 1 May 2009 22:31:51 -0400 Subject: [Unison-hackers] [unison-svn] r322 - in branches: . 2.32/doc 2.32/src 2.32/src/lwt 2.32/src/ubase 2.32/src/uimacnew/uimacnew.xcodeproj Message-ID: <200905020231.n422VpL9006699@yaws.seas.upenn.edu> Author: bcpierce Date: 2009-05-01 22:31:27 -0400 (Fri, 01 May 2009) New Revision: 322 Added: branches/2.32/ branches/2.32/doc/changes.tex branches/2.32/src/Makefile.OCaml branches/2.32/src/RECENTNEWS branches/2.32/src/TODO.txt branches/2.32/src/abort.ml branches/2.32/src/case.ml branches/2.32/src/case.mli branches/2.32/src/checksum.ml branches/2.32/src/checksum.mli branches/2.32/src/clroot.ml branches/2.32/src/clroot.mli branches/2.32/src/common.ml branches/2.32/src/common.mli branches/2.32/src/copy.ml branches/2.32/src/external.ml branches/2.32/src/external.mli branches/2.32/src/fileinfo.ml branches/2.32/src/fileinfo.mli branches/2.32/src/files.ml branches/2.32/src/files.mli branches/2.32/src/fileutil.ml branches/2.32/src/fileutil.mli branches/2.32/src/fingerprint.ml branches/2.32/src/fingerprint.mli branches/2.32/src/fspath.ml branches/2.32/src/fspath.mli branches/2.32/src/globals.ml branches/2.32/src/globals.mli branches/2.32/src/linkgtk.ml branches/2.32/src/linkgtk2.ml branches/2.32/src/linktext.ml branches/2.32/src/linktk.ml branches/2.32/src/lock.ml branches/2.32/src/lock.mli branches/2.32/src/lwt/pqueue.ml branches/2.32/src/lwt/pqueue.mli branches/2.32/src/main.ml branches/2.32/src/mkProjectInfo.ml branches/2.32/src/name.ml branches/2.32/src/name.mli branches/2.32/src/os.ml branches/2.32/src/os.mli branches/2.32/src/osx.ml branches/2.32/src/osx.mli branches/2.32/src/path.ml branches/2.32/src/path.mli branches/2.32/src/pixmaps.ml branches/2.32/src/pred.ml branches/2.32/src/pred.mli branches/2.32/src/props.ml branches/2.32/src/props.mli branches/2.32/src/recon.ml branches/2.32/src/recon.mli branches/2.32/src/remote.ml branches/2.32/src/remote.mli branches/2.32/src/sortri.ml branches/2.32/src/sortri.mli branches/2.32/src/stasher.ml branches/2.32/src/strings.ml branches/2.32/src/strings.mli branches/2.32/src/test.ml branches/2.32/src/test.mli branches/2.32/src/transfer.ml branches/2.32/src/transfer.mli branches/2.32/src/transport.ml branches/2.32/src/transport.mli branches/2.32/src/tree.ml branches/2.32/src/tree.mli branches/2.32/src/ubase/rx.ml branches/2.32/src/ubase/rx.mli branches/2.32/src/ubase/safelist.ml branches/2.32/src/ubase/safelist.mli branches/2.32/src/ubase/trace.ml branches/2.32/src/ubase/trace.mli branches/2.32/src/ubase/uarg.ml branches/2.32/src/ubase/util.ml branches/2.32/src/ubase/util.mli branches/2.32/src/ui.mli branches/2.32/src/uicommon.ml branches/2.32/src/uicommon.mli branches/2.32/src/uigtk2.ml branches/2.32/src/uigtk2.mli branches/2.32/src/uimacnew/uimacnew.xcodeproj/project.pbxproj branches/2.32/src/uitext.ml branches/2.32/src/uitext.mli branches/2.32/src/update.ml branches/2.32/src/update.mli branches/2.32/src/uutil.ml branches/2.32/src/uutil.mli branches/2.32/src/xferhint.ml branches/2.32/src/xferhint.mli Removed: branches/2.32/doc/changes.tex branches/2.32/src/Makefile.OCaml branches/2.32/src/RECENTNEWS branches/2.32/src/TODO.txt branches/2.32/src/abort.ml branches/2.32/src/case.ml branches/2.32/src/case.mli branches/2.32/src/checksum.ml branches/2.32/src/checksum.mli branches/2.32/src/clroot.ml branches/2.32/src/clroot.mli branches/2.32/src/common.ml branches/2.32/src/common.mli branches/2.32/src/copy.ml branches/2.32/src/external.ml branches/2.32/src/external.mli branches/2.32/src/fileinfo.ml branches/2.32/src/fileinfo.mli branches/2.32/src/files.ml branches/2.32/src/files.mli branches/2.32/src/fileutil.ml branches/2.32/src/fileutil.mli branches/2.32/src/fingerprint.ml branches/2.32/src/fingerprint.mli branches/2.32/src/fspath.ml branches/2.32/src/fspath.mli branches/2.32/src/globals.ml branches/2.32/src/globals.mli branches/2.32/src/linkgtk.ml branches/2.32/src/linkgtk2.ml branches/2.32/src/linktext.ml branches/2.32/src/linktk.ml branches/2.32/src/lock.ml branches/2.32/src/lock.mli branches/2.32/src/lwt/pqueue.ml branches/2.32/src/lwt/pqueue.mli branches/2.32/src/main.ml branches/2.32/src/mkProjectInfo.ml branches/2.32/src/name.ml branches/2.32/src/name.mli branches/2.32/src/os.ml branches/2.32/src/os.mli branches/2.32/src/osx.ml branches/2.32/src/osx.mli branches/2.32/src/path.ml branches/2.32/src/path.mli branches/2.32/src/pixmaps.ml branches/2.32/src/pred.ml branches/2.32/src/pred.mli branches/2.32/src/props.ml branches/2.32/src/props.mli branches/2.32/src/recon.ml branches/2.32/src/recon.mli branches/2.32/src/remote.ml branches/2.32/src/remote.mli branches/2.32/src/sortri.ml branches/2.32/src/sortri.mli branches/2.32/src/stasher.ml branches/2.32/src/strings.ml branches/2.32/src/strings.mli branches/2.32/src/test.ml branches/2.32/src/test.mli branches/2.32/src/transfer.ml branches/2.32/src/transfer.mli branches/2.32/src/transport.ml branches/2.32/src/transport.mli branches/2.32/src/tree.ml branches/2.32/src/tree.mli branches/2.32/src/ubase/rx.ml branches/2.32/src/ubase/rx.mli branches/2.32/src/ubase/safelist.ml branches/2.32/src/ubase/safelist.mli branches/2.32/src/ubase/trace.ml branches/2.32/src/ubase/trace.mli branches/2.32/src/ubase/uarg.ml branches/2.32/src/ubase/util.ml branches/2.32/src/ubase/util.mli branches/2.32/src/ui.mli branches/2.32/src/uicommon.ml branches/2.32/src/uicommon.mli branches/2.32/src/uigtk2.ml branches/2.32/src/uigtk2.mli branches/2.32/src/uimacnew/uimacnew.xcodeproj/project.pbxproj branches/2.32/src/uitext.ml branches/2.32/src/uitext.mli branches/2.32/src/update.ml branches/2.32/src/update.mli branches/2.32/src/uutil.ml branches/2.32/src/uutil.mli branches/2.32/src/xferhint.ml branches/2.32/src/xferhint.mli Log: New release branch Copied: branches/2.32 (from rev 319, trunk) Deleted: branches/2.32/doc/changes.tex =================================================================== --- trunk/doc/changes.tex 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/doc/changes.tex 2009-05-02 02:31:27 UTC (rev 322) @@ -1,1534 +0,0 @@ -\begin{changesfromversion}{2.17} -\item Major rewrite and cleanup of the whole Mac OS X graphical user -interface by Craig Federighi. Thanks, Craig!!! - -\item Small fix to ctime (non-)handling in update detection under windows - with fastcheck. -\end{changesfromversion} - -\begin{changesfromversion}{2.17} -\item Several small fixes to the GTK2 UI to make it work better under -Windows [thanks to Karl M for these]. - -\item The backup functionality has been completely rewritten. The external -interface has not changed, but numerous bugs, irregular behaviors, and -cross-platform inconsistencies have been corrected. - -\item The Unison project now accepts donations via PayPal. If you'd like to -donate, you can find a link to the donation page on the -\URL{http://www.cis.upenn.edu/~bcpierce/unison/lists.html}{Unison home - page}. - -\item Some important safety improvements: -\begin{itemize} -\item Added a new \verb|mountpoint| preference, which can be used to specify -a path that must exist in both replicas at the end of update detection -(otherwise Unison aborts). This can be used to avoid potentially dangerous -situations when Unison is used with removable media such as external hard -drives and compact flash cards. - -\item The confirmation of ``big deletes'' is now controlled by a boolean preference - \verb|confirmbigdeletes|. Default is true, which gives the same behavior as - previously. (This functionality is at least partly superceded by the - \verb|mountpoint| preference, but it has been left in place in case it is - useful to some people.) - - \item If Unison is asked to ``follow'' a symbolic link but there is - nothing at the other end of the link, it will now flag this path as an - error, rather than treating the symlink itself as missing or deleted. - This avoids a potentially dangerous situation where a followed symlink - points to an external filesystem that might be offline when Unison is run - (whereupon Unison would cheerfully delete the corresponding files in the - other replica!). -\end{itemize} - -\item Smaller changes: -\begin{itemize} -\item Added \verb|forcepartial| and \verb|preferpartial| preferences, which -behave like \verb|force| and \verb|prefer| but can be specified on a -per-path basis. [Thanks to Alan Schmitt for this.] - -\item A bare-bones self test feature was added, which runs unison through - some of its paces and checks that the results are as expected. The - coverage of the tests is still very limited, but the facility has already - been very useful in debugging the new backup functionality (especially in - exposing some subtle cross-platform issues). - -\item Refined debugging code so that the verbosity of individual modules - can be controlled separately. Instead of just putting '-debug - verbose' on the command line, you can put '-debug update+', which - causes all the extra messages in the Update module, but not other - modules, to be printed. Putting '-debug verbose' causes all modules - to print with maximum verbosity. - -\item Removed \verb|mergebatch| preference. (It never seemed very useful, and - its semantics were confusing.) - -\item Rewrote some of the merging functionality, for better cooperation - with external Harmony instances. - -\item Changed the temp file prefix from \verb|.#| to \verb|.unison|. - -\item Compressed the output from the text user interface (particularly - when run with the \verb|-terse| flag) to make it easier to interpret the - results when Unison is run several times in succession from a script. - -\item Diff and merge functions now work under Windows. - -\item Changed the order of arguments to the default diff command (so that - the + and - annotations in diff's output are reversed). - -\item Added \verb|.mpp| files to the ``never fastcheck'' list (like -\verb|.xls| files). -\end{itemize} - -\item Many small bugfixes, including: -\begin{itemize} -\item Fixed a longstanding bug regarding fastcheck and daylight saving time - under Windows when Unison is set up to synchronize modification times. - (Modification times cannot be updated in the archive in this case, - so we have to ignore one hour differences.) -\item Fixed a bug that would occasionally cause the archives to be left in - non-identical states on the two hosts after synchronization. -\item Fixed a bug that prevented Unison from communicating correctly between - 32- and 64-bit architectures. -\item On windows, file creation times are no longer used as a proxy for - inode numbers. (This is unfortunate, as it makes fastcheck a little less - safe. But it turns out that file creation times are not reliable - under Windows: if a file is removed and a new file is created in its - place, the new one will sometimes be given the same creation date as the - old one!) -\item Set read-only file to R/W on OSX before attempting to change other attributes. -\item Fixed bug resulting in spurious "Aborted" errors during transport -(thanks to Jerome Vouillon) -\item Enable diff if file contents have changed in one replica, but -only properties in the other. -\item Removed misleading documentation for 'repeat' preference. -\item Fixed a bug in merging code where Unison could sometimes deadlock - with the external merge program, if the latter produced large - amounts of output. -\item Workaround for a bug compiling gtk2 user interface against current versions - of gtk2+ libraries. -\item Added a better error message for "ambiguous paths". -\item Squashed a longstanding bug that would cause file transfer to fail - with the message ``Failed: Error in readWrite: Is a directory.'' -\item Replaced symlinks with copies of their targets in the Growl framework in src/uimac. - This should make the sources easier to check out from the svn repository on WinXP - systems. -\item Added a workaround (suggested by Karl M.) for the problem discussed - on the unison users mailing list where, on the Windows platform, the - server would hang when transferring files. I conjecture that - the problem has to do with the RPC mechanism, which was used to - make a call {\em back} from the server to the client (inside the Trace.log - function) so that the log message would be appended to the log file on - the client. The workaround is to dump these messages (about when - xferbycopying shortcuts are applied and whether they succeed) just to the - standard output of the Unison process, not to the log file. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.13.0} -\item The features for performing backups and for invoking external merge -programs have been completely rewritten by Stephane Lescuyer (thanks, -Stephane!). The user-visible functionality should not change, but the -internals have been rationalized and there are a number of new features. -See the manual (in particular, the description of the \verb|backupXXX| -preferences) for details. - -\item Incorporated patches for ipv6 support, contributed by Samuel Thibault. -(Note that, due to a bug in the released OCaml 3.08.3 compiler, this code -will not actually work with ipv6 unless compiled with the CVS version of the -OCaml compiler, where the bug has been fixed; however, ipv4 should continue -to work normally.) - -\item OSX interface: -\begin{itemize} -\item Incorporated Ben Willmore's cool new icon for the Mac UI. -\end{itemize} - -\item Small fixes: -\begin{itemize} -\item Fixed off by one error in month numbers (in printed dates) reported - by Bob Burger -\end{itemize} - -\end{changesfromversion} - -\begin{changesfromversion}{2.12.0} -\item New convention for release numbering: Releases will continue to be -given numbers of the form \verb|X.Y.Z|, but, -from now on, just the major version number (\verb|X.Y|) will be considered -significant when checking compatibility between client and server versions. -The third component of the version number will be used only to identify -``patch levels'' of releases. - -This change goes hand in hand with a change to the procedure for making new -releases. Candidate releases will initially be given ``beta release'' -status when they are announced for public consumption. Any bugs that are -discovered will be fixed in a separate branch of the source repository -(without changing the major version number) and new tarballs re-released as -needed. When this process converges, the patched beta version will be -dubbed stable. - -\item Warning (failure in batch mode) when one path is completely emptied. - This prevents Unison from deleting everything on one replica when - the other disappear. - -\item Fix diff bug (where no difference is shown the first time the diff - command is given). - -\item User interface changes: -\begin{itemize} -\item Improved workaround for button focus problem (GTK2 UI) -\item Put leading zeroes in date fields -\item More robust handling of character encodings in GTK2 UI -\item Changed format of modification time displays, from \verb|modified at hh:mm:ss on dd MMM, yyyy| -to \verb|modified on yyyy-mm-dd hh:mm:ss| -\item Changed time display to include seconds (so that people on FAT - filesystems will not be confused when Unison tries to update a file - time to an odd number of seconds and the filesystem truncates it to - an even number!) -\item Use the diff "-u" option by default when showing differences between files - (the output is more readable) -\item In text mode, pipe the diff output to a pager if the environment - variable PAGER is set -\item Bug fixes and cleanups in ssh password prompting. Now works with - the GTK2 UI under Linux. (Hopefully the Mac OS X one is not broken!) -\item Include profile name in the GTK2 window name -\item Added bindings ',' (same as '<') and '.' (same as '>') in the GTK2 UI -\end{itemize} - -\item Mac GUI: -\begin{itemize} -\item actions like < and > scroll to the next item as necessary. -\item Restart has a menu item and keyboard shortcut (command-R). -\item - Added a command-line tool for Mac OS X. It can be installed from - the Unison menu. -\item New icon. -\item Handle the "help" command-line argument properly. -\item Handle profiles given on the command line properly. -\item When a profile has been selected, the profile dialog is replaced by a - "connecting" message while the connection is being made. This - gives better feedback. -\item Size of left and right columns is now large enough so that - "PropsChanged" is not cut off. -\end{itemize} - - -\item Minor changes: -\begin{itemize} -\item Disable multi-threading when both roots are local -\item Improved error handling code. In particular, make sure all files - are closed in case of a transient failure -\item Under Windows, use \verb|$UNISON| for home directory as a last resort - (it was wrongly moved before \verb|$HOME| and \verb|$USERPROFILE| in - Unison 2.12.0) -\item Reopen the logfile if its name changes (profile change) -\item Double-check that permissions and modification times have been - properly set: there are some combination of OS and filesystem on - which setting them can fail in a silent way. -\item Check for bad Windows filenames for pure Windows synchronization - also (not just cross architecture synchronization). - This way, filenames containing backslashes, which are not correctly - handled by unison, are rejected right away. -\item Attempt to resolve issues with synchronizing modification times - of read-only files under Windows -\item Ignore chmod failures when deleting files -\item Ignore trailing dots in filenames in case insensitive mode -\item Proper quoting of paths, files and extensions ignored using the UI -\item The strings CURRENT1 and CURRENT2 are now correctly substitued when - they occur in the diff preference -\item Improvements to syncing resource forks between Macs via a non-Mac system. -\end{itemize} - -\end{changesfromversion} - -\begin{changesfromversion}{2.10.2} -\item \incompatible{} Archive format has changed. - -\item Source code availability: The Unison sources are now managed using - Subversion. One nice side-effect is that anonymous checkout is now - possible, like this: -\begin{verbatim} - svn co https://cvs.cis.upenn.edu:3690/svnroot/unison/ -\end{verbatim} -We will also continue to export a ``developer tarball'' of the current -(modulo one day) sources in the web export directory. To receive commit logs -for changes to the sources, subscribe to the \verb|unison-hackers| list -(\ONEURL{http://www.cis.upenn.edu/~bcpierce/unison/lists.html}). - -\item Text user interface: -\begin{itemize} -\item Substantial reworking of the internal logic of the text UI to make it -a bit easier to modify. -\item The {\tt dumbtty} flag in the text UI is automatically set to true if -the client is running on a Unix system and the {\tt EMACS} environment -variable is set to anything other than the empty string. -\end{itemize} - -\item Native OS X gui: -\begin{itemize} -\item Added a synchronize menu item with keyboard shortcut -\item Added a merge menu item, still needs to be debugged -\item Fixes to compile for Panther -\item Miscellaneous improvements and bugfixes -\end{itemize} - -\item Small changes: -\begin{itemize} -\item Changed the filename checking code to apply to Windows only, instead - of OS X as well. -\item Finder flags now synchronized -\item Fallback in copy.ml for filesystem that do not support \verb|O_EXCL| -\item Changed buffer size for local file copy (was highly inefficient with - synchronous writes) -\item Ignore chmod failure when deleting a directory -\item Fixed assertion failure when resolving a conflict content change / - permission changes in favor of the content change. -\item Workaround for transferring large files using rsync. -\item Use buffered I/O for files (this is the only way to open files in binary - mode under Cygwin). -\item On non-Cygwin Windows systems, the UNISON environment variable is now checked first to determine - where to look for Unison's archive and preference files, followed by \verb|HOME| and - \verb|USERPROFILE| in that order. On Unix and Cygwin systems, \verb|HOME| is used. -\item Generalized \verb|diff| preference so that it can be given either as just - the command name to be used for calculating diffs or else a whole command - line, containing the strings \verb|CURRENT1| and \verb|CURRENT2|, which will be replaced - by the names of the files to be diff'ed before the command is called. -\item Recognize password prompts in some newer versions of ssh. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.9.20} -\item \incompatible{} Archive format has changed. -\item Major functionality changes: -\begin{itemize} -\item Major tidying and enhancement of 'merge' functionality. The main - user-visible change is that the external merge program may either write - the merged output to a single new file, as before, or it may modify one or - both of its input files, or it may write {\em two} new files. In the - latter cases, its modifications will be copied back into place on both the - local and the remote host, and (if the two files are now equal) the - archive will be updated appropriately. More information can be found in - the user manual. Thanks to Malo Denielou and Alan Schmitt for these - improvements. - - Warning: the new merging functionality is not completely compatible with - old versions! Check the manual for details. - -\item Files larger than 2Gb are now supported. - -\item Added preliminary (and still somewhat experimental) support for the - Apple OS X operating system. -\begin{itemize} -\item Resource forks should be transferred correctly. (See the manual for -details of how this works when synchronizing HFS with non-HFS volumes.) -Synchronization of file type and creator information is also supported. -\item On OSX systems, the name of the directory for storing Unison's -archives, preference files, etc., is now determined as follows: -\begin{itemize} - \item if \verb+~/.unison+ exists, use it - \item otherwise, use \verb|~/Library/Application Support/Unison|, - creating it if necessary. -\end{itemize} -\item A preliminary native-Cocoa user interface is under construction. This -still needs some work, and some users experience unpredictable crashes, so -it is only for hackers for now. Run make with {\tt UISTYLE=mac} to build -this interface. -\end{itemize} -\end{itemize} - -\item Minor functionality changes: -\begin{itemize} - -\item Added an {\tt ignorelocks} preference, which forces Unison to override left-over - archive locks. (Setting this preference is dangerous! Use it only if you - are positive you know what you are doing.) -% BCP: removed later -% \item Running with the {\tt -timers} flag set to true will now show the total time taken -% to check for updates on each directory. (This can be helpful for tidying directories to improve -% update detection times.) -\item Added a new preference {\tt assumeContentsAreImmutable}. If a directory - matches one of the patterns set in this preference, then update detection - is skipped for files in this directory. (The - purpose is to speed update detection for cases like Mail folders, which - contain lots and lots of immutable files.) Also a preference - {\tt assumeContentsAreImmutableNot}, which overrides the first, similarly - to {\tt ignorenot}. (Later amendment: these preferences are now called - {\tt immutable} and {\tt immutablenot}.) - -\item The {\tt ignorecase} flag has been changed from a boolean to a three-valued - preference. The default setting, called {\tt default}, checks the operating systems - running on the client and server and ignores filename case if either of them is - OSX or Windows. Setting ignorecase to {\tt true} or {\tt false} overrides - this behavior. If you have been setting {\tt ignorecase} on the command - line using {\tt -ignorecase=true} or {\tt -ignorecase=false}, you will - need to change to {\tt -ignorecase true} or {\tt -ignorecase false}. - -\item a new preference, 'repeat', for the text user interface (only). If 'repeat' is set to - a number, then, after it finishes synchronizing, Unison will wait for that many seconds and - then start over, continuing this way until it is killed from outside. Setting repeat to true - will automatically set the batch preference to true. - -\item Excel files are now handled specially, so that the {\tt fastcheck} - optimization is skipped even if the {\tt fastcheck} flag is set. (Excel - does some naughty things with modtimes, making this optimization - unreliable and leading to failures during change propagation.) - -\item The ignorecase flag has been changed from a boolean to a three-valued - preference. The default setting, called 'default', checks the operating systems - running on the client and server and ignores filename case if either of them is - OSX or Windows. Setting ignorecase to 'true' or 'false' overrides this behavior. - -\item Added a new preference, 'repeat', for the text user interface (only, - at the moment). If 'repeat' is set to a number, then, after it finishes - synchronizing, Unison will wait for that many seconds and then start over, - continuing this way until it is killed from outside. Setting repeat to - true will automatically set the batch preference to true. - -\item The 'rshargs' preference has been split into 'rshargs' and 'sshargs' - (mainly to make the documentation clearer). In fact, 'rshargs' is no longer - mentioned in the documentation at all, since pretty much everybody uses - ssh now anyway. -\end{itemize} - -\item Documentation -\begin{itemize} -\item The web pages have been completely redesigned and reorganized. - (Thanks to Alan Schmitt for help with this.) -\end{itemize} - -\item User interface improvements -\begin{itemize} -\item Added a GTK2 user interface, capable (among other things) of displaying filenames - in any locale encoding. Kudos to Stephen Tse for contributing this code! -\item The text UI now prints a list of failed and skipped transfers at the end of - synchronization. -\item Restarting update detection from the graphical UI will reload the current - profile (which in particular will reset the -path preference, in case - it has been narrowed by using the ``Recheck unsynchronized items'' - command). -\item Several small improvements to the text user interface, including a - progress display. -\end{itemize} - -\item Bug fixes (too numerous to count, actually, but here are some): -\begin{itemize} -\item The {\tt maxthreads} preference works now. -\item Fixed bug where warning message about uname returning an unrecognized - result was preventing connection to server. (The warning is no longer - printed, and all systems where 'uname' returns anything other than 'Darwin' - are assumed not to be running OS X.) -\item Fixed a problem on OS X that caused some valid file names (e.g., - those including colons) to be considered invalid. -\item Patched Path.followLink to follow links under cygwin in addition to Unix - (suggested by Matt Swift). -\item Small change to the storeRootsName function, suggested by bliviero at - ichips.intel.com, to fix a problem in unison with the `rootalias' - option, which allows you to tell unison that two roots contain the same - files. Rootalias was being applied after the hosts were - sorted, so it wouldn't work properly in all cases. -\item Incorporated a fix by Dmitry Bely for setting utimes of read-only files - on Win32 systems. -\end{itemize} - -\item Installation / portability: -\begin{itemize} -\item Unison now compiles with OCaml version 3.07 and later out of the box. -\item Makefile.OCaml fixed to compile out of the box under OpenBSD. -\item a few additional ports (e.g. OpenBSD, Zaurus/IPAQ) are now mentioned in - the documentation -\item Unison can now be installed easily on OSX systems using the Fink - package manager -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.9.1} -\item Added a preference {\tt maxthreads} that can be used to limit the -number of simultaneous file transfers. -\item Added a {\tt backupdir} preference, which controls where backup -files are stored. -\item Basic support added for OSX. In particular, Unison now recognizes -when one of the hosts being synchronized is running OSX and switches to -a case-insensitive treatment of filenames (i.e., 'foo' and 'FOO' are -considered to be the same file). - (OSX is not yet fully working, - however: in particular, files with resource forks will not be - synchronized correctly.) -\item The same hash used to form the archive name is now also added to -the names of the temp files created during file transfer. The reason for -this is that, during update detection, we are going to silently delete -any old temp files that we find along the way, and we want to prevent -ourselves from deleting temp files belonging to other instances of Unison -that may be running in parallel, e.g. synchronizing with a different -host. Thanks to Ruslan Ermilov for this suggestion. -\item Several small user interface improvements -\item Documentation -\begin{itemize} -\item FAQ and bug reporting instructions have been split out as separate - HTML pages, accessible directly from the unison web page. -\item Additions to FAQ, in particular suggestions about performance -tuning. -\end{itemize} -\item Makefile -\begin{itemize} -\item Makefile.OCaml now sets UISTYLE=text or UISTYLE=gtk automatically, - depending on whether it finds lablgtk installed -\item Unison should now compile ``out of the box'' under OSX -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.8.1} -\item Changing profile works again under Windows -\item File movement optimization: Unison now tries to use local copy instead of - transfer for moved or copied files. It is controled by a boolean option - ``xferbycopying''. -\item Network statistics window (transfer rate, amount of data transferred). - [NB: not available in Windows-Cygwin version.] -\item symlinks work under the cygwin version (which is dynamically linked). -\item Fixed potential deadlock when synchronizing between Windows and -Unix -\item Small improvements: - \begin{itemize} - \item If neither the {\\tt USERPROFILE} nor the {\\tt HOME} environment - variables are set, then Unison will put its temporary commit log - (called {\\tt DANGER.README}) into the directory named by the - {\\tt UNISON} environment variable, if any; otherwise it will use - {\\tt C:}. - \item alternative set of values for fastcheck: yes = true; no = false; - default = auto. - \item -silent implies -contactquietly - \end{itemize} -\item Source code: - \begin{itemize} - \item Code reorganization and tidying. (Started breaking up some of the - basic utility modules so that the non-unison-specific stuff can be - made available for other projects.) - \item several Makefile and docs changes (for release); - \item further comments in ``update.ml''; - \item connection information is not stored in global variables anymore. - \end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.7.78} -\item Small bugfix to textual user interface under Unix (to avoid leaving - the terminal in a bad state where it would not echo inputs after Unison - exited). -\end{changesfromversion} - -\begin{changesfromversion}{2.7.39} -\item Improvements to the main web page (stable and beta version docs are - now both accessible). -\item User manual revised. -\item Added some new preferences: -\begin{itemize} -\item ``sshcmd'' and ``rshcmd'' for specifying paths to ssh and rsh programs. -\item ``contactquietly'' for suppressing the ``contacting server'' message -during Unison startup (under the graphical UI). -\end{itemize} -\item Bug fixes: -\begin{itemize} -\item Fixed small bug in UI that neglected to change the displayed column - headers if loading a new profile caused the roots to change. -\item Fixed a bug that would put the text UI into an infinite loop if it - encountered a conflict when run in batch mode. -\item Added some code to try to fix the display of non-Ascii characters in - filenames on Windows systems in the GTK UI. (This code is currently - untested---if you're one of the people that had reported problems with - display of non-ascii filenames, we'd appreciate knowing if this actually - fixes things.) -\item `\verb|-prefer/-force newer|' works properly now. - (The bug was reported by Sebastian Urbaniak and Sean Fulton.) -\end{itemize} -\item User interface and Unison behavior: -\begin{itemize} -\item Renamed `Proceed' to `Go' in the graphical UI. -\item Added exit status for the textual user interface. -\item Paths that are not synchronized because of conflicts or errors during - update detection are now noted in the log file. -\item \verb|[END]| messages in log now use a briefer format -\item Changed the text UI startup sequence so that - {\\tt ./unison -ui text} will use the default profile instead of failing. -\item Made some improvements to the error messages. -\item Added some debugging messages to remote.ml. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.7.7} -\item Incorporated, once again, a multi-threaded transport sub-system. - It transfers several files at the same time, thereby making much - more effective use of available network bandwidth. Unlike the - earlier attempt, this time we do not rely on the native thread - library of OCaml. Instead, we implement a light-weight, - non-preemptive multi-thread library in OCaml directly. This version - appears stable. - - Some adjustments to unison are made to accommodate the multi-threaded - version. These include, in particular, changes to the - user interface and logging, for example: - \begin{itemize} - \item Two log entries for each transferring task, one for the - beginning, one for the end. - \item Suppressed warning messages against removing temp files left - by a previous unison run, because warning does not work nicely - under multi-threading. The temp file names are made less likely - to coincide with the name of a file created by the user. They - take the form \\ \verb|.#..unison.tmp|. - [N.b. This was later changed to \verb|.unison...unison.tmp|.] - \end{itemize} -\item Added a new command to the GTK user interface: pressing 'f' causes - Unison to start a new update detection phase, using as paths {\em just} - those paths that have been detected as changed and not yet marked as - successfully completed. Use this command to quickly restart Unison on - just the set of paths still needing attention after a previous run. -\item Made the {\tt ignorecase} preference user-visible, and changed the - initialization code so that it can be manually set to true, even if - neither host is running Windows. (This may be useful, e.g., when using - Unison running on a Unix system with a FAT volume mounted.) -\item Small improvements and bug fixes: - \begin{itemize} - \item Errors in preference files now generate fatal errors rather than - warnings at startup time. (I.e., you can't go on from them.) Also, - we fixed a bug that was preventing these warnings from appearing in the - text UI, so some users who have been running (unsuspectingly) with - garbage in their prefs files may now get error reports. - \item Error reporting for preference files now provides file name and - line number. - \item More intelligible message in the case of identical change to the same - files: ``Nothing to do: replicas have been changed only in identical - ways since last sync.'' - \item Files with prefix '.\#' excluded when scanning for preference - files. - \item Rsync instructions are send directly instead of first - marshaled. - \item Won't try forever to get the fingerprint of a continuously changing file: - unison will give up after certain number of retries. - \item Other bug fixes, including the one reported by Peter Selinger - (\verb|force=older preference| not working). - \end{itemize} -\item Compilation: - \begin{itemize} - \item Upgraded to the new OCaml 3.04 compiler, with the LablGtk - 1.2.3 library (patched version used for compiling under Windows). - \item Added the option to compile unison on the Windows platform with - Cygwin GNU C compiler. This option only supports building - dynamically linked unison executables. - \end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.7.4} -\item Fixed a silly (but debilitating) bug in the client startup sequence. -\end{changesfromversion} - -\begin{changesfromversion}{2.7.1} -\item Added \verb|addprefsto| preference, which (when set) controls which -preference file new preferences (e.g. new ignore patterns) are added to. -\item Bug fix: read the initial connection header one byte at a time, so -that we don't block if the header is shorter than expected. (This bug -did not affect normal operation --- it just made it hard to tell when you -were trying to use Unison incorrectly with an old version of the server, -since it would hang instead of giving an error message.) -\end{changesfromversion} - -\begin{changesfromversion}{2.6.59} -\item Changed \verb|fastcheck| from a boolean to a string preference. Its - legal values are \verb|yes| (for a fast check), \verb|no| (for a safe - check), or \verb|default| (for a fast check---which also happens to be - safe---when running on Unix and a safe check when on Windows). The default - is \verb|default|. - \item Several preferences have been renamed for consistency. All - preference names are now spelled out in lowercase. For backward - compatibility, the old names still work, but they are not mentioned in - the manual any more. -\item The temp files created by the 'diff' and 'merge' commands are now - named by {\em pre}pending a new prefix to the file name, rather than - appending a suffix. This should avoid confusing diff/merge programs - that depend on the suffix to guess the type of the file contents. -\item We now set the keepalive option on the server socket, to make sure - that the server times out if the communication link is unexpectedly broken. -\item Bug fixes: -\begin{itemize} -\item When updating small files, Unison now closes the destination file. -\item File permissions are properly updated when the file is behind a - followed link. -\item Several other small fixes. -\end{itemize} -\end{changesfromversion} - - -\begin{changesfromversion}{2.6.38} -\item Major Windows performance improvement! - -We've added a preference \verb|fastcheck| that makes Unison look only at -a file's creation time and last-modified time to check whether it has -changed. This should result in a huge speedup when checking for updates -in large replicas. - - When this switch is set, Unison will use file creation times as - 'pseudo inode numbers' when scanning Windows replicas for updates, - instead of reading the full contents of every file. This may cause - Unison to miss propagating an update if the create time, - modification time, and length of the file are all unchanged by - the update (this is not easy to achieve, but it can be done). - However, Unison will never {\em overwrite} such an update with - a change from the other replica, since it - always does a safe check for updates just before propagating a - change. Thus, it is reasonable to use this switch most of the time - and occasionally run Unison once with {\tt fastcheck} set to false, - if you are worried that Unison may have overlooked an update. - - Warning: This change is has not yet been thoroughly field-tested. If you - set the \verb|fastcheck| preference, pay careful attention to what - Unison is doing. - -\item New functionality: centralized backups and merging -\begin{itemize} -\item This version incorporates two pieces of major new functionality, - implemented by Sylvain Roy during a summer internship at Penn: a - {\em centralized backup} facility that keeps a full backup of - (selected files - in) each replica, and a {\em merging} feature that allows Unison to - invoke an external file-merging tool to resolve conflicting changes to - individual files. - -\item Centralized backups: -\begin{itemize} - \item Unison now maintains full backups of the last-synchronized versions - of (some of) the files in each replica; these function both as - backups in the usual sense - and as the ``common version'' when invoking external - merge programs. - \item The backed up files are stored in a directory ~/.unison/backup on each - host. (The name of this directory can be changed by setting - the environment variable \verb|UNISONBACKUPDIR|.) - \item The predicate \verb|backup| controls which files are actually - backed up: - giving the preference '\verb|backup = Path *|' causes backing up - of all files. - \item Files are added to the backup directory whenever unison updates - its archive. This means that - \begin{itemize} - \item When unison reconstructs its archive from scratch (e.g., - because of an upgrade, or because the archive files have - been manually deleted), all files will be backed up. - \item Otherwise, each file will be backed up the first time unison - propagates an update for it. - \end{itemize} - \item The preference \verb|backupversions| controls how many previous - versions of each file are kept. The default is 2 (i.e., the last - synchronized version plus one backup). - \item For backward compatibility, the \verb|backups| preference is also - still supported, but \verb|backup| is now preferred. - \item It is OK to manually delete files from the backup directory (or to throw - away the directory itself). Before unison uses any of these files for - anything important, it checks that its fingerprint matches the one - that it expects. -\end{itemize} - -\item Merging: -\begin{itemize} - \item Both user interfaces offer a new 'merge' command, invoked by pressing - 'm' (with a changed file selected). - \item The actual merging is performed by an external program. - The preferences \verb|merge| and \verb|merge2| control how this - program is invoked. If a backup exists for this file (see the - \verb|backup| preference), then the \verb|merge| preference is used for - this purpose; otherwise \verb|merge2| is used. In both cases, the - value of the preference should be a string representing the command - that should be passed to a shell to invoke the - merge program. Within this string, the special substrings - \verb|CURRENT1|, \verb|CURRENT2|, \verb|NEW|, and \verb|OLD| may appear - at any point. Unison will substitute these as follows before invoking - the command: - \begin{itemize} - \item \relax\verb|CURRENT1| is replaced by the name of the local - copy of the file; - \item \relax\verb|CURRENT2| is replaced by the name of a temporary - file, into which the contents of the remote copy of the file have - been transferred by Unison prior to performing the merge; - \item \relax\verb|NEW| is replaced by the name of a temporary - file that Unison expects to be written by the merge program when - it finishes, giving the desired new contents of the file; and - \item \relax\verb|OLD| is replaced by the name of the backed up - copy of the original version of the file (i.e., its state at the - end of the last successful run of Unison), if one exists - (applies only to \verb|merge|, not \verb|merge2|). - \end{itemize} - For example, on Unix systems setting the \verb|merge| preference to -\begin{verbatim} - merge = diff3 -m CURRENT1 OLD CURRENT2 > NEW -\end{verbatim} - will tell Unison to use the external \verb|diff3| program for merging. - - A large number of external merging programs are available. For - example, \verb|emacs| users may find the following convenient: -\begin{verbatim} - merge2 = emacs -q --eval '(ediff-merge-files "CURRENT1" "CURRENT2" - nil "NEW")' - merge = emacs -q --eval '(ediff-merge-files-with-ancestor - "CURRENT1" "CURRENT2" "OLD" nil "NEW")' -\end{verbatim} -(These commands are displayed here on two lines to avoid running off the -edge of the page. In your preference file, each should be written on a -single line.) - - \item If the external program exits without leaving any file at the - path \verb|NEW|, - Unison considers the merge to have failed. If the merge program writes - a file called \verb|NEW| but exits with a non-zero status code, - then Unison - considers the merge to have succeeded but to have generated conflicts. - In this case, it attempts to invoke an external editor so that the - user can resolve the conflicts. The value of the \verb|editor| - preference controls what editor is invoked by Unison. The default - is \verb|emacs|. - - \item Please send us suggestions for other useful values of the - \verb|merge2| and \verb|merge| preferences -- we'd like to give several - examples in the manual. -\end{itemize} -\end{itemize} - -\item Smaller changes: -\begin{itemize} -\item When one preference file includes another, unison no longer adds the - suffix '\verb|.prf|' to the included file by default. If a file with - precisely the given name exists in the .unison directory, it will be used; - otherwise Unison will - add \verb|.prf|, as it did before. (This change means that included - preference files can be named \verb|blah.include| instead of - \verb|blah.prf|, so that unison will not offer them in its 'choose - a preference file' dialog.) -\item For Linux systems, we now offer both a statically linked and a dynamically - linked executable. The static one is larger, but will probably run on more - systems, since it doesn't depend on the same versions of dynamically - linked library modules being available. -\item Fixed the \verb|force| and \verb|prefer| preferences, which were - getting the propagation direction exactly backwards. -\item Fixed a bug in the startup code that would cause unison to crash - when the default profile (\verb|~/.unison/default.prf|) does not exist. -\item Fixed a bug where, on the run when a profile is first created, - Unison would confusingly display the roots in reverse order in the user - interface. -\end{itemize} - -\item For developers: -\begin{itemize} -\item We've added a module dependency diagram to the source distribution, in - \verb|src/DEPENDENCIES.ps|, to help new prospective developers with - navigating the code. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.6.11} -\item \incompatible{} Archive format has changed. - -\item \incompatible{} The startup sequence has been completely rewritten -and greatly simplified. The main user-visible change is that the -\verb|defaultpath| preference has been removed. Its effect can be -approximated by using multiple profiles, with \verb|include| directives -to incorporate common settings. All uses of \verb|defaultpath| in -existing profiles should be changed to \verb|path|. - -Another change in startup behavior that will affect some users is that it -is no longer possible to specify roots {\em both} in the profile {\em - and} on the command line. - -You can achieve a similar effect, though, by breaking your profile into -two: -\begin{verbatim} - - default.prf = - root = blah - root = foo - include common - - common.prf = - -\end{verbatim} -Now do -\begin{verbatim} - unison common root1 root2 -\end{verbatim} -when you want to specify roots explicitly. - -\item The \verb|-prefer| and \verb|-force| options have been extended to -allow users to specify that files with more recent modtimes should be -propagated, writing either \verb|-prefer newer| or \verb|-force newer|. -(For symmetry, Unison will also accept \verb|-prefer older| or -\verb|-force older|.) The \verb|-force older/newer| options can only be -used when \verb|-times| is also set. - -The graphical user interface provides access to these facilities on a -one-off basis via the \verb|Actions| menu. - -\item Names of roots can now be ``aliased'' to allow replicas to be -relocated without changing the name of the archive file where Unison -stores information between runs. (This feature is for experts only. See -the ``Archive Files'' section of the manual for more information.) - -\item Graphical user-interface: -\begin{itemize} -\item A new command is provided in the Synchronization menu for - switching to a new profile without restarting Unison from scratch. -\item The GUI also supports one-key shortcuts for commonly -used profiles. If a profile contains a preference of the form -% -'\verb|key = n|', where \verb|n| is a single digit, then pressing this -key will cause Unison to immediately switch to this profile and begin -synchronization again from scratch. (Any actions that may have been -selected for a set of changes currently being displayed will be -discarded.) - -\item Each profile may include a preference '\verb|label = |' giving a - descriptive string that described the options selected in this profile. - The string is listed along with the profile name in the profile selection - dialog, and displayed in the top-right corner of the main Unison window. -\end{itemize} - -\item Minor: -\begin{itemize} -\item Fixed a bug that would sometimes cause the 'diff' display to order - the files backwards relative to the main user interface. (Thanks - to Pascal Brisset for this fix.) -\item On Unix systems, the graphical version of Unison will check the - \verb|DISPLAY| variable and, if it is not set, automatically fall back - to the textual user interface. -\item Synchronization paths (\verb|path| preferences) are now matched - against the ignore preferences. So if a path is both specified in a - \verb|path| preference and ignored, it will be skipped. -\item Numerous other bugfixes and small improvements. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.6.1} -\item The synchronization of modification times has been disabled for - directories. - -\item Preference files may now include lines of the form - \verb+include +, which will cause \verb+name.prf+ to be read - at that point. - -\item The synchronization of permission between Windows and Unix now - works properly. - -\item A binding \verb|CYGWIN=binmode| in now added to the environment - so that the Cygwin port of OpenSSH works properly in a non-Cygwin - context. - -\item The \verb|servercmd| and \verb|addversionno| preferences can now - be used together: \verb|-addversionno| appends an appropriate - \verb+-NNN+ to the server command, which is found by using the value - of the \verb|-servercmd| preference if there is one, or else just - \verb|unison|. - -\item Both \verb|'-pref=val'| and \verb|'-pref val'| are now allowed for - boolean values. (The former can be used to set a preference to false.) - -\item Lot of small bugs fixed. -\end{changesfromversion} - -\begin{changesfromversion}{2.5.31} -\item The \verb|log| preference is now set to \verb|true| by default, - since the log file seems useful for most users. -\item Several miscellaneous bugfixes (most involving symlinks). -\end{changesfromversion} - -\begin{changesfromversion}{2.5.25} -\item \incompatible{} Archive format has changed (again). - -\item Several significant bugs introduced in 2.5.25 have been fixed. -\end{changesfromversion} - -\begin{changesfromversion}{2.5.1} -\item \incompatible{} Archive format has changed. Make sure you -synchronize your replicas before upgrading, to avoid spurious -conflicts. The first sync after upgrading will be slow. - -\item New functionality: -\begin{itemize} -\item Unison now synchronizes file modtimes, user-ids, and group-ids. - -These new features are controlled by a set of new preferences, all of -which are currently \verb|false| by default. - -\begin{itemize} -\item When the \verb|times| preference is set to \verb|true|, file -modification times are propaged. (Because the representations of time -may not have the same granularity on both replicas, Unison may not always -be able to make the modtimes precisely equal, but it will get them as -close as the operating systems involved allow.) -\item When the \verb|owner| preference is set to \verb|true|, file -ownership information is synchronized. -\item When the \verb|group| preference is set to \verb|true|, group -information is synchronized. -\item When the \verb|numericIds| preference is set to \verb|true|, owner -and group information is synchronized numerically. By default, owner and -group numbers are converted to names on each replica and these names are -synchronized. (The special user id 0 and the special group 0 are never -mapped via user/group names even if this preference is not set.) -\end{itemize} - -\item Added an integer-valued preference \verb|perms| that can be used to -control the propagation of permission bits. The value of this preference -is a mask indicating which permission bits should be synchronized. It is -set by default to $0o1777$: all bits but the set-uid and set-gid bits are -synchronised (synchronizing theses latter bits can be a security hazard). -If you want to synchronize all bits, you can set the value of this -preference to $-1$. - -\item Added a \verb|log| preference (default \verb|false|), which makes -Unison keep a complete record of the changes it makes to the replicas. -By default, this record is written to a file called \verb|unison.log| in -the user's home directory (the value of the \verb|HOME| environment -variable). If you want it someplace else, set the \verb|logfile| -preference to the full pathname you want Unison to use. - -\item Added an \verb|ignorenot| preference that maintains a set of patterns - for paths that should definitely {\em not} be ignored, whether or not - they match an \verb|ignore| pattern. (That is, a path will now be ignored - iff it matches an ignore pattern and does not match any ignorenot patterns.) -\end{itemize} - -\item User-interface improvements: -\begin{itemize} -\item Roots are now displayed in the user interface in the same order -as they were given on the command line or in the preferences file. -\item When the \verb|batch| preference is set, the graphical user interface no - longer waits for user confirmation when it displays a warning message: it - simply pops up an advisory window with a Dismiss button at the bottom and - keeps on going. -\item Added a new preference for controlling how many status messages are - printed during update detection: \verb|statusdepth| controls the maximum - depth for paths on the local machine (longer paths are not displayed, nor - are non-directory paths). The value should be an integer; default is 1. -\item Removed the \verb|trace| and \verb|silent| preferences. They did -not seem very useful, and there were too many preferences for controlling -output in various ways. -\item The text UI now displays just the default command (the one that -will be used if the user just types \verb||) instead of all -available commands. Typing \verb|?| will print the full list of -possibilities. -\item The function that finds the canonical hostname of the local host -(which is used, for example, in calculating the name of the archive file -used to remember which files have been synchronized) normally uses the -\verb|gethostname| operating system call. However, if the environment -variable \verb|UNISONLOCALHOSTNAME| is set, its value will now be used -instead. This makes it easier to use Unison in situations where a -machine's name changes frequently (e.g., because it is a laptop and gets -moved around a lot). -\item File owner and group are now displayed in the ``detail window'' at -the bottom of the screen, when unison is configured to synchronize them. -\end{itemize} - -\item For hackers: -\begin{itemize} -\item Updated to Jacques Garrigue's new version of \verb|lablgtk|, which - means we can throw away our local patched version. - - If you're compiling the GTK version of unison from sources, you'll need - to update your copy of lablgtk to the developers release. - (Warning: installing lablgtk under Windows is currently a bit - challenging.) - -\item The TODO.txt file (in the source distribution) has been cleaned up -and reorganized. The list of pending tasks should be much easier to -make sense of, for people that may want to contribute their programming -energies. There is also a separate file BUGS.txt for open bugs. -\item The Tk user interface has been removed (it was not being maintained -and no longer compiles). -\item The \verb|debug| preference now prints quite a bit of additional -information that should be useful for identifying sources of problems. -\item The version number of the remote server is now checked right away - during the connection setup handshake, rather than later. (Somebody - sent a bug report of a server crash that turned out to come from using - inconsistent versions: better to check this earlier and in a way that - can't crash either client or server.) -\item Unison now runs correctly on 64-bit architectures (e.g. Alpha -linux). We will not be distributing binaries for these architectures -ourselves (at least for a while) but if someone would like to make them -available, we'll be glad to provide a link to them. -\end{itemize} - -\item Bug fixes: -\begin{itemize} -\item Pattern matching (e.g. for \verb|ignore|) is now case-insensitive - when Unison is in case-insensitive mode (i.e., when one of the replicas - is on a windows machine). -\item Some people had trouble with mysterious failures during - propagation of updates, where files would be falsely reported as having - changed during synchronization. This should be fixed. -\item Numerous smaller fixes. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.4.1} -\item Added a number of 'sorting modes' for the user interface. By -default, conflicting changes are displayed at the top, and the rest of -the entries are sorted in alphabetical order. This behavior can be -changed in the following ways: -\begin{itemize} -\item Setting the \verb|sortnewfirst| preference to \verb|true| causes -newly created files to be displayed before changed files. -\item Setting \verb|sortbysize| causes files to be displayed in -increasing order of size. -\item Giving the preference \verb|sortfirst=| (where -\verb|| is a path descriptor in the same format as 'ignore' and 'follow' -patterns, causes paths matching this pattern to be displayed first. -\item Similarly, giving the preference \verb|sortlast=| -causes paths matching this pattern to be displayed last. -\end{itemize} -The sorting preferences are described in more detail in the user manual. -The \verb|sortnewfirst| and \verb|sortbysize| flags can also be accessed -from the 'Sort' menu in the grpahical user interface. - -\item Added two new preferences that can be used to change unison's -fundamental behavior to make it more like a mirroring tool instead of -a synchronizer. -\begin{itemize} -\item Giving the preference \verb|prefer| with argument \verb|| -(by adding \verb|-prefer | to the command line or \verb|prefer=|) -to your profile) means that, if there is a conflict, the contents of -\verb|| -should be propagated to the other replica (with no questions asked). -Non-conflicting changes are treated as usual. -\item Giving the preference \verb|force| with argument \verb|| -will make unison resolve {\em all} differences in favor of the given -root, even if it was the other replica that was changed. -\end{itemize} -These options should be used with care! (More information is available in -the manual.) - -\item Small changes: -\begin{itemize} -\item -Changed default answer to 'Yes' in all two-button dialogs in the - graphical interface (this seems more intuitive). - -\item The \verb|rsync| preference has been removed (it was used to -activate rsync compression for file transfers, but rsync compression is -now enabled by default). -\item In the text user interface, the arrows indicating which direction -changes are being - propagated are printed differently when the user has overridded Unison's - default recommendation (\verb|====>| instead of \verb|---->|). This - matches the behavior of the graphical interface, which displays such - arrows in a different color. -\item Carriage returns (Control-M's) are ignored at the ends of lines in - profiles, for Windows compatibility. -\item All preferences are now fully documented in the user manual. -\end{itemize} -\end{changesfromversion} - -\begin{changesfromversion}{2.3.12} -\item \incompatible{} Archive format has changed. Make sure you -synchronize your replicas before upgrading, to avoid spurious -conflicts. The first sync after upgrading will be slow. - -\item New/improved functionality: -\begin{itemize} -\item A new preference -sortbysize controls the order in which changes - are displayed to the user: when it is set to true, the smallest - changed files are displayed first. (The default setting is false.) -\item A new preference -sortnewfirst causes newly created files to be - listed before other updates in the user interface. -\item We now allow the ssh protocol to specify a port. -\item Incompatible change: The unison: protocol is deprecated, and we added - file: and socket:. You may have to modify your profiles in the - .unison directory. - If a replica is specified without an explicit protocol, we now - assume it refers to a file. (Previously "//saul/foo" meant to use - SSH to connect to saul, then access the foo directory. Now it means - to access saul via a remote file mechanism such as samba; the old - effect is now achieved by writing {\tt ssh://saul/foo}.) -\item Changed the startup sequence for the case where roots are given but - no profile is given on the command line. The new behavior is to - use the default profile (creating it if it does not exist), and - temporarily override its roots. The manual claimed that this case - would work by reading no profile at all, but AFAIK this was never - true. -\item In all user interfaces, files with conflicts are always listed first -\item A new preference 'sshversion' can be used to control which version - of ssh should be used to connect to the server. Legal values are 1 and 2. - (Default is empty, which will make unison use whatever version of ssh - is installed as the default 'ssh' command.) -\item The situation when the permissions of a file was updated the same on - both side is now handled correctly (we used to report a spurious conflict) - -\end{itemize} - -\item Improvements for the Windows version: -\begin{itemize} -\item The fact that filenames are treated case-insensitively under -Windows should now be handled correctly. The exact behavior is described -in the cross-platform section of the manual. -\item It should be possible to synchronize with Windows shares, e.g., - //host/drive/path. -\item Workarounds to the bug in syncing root directories in Windows. -The most difficult thing to fix is an ocaml bug: Unix.opendir fails on -c: in some versions of Windows. -\end{itemize} - -\item Improvements to the GTK user interface (the Tk interface is no -longer being maintained): -\begin{itemize} -\item The UI now displays actions differently (in blue) when they have been - explicitly changed by the user from Unison's default recommendation. -\item More colorful appearance. -\item The initial profile selection window works better. -\item If any transfers failed, a message to this effect is displayed along with - 'Synchronization complete' at the end of the transfer phase (in case they - may have scrolled off the top). -\item Added a global progress meter, displaying the percentage of {\em total} - bytes that have been transferred so far. -\end{itemize} - -\item Improvements to the text user interface: -\begin{itemize} -\item The file details will be displayed automatically when a - conflict is been detected. -\item when a warning is generated (e.g. for a temporary - file left over from a previous run of unison) Unison will no longer - wait for a response if it is running in -batch mode. -\item The UI now displays a short list of possible inputs each time it waits - for user interaction. -\item The UI now quits immediately (rather than looping back and starting - the interaction again) if the user presses 'q' when asked whether to - propagate changes. -\item Pressing 'g' in the text user interface will proceed immediately - with propagating updates, without asking any more questions. -\end{itemize} - -\item Documentation and installation changes: -\begin{itemize} -\item The manual now includes a FAQ, plus sections on common problems and -on tricks contributed by users. -\item Both the download page and the download directory explicitly say -what are the current stable and beta-test version numbers. -\item The OCaml sources for the up-to-the-minute developers' version (not -guaranteed to be stable, or even to compile, at any given time!) are now -available from the download page. -\item Added a subsection to the manual describing cross-platform - issues (case conflicts, illegal filenames) -\end{itemize} - -\item Many small bug fixes and random improvements. - -\end{changesfromversion} - -\begin{changesfromversion}{2.3.1} -\item Several bug fixes. The most important is a bug in the rsync -module that would occasionally cause change propagation to fail with a -'rename' error. -\end{changesfromversion} - -\begin{changesfromversion}{2.2} -\item The multi-threaded transport system is now disabled by default. -(It is not stable enough yet.) -\item Various bug fixes. -\item A new experimental feature: - - The final component of a -path argument may now be the wildcard - specifier \verb|*|. When Unison sees such a path, it expands this path on - the client into into the corresponding list of paths by listing the - contents of that directory. - - Note that if you use wildcard paths from the command line, you will - probably need to use quotes or a backslash to prevent the * from - being interpreted by your shell. - - If both roots are local, the contents of the first one will be used - for expanding wildcard paths. (Nb: this is the first one {\em after} the - canonization step -- i.e., the one that is listed first in the user - interface -- not the one listed first on the command line or in the - preferences file.) -\end{changesfromversion} - -\begin{changesfromversion}{2.1} -\item The transport subsystem now includes an implementation by -Sylvain Gommier and Norman Ramsey of Tridgell and Mackerras's -\verb|rsync| protocol. This protocol achieves much faster -transfers when only a small part of a large file has been changed by -sending just diffs. This feature is mainly helpful for transfers over -slow links---on fast local area networks it can actually degrade -performance---so we have left it off by default. Start unison with -the \verb|-rsync| option (or put \verb|rsync=true| in your preferences -file) to turn it on. - -\item ``Progress bars'' are now diplayed during remote file transfers, -showing what percentage of each file has been transferred so far. - -\item The version numbering scheme has changed. New releases will now - be have numbers like 2.2.30, where the second component is - incremented on every significant public release and the third - component is the ``patch level.'' - -\item Miscellaneous improvements to the GTK-based user interface. -\item The manual is now available in PDF format. - -\item We are experimenting with using a multi-threaded transport -subsystem to transfer several files at the same time, making -much more effective use of available network bandwidth. This feature -is not completely stable yet, so by default it is disabled in the -release version of Unison. - -If you want to play with the multi-threaded version, you'll need to -recompile Unison from sources (as described in the documentation), -setting the THREADS flag in Makefile.OCaml to true. Make sure that -your OCaml compiler has been installed with the \verb|-with-pthreads| -configuration option. (You can verify this by checking whether the -file \verb|threads/threads.cma| in the OCaml standard library -directory contains the string \verb|-lpthread| near the end.) -\end{changesfromversion} - -\begin{changesfromversion}{1.292} -\item Reduced memory footprint (this is especially important during -the first run of unison, where it has to gather information about all -the files in both repositories). -\item Fixed a bug that would cause the socket server under NT to fail - after the client exits. -\item Added a SHIFT modifier to the Ignore menu shortcut keys in GTK - interface (to avoid hitting them accidentally). -\end{changesfromversion} - -\begin{changesfromversion}{1.231} -\item Tunneling over ssh is now supported in the Windows version. See -the installation section of the manual for detailed instructions. - -\item The transport subsystem now includes an implementation of the -\verb|rsync| protocol, built by Sylvain Gommier and Norman Ramsey. -This protocol achieves much faster transfers when only a small part of -a large file has been changed by sending just diffs. The rsync -feature is off by default in the current version. Use the -\verb|-rsync| switch to turn it on. (Nb. We still have a lot of -tuning to do: you may not notice much speedup yet.) - -\item We're experimenting with a multi-threaded transport subsystem, -written by Jerome Vouillon. The downloadable binaries are still -single-threaded: if you want to try the multi-threaded version, you'll -need to recompile from sources. (Say \verb|make THREADS=true|.) -Native thread support from the compiler is required. Use the option -\verb|-threads N| to select the maximal number of concurrent -threads (default is 5). Multi-threaded -and single-threaded clients/servers can interoperate. - -\item A new GTK-based user interface is now available, thanks to -Jacques Garrigue. The Tk user interface still works, but we'll be -shifting development effort to the GTK interface from now on. -\item OCaml 3.00 is now required for compiling Unison from sources. -The modules \verb|uitk| and \verb|myfileselect| have been changed to -use labltk instead of camltk. To compile the Tk interface in Windows, -you must have ocaml-3.00 and tk8.3. When installing tk8.3, put it in -\verb|c:\Tcl| rather than the suggested \verb|c:\Program Files\Tcl|, -and be sure to install the headers and libraries (which are not -installed by default). - -\item Added a new \verb|-addversionno| switch, which causes unison to -use \verb|unison-| instead of just \verb|unison| -as the remote server command. This allows multiple versions of unison -to coexist conveniently on the same server: whichever version is run -on the client, the same version will be selected on the server. -\end{changesfromversion} - -\begin{changesfromversion}{1.219} -\item \incompatible{} Archive format has changed. Make sure you -synchronize your replicas before upgrading, to avoid spurious -conflicts. The first sync after upgrading will be slow. - -\item This version fixes several annoying bugs, including: -\begin{itemize} -\item Some cases where propagation of file permissions was not -working. -\item umask is now ignored when creating directories -\item directories are create writable, so that a read-only directory and - its contents can be propagated. -\item Handling of warnings generated by the server. -\item Synchronizing a path whose parent is not a directory on both sides is -now flagged as erroneous. -\item Fixed some bugs related to symnbolic links and nonexistant roots. -\begin{itemize} -\item - When a change (deletion or new contents) is propagated onto a - 'follow'ed symlink, the file pointed to by the link is now changed. - (We used to change the link itself, which doesn't fit our assertion - that 'follow' means the link is completely invisible) - \item When one root did not exist, propagating the other root on top of it - used to fail, becuase unison could not calculate the working directory - into which to write changes. This should be fixed. -\end{itemize} -\end{itemize} - -\item A human-readable timestamp has been added to Unison's archive files. - -\item The semantics of Path and Name regular expressions now -correspond better. - -\item Some minor improvements to the text UI (e.g. a command for going -back to previous items) - -\item The organization of the export directory has changed --- should -be easier to find / download things now. -\end{changesfromversion} - -\begin{changesfromversion}{1.200} -\item \incompatible{} Archive format has changed. Make sure you -synchronize your replicas before upgrading, to avoid spurious -conflicts. The first sync after upgrading will be slow. - -\item This version has not been tested extensively on Windows. - -\item Major internal changes designed to make unison safer to run -at the same time as the replicas are being changed by the user. - -\item Internal performance improvements. -\end{changesfromversion} - -\begin{changesfromversion}{1.190} -\item \incompatible{} Archive format has changed. Make sure you -synchronize your replicas before upgrading, to avoid spurious -conflicts. The first sync after upgrading will be slow. - -\item A number of internal functions have been changed to reduce the -amount of memory allocation, especially during the first -synchronization. This should help power users with very big replicas. - -\item Reimplementation of low-level remote procedure call stuff, in -preparation for adding rsync-like smart file transfer in a later -release. - -\item Miscellaneous bug fixes. -\end{changesfromversion} - -\begin{changesfromversion}{1.180} -\item \incompatible{} Archive format has changed. Make sure you -synchronize your replicas before upgrading, to avoid spurious -conflicts. The first sync after upgrading will be slow. - -\item Fixed some small bugs in the interpretation of ignore patterns. - -\item Fixed some problems that were preventing the Windows version -from working correctly when click-started. - -\item Fixes to treatment of file permissions under Windows, which were -causing spurious reports of different permissions when synchronizing -between windows and unix systems. - -\item Fixed one more non-tail-recursive list processing function, -which was causing stack overflows when synchronizing very large -replicas. -\end{changesfromversion} - -\begin{changesfromversion}{1.169} -\item The text user interface now provides commands for ignoring - files. -\item We found and fixed some {\em more} non-tail-recursive list - processing functions. Some power users have reported success with - very large replicas. -\item \incompatible -Files ending in \verb|.tmp| are no longer ignored automatically. If you want -to ignore such files, put an appropriate ignore pattern in your profile. - -\item \incompatible{} The syntax of {\tt ignore} and {\tt follow} -patterns has changed. Instead of putting a line of the form -\begin{verbatim} - ignore = -\end{verbatim} - in your profile ({\tt .unison/default.prf}), you should put: -\begin{verbatim} - ignore = Regexp -\end{verbatim} -Moreover, two other styles of pattern are also recognized: -\begin{verbatim} - ignore = Name -\end{verbatim} -matches any path in which one component matches \verb||, while -\begin{verbatim} - ignore = Path -\end{verbatim} -matches exactly the path \verb||. - -Standard ``globbing'' conventions can be used in \verb|| and -\verb||: -\begin{itemize} -\item a \verb|?| matches any single character except \verb|/| -\item a \verb|*| matches any sequence of characters not including \verb|/| -\item \verb|[xyz]| matches any character from the set $\{{\tt x}, - {\tt y}, {\tt z} \}$ -\item \verb|{a,bb,ccc}| matches any one of \verb|a|, \verb|bb|, or - \verb|ccc|. -\end{itemize} - -See the user manual for some examples. -\end{changesfromversion} - -\begin{changesfromversion}{1.146} -\item Some users were reporting stack overflows when synchronizing - huge directories. We found and fixed some non-tail-recursive list - processing functions, which we hope will solve the problem. Please - give it a try and let us know. -\item Major additions to the documentation. -\end{changesfromversion} - -\begin{changesfromversion}{1.142} -\item Major internal tidying and many small bugfixes. -\item Major additions to the user manual. -\item Unison can now be started with no arguments -- it will prompt -automatically for the name of a profile file containing the roots to -be synchronized. This makes it possible to start the graphical UI -from a desktop icon. -\item Fixed a small bug where the text UI on NT was raising a 'no such - signal' exception. -\end{changesfromversion} - -\begin{changesfromversion}{1.139} -\item The precompiled windows binary in the last release was compiled -with an old OCaml compiler, causing propagation of permissions not to -work (and perhaps leading to some other strange behaviors we've heard -reports about). This has been corrected. If you're using precompiled -binaries on Windows, please upgrade. -\item Added a \verb|-debug| command line flag, which controls debugging -of various modules. Say \verb|-debug XXX| to enable debug tracing for -module \verb|XXX|, or \verb|-debug all| to turn on absolutely everything. -\item Fixed a small bug where the text UI on NT was raising a 'no such signal' -exception. -\end{changesfromversion} - -\begin{changesfromversion}{1.111} -\item \incompatible{} The names and formats of the preference files in -the .unison directory have changed. In particular: -\begin{itemize} -\item the file ``prefs'' should be renamed to default.prf -\item the contents of the file ``ignore'' should be merged into - default.prf. Each line of the form \verb|REGEXP| in ignore should - become a line of the form \verb|ignore = REGEXP| in default.prf. -\end{itemize} -\item Unison now handles permission bits and symbolic links. See the -manual for details. - -\item You can now have different preference files in your .unison -directory. If you start unison like this -\begin{verbatim} - unison profilename -\end{verbatim} -(i.e. with just one ``anonymous'' command-line argument), then the -file \verb|~/.unison/profilename.prf| will be loaded instead of -\verb|default.prf|. - -\item Some improvements to terminal handling in the text user interface - -\item Added a switch -killServer that terminates the remote server process -when the unison client is shutting down, even when using sockets for -communication. (By default, a remote server created using ssh/rsh is -terminated automatically, while a socket server is left running.) -\item When started in 'socket server' mode, unison prints 'server started' on - stderr when it is ready to accept connections. - (This may be useful for scripts that want to tell when a socket-mode server - has finished initalization.) -\item We now make a nightly mirror of our current internal development - tree, in case anyone wants an up-to-the-minute version to hack - around with. -\item Added a file CONTRIB with some suggestions for how to help us -make Unison better. -\end{changesfromversion} - Copied: branches/2.32/doc/changes.tex (from rev 321, trunk/doc/changes.tex) =================================================================== --- branches/2.32/doc/changes.tex (rev 0) +++ branches/2.32/doc/changes.tex 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,1613 @@ +\begin{changesfromversion}{2.31} +\item Small user interface changes +\begin{itemize} +\item Small change to text UI "scanning..." messages, to print just + directories (hopefully making it clearer that individual files are + not necessarily being fingerprinted). +\end{itemize} +\item Minor fixes and improvements: +\begin{itemize} +\item Ignore one hour differences when deciding whether a file may have + been updated. This avoids slow update detection after daylight + saving time changes under Windows. This makes Unison slightly more + likely to miss an update, but it should be safe enough. +\item Fix a small bug that was affecting mainly windows users. We need to + commit the archives at the end of the sync even if there are no + updates to propagate because some files (in fact, if we've just + switched to DST on windows, a LOT of files) might have new modtimes + in the archive. (Changed the text UI only. It's less clear where + to change the GUI.) +\item Don't delete the temp file when a transfer fails due to a + fingerprint mismatch (so that we can have a look and see why!) We've also + added more debugging code togive more informative error messages when we + encounter the dreaded and longstanding "assert failed during file + transfer" bug +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.27} +\item If Unison is interrupted during a directory transfer, it will now +leave the partially transferred directory intact in a temporary +location. (This maintains the invariant that new files/directories are +transferred either completely or not at all.) The next time Unison is run, +it will continue filling in this temporary directory, skipping transferring +files that it finds are already there. +\item We've added experimental support for invoking an external file +transfer tool for whole-file copies instead of Unison's built-in transfer +protocol. Three new preferences have been added: +\begin{itemize} +\item {\tt copyprog} is a string giving the name (and command-line +switches, if needed) of an external program that can be used to copy large +files efficiently. By default, rsync is invoked, but other tools such as +scp can be used instead by changing the value of this preference. (Although +this is not its primary purpose, rsync is actually a pretty fast way of +copying files that don't already exist on the receiving host.) For files +that do already exist on (but that have been changed in one replica), Unison +will always use its built-in implementation of the rsync algorithm. +\item Added a "copyprogrest" preference, so that we can give different +command lines for invoking the external copy utility depending on whether a +partially transferred file already exists or not. (Rsync doesn't seem to +care about this, but other utilities may.) +\item {\tt copythreshold} is an integer (-1 by default), indicating above what +filesize (in megabytes) Unison should use the external copying utility +specified by copyprog. Specifying 0 will cause ALL copies to use the +external program; a negative number will prevent any files from using it. +(Default is -1.) +\end{itemize} +Thanks to Alan Schmitt for a huge amount of hacking and to an anonymous +sponsor for suggesting and underwriting this extension. +\item Small improvements: +\begin{itemize} +\item Added a new preference, {\tt dontchmod}. By default, Unison uses the +{\tt chmod} system call to set the permission bits of files after it has +copied them. But in some circumstances (and under some operating systems), +the chmod call always fails. Setting this preference completely prevents +Unison from ever calling {\tt chmod}. +\item Don't ignore files that look like backup files if the {\tt + backuplocation} preference is set to {\tt central} +\item Shortened the names of several preferences. The old names are also +still supported, for backwards compatibility, but they do not appear in the +documentation. +\item Lots of little documentation tidying. (In particular, preferences are +separated into Basic and Advanced! This should hopefully make Unison a +little more approachable for new users. +\item Unison can sometimes fail to transfer a file, giving the unhelpful +message "Destination updated during synchronization" even though the file +has not been changed. This can be caused by programs that change either the +file's contents \emph{or} the file's extended attributes without changing +its modification time. It's not clear what is the best fix for this -- it +is not Unison's fault, but it makes Unison's behavior puzzling -- but at +least Unison can be more helpful about suggesting a workaround (running once +with {\tt fastcheck} set to false). The failure message has been changed to +give this advice. +\item Further improvements to the OS X GUI (thanks to Alan Schmitt and Craig +Federighi). +\end{itemize} +\item Very preliminary support for triggering Unison from an external + filesystem-watching utility. The current implementation is very + simple, not efficient, and almost completely untested---not ready + for real users. But if someone wants to help improve it (e.g., + by writing a filesystem watcher for your favorite OS), please make + yourself known! + + On the Unison side, the new behavior is very simple: + \begin{itemize} + \item use the text UI + \item start Unison with the command-line flag "-repeat FOO", + where FOO is name of a file where Unison should look + for notifications of changes + \item when it starts up, Unison will read the whole contents + of this file (on both hosts), which should be a + newline-separated list of paths (relative to the root + of the synchronization) and synchronize just these paths, + as if it had been started with the "-path=xxx" option for + each one of them + \item when it finishes, it will sleep for a few seconds and then + examine the watchfile again; if anything has been added, it + will read the new paths, synchronize them, and go back to + sleep + \item that's it! + \end{itemize} + To use this to drive Unison "incrementally," just start it in + this mode and start up a tool (on each host) to watch for + new changes to the filesystem and append the appropriate paths + to the watchfile. Hopefully such tools should not be too hard + to write. +\item Bug fixes: +\begin{itemize} +\item Fixed a bug that was causing new files to be created with + permissions 0x600 instead of using a reasonable default (like + 0x644), if the 'perms' flag was set to 0. (Bug reported by Ben + Crowell.) +\item Follow maxthreads preference when transferring directories. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.17} +\item Major rewrite and cleanup of the whole Mac OS X graphical user +interface by Craig Federighi. Thanks, Craig!!! +\item Small fix to ctime (non-)handling in update detection under windows + with fastcheck. +\item Several small fixes to the GTK2 UI to make it work better under +Windows [thanks to Karl M for these]. +\item The backup functionality has been completely rewritten. The external +interface has not changed, but numerous bugs, irregular behaviors, and +cross-platform inconsistencies have been corrected. +\item The Unison project now accepts donations via PayPal. If you'd like to +donate, you can find a link to the donation page on the +\URL{http://www.cis.upenn.edu/~bcpierce/unison/lists.html}{Unison home + page}. +\item Some important safety improvements: +\begin{itemize} +\item Added a new \verb|mountpoint| preference, which can be used to specify +a path that must exist in both replicas at the end of update detection +(otherwise Unison aborts). This can be used to avoid potentially dangerous +situations when Unison is used with removable media such as external hard +drives and compact flash cards. +\item The confirmation of ``big deletes'' is now controlled by a boolean preference + \verb|confirmbigdeletes|. Default is true, which gives the same behavior as + previously. (This functionality is at least partly superceded by the + \verb|mountpoint| preference, but it has been left in place in case it is + useful to some people.) + \item If Unison is asked to ``follow'' a symbolic link but there is + nothing at the other end of the link, it will now flag this path as an + error, rather than treating the symlink itself as missing or deleted. + This avoids a potentially dangerous situation where a followed symlink + points to an external filesystem that might be offline when Unison is run + (whereupon Unison would cheerfully delete the corresponding files in the + other replica!). +\end{itemize} + +\item Smaller changes: +\begin{itemize} +\item Added \verb|forcepartial| and \verb|preferpartial| preferences, which +behave like \verb|force| and \verb|prefer| but can be specified on a +per-path basis. [Thanks to Alan Schmitt for this.] +\item A bare-bones self test feature was added, which runs unison through + some of its paces and checks that the results are as expected. The + coverage of the tests is still very limited, but the facility has already + been very useful in debugging the new backup functionality (especially in + exposing some subtle cross-platform issues). +\item Refined debugging code so that the verbosity of individual modules + can be controlled separately. Instead of just putting '-debug + verbose' on the command line, you can put '-debug update+', which + causes all the extra messages in the Update module, but not other + modules, to be printed. Putting '-debug verbose' causes all modules + to print with maximum verbosity. +\item Removed \verb|mergebatch| preference. (It never seemed very useful, and + its semantics were confusing.) +\item Rewrote some of the merging functionality, for better cooperation + with external Harmony instances. +\item Changed the temp file prefix from \verb|.#| to \verb|.unison|. +\item Compressed the output from the text user interface (particularly + when run with the \verb|-terse| flag) to make it easier to interpret the + results when Unison is run several times in succession from a script. +\item Diff and merge functions now work under Windows. +\item Changed the order of arguments to the default diff command (so that + the + and - annotations in diff's output are reversed). +\item Added \verb|.mpp| files to the ``never fastcheck'' list (like +\verb|.xls| files). +\end{itemize} + +\item Many small bugfixes, including: +\begin{itemize} +\item Fixed a longstanding bug regarding fastcheck and daylight saving time + under Windows when Unison is set up to synchronize modification times. + (Modification times cannot be updated in the archive in this case, + so we have to ignore one hour differences.) +\item Fixed a bug that would occasionally cause the archives to be left in + non-identical states on the two hosts after synchronization. +\item Fixed a bug that prevented Unison from communicating correctly between + 32- and 64-bit architectures. +\item On windows, file creation times are no longer used as a proxy for + inode numbers. (This is unfortunate, as it makes fastcheck a little less + safe. But it turns out that file creation times are not reliable + under Windows: if a file is removed and a new file is created in its + place, the new one will sometimes be given the same creation date as the + old one!) +\item Set read-only file to R/W on OSX before attempting to change other attributes. +\item Fixed bug resulting in spurious "Aborted" errors during transport +(thanks to Jerome Vouillon) +\item Enable diff if file contents have changed in one replica, but +only properties in the other. +\item Removed misleading documentation for 'repeat' preference. +\item Fixed a bug in merging code where Unison could sometimes deadlock + with the external merge program, if the latter produced large + amounts of output. +\item Workaround for a bug compiling gtk2 user interface against current versions + of gtk2+ libraries. +\item Added a better error message for "ambiguous paths". +\item Squashed a longstanding bug that would cause file transfer to fail + with the message ``Failed: Error in readWrite: Is a directory.'' +\item Replaced symlinks with copies of their targets in the Growl framework in src/uimac. + This should make the sources easier to check out from the svn repository on WinXP + systems. +\item Added a workaround (suggested by Karl M.) for the problem discussed + on the unison users mailing list where, on the Windows platform, the + server would hang when transferring files. I conjecture that + the problem has to do with the RPC mechanism, which was used to + make a call {\em back} from the server to the client (inside the Trace.log + function) so that the log message would be appended to the log file on + the client. The workaround is to dump these messages (about when + xferbycopying shortcuts are applied and whether they succeed) just to the + standard output of the Unison process, not to the log file. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.13.0} +\item The features for performing backups and for invoking external merge +programs have been completely rewritten by Stephane Lescuyer (thanks, +Stephane!). The user-visible functionality should not change, but the +internals have been rationalized and there are a number of new features. +See the manual (in particular, the description of the \verb|backupXXX| +preferences) for details. +\item Incorporated patches for ipv6 support, contributed by Samuel Thibault. +(Note that, due to a bug in the released OCaml 3.08.3 compiler, this code +will not actually work with ipv6 unless compiled with the CVS version of the +OCaml compiler, where the bug has been fixed; however, ipv4 should continue +to work normally.) +\item OSX interface: +\begin{itemize} +\item Incorporated Ben Willmore's cool new icon for the Mac UI. +\end{itemize} +\item Small fixes: +\begin{itemize} +\item Fixed off by one error in month numbers (in printed dates) reported + by Bob Burger +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.12.0} +\item New convention for release numbering: Releases will continue to be +given numbers of the form \verb|X.Y.Z|, but, +from now on, just the major version number (\verb|X.Y|) will be considered +significant when checking compatibility between client and server versions. +The third component of the version number will be used only to identify +``patch levels'' of releases. + +This change goes hand in hand with a change to the procedure for making new +releases. Candidate releases will initially be given ``beta release'' +status when they are announced for public consumption. Any bugs that are +discovered will be fixed in a separate branch of the source repository +(without changing the major version number) and new tarballs re-released as +needed. When this process converges, the patched beta version will be +dubbed stable. +\item Warning (failure in batch mode) when one path is completely emptied. + This prevents Unison from deleting everything on one replica when + the other disappear. +\item Fix diff bug (where no difference is shown the first time the diff + command is given). +\item User interface changes: +\begin{itemize} +\item Improved workaround for button focus problem (GTK2 UI) +\item Put leading zeroes in date fields +\item More robust handling of character encodings in GTK2 UI +\item Changed format of modification time displays, from \verb|modified at hh:mm:ss on dd MMM, yyyy| +to \verb|modified on yyyy-mm-dd hh:mm:ss| +\item Changed time display to include seconds (so that people on FAT + filesystems will not be confused when Unison tries to update a file + time to an odd number of seconds and the filesystem truncates it to + an even number!) +\item Use the diff "-u" option by default when showing differences between files + (the output is more readable) +\item In text mode, pipe the diff output to a pager if the environment + variable PAGER is set +\item Bug fixes and cleanups in ssh password prompting. Now works with + the GTK2 UI under Linux. (Hopefully the Mac OS X one is not broken!) +\item Include profile name in the GTK2 window name +\item Added bindings ',' (same as '<') and '.' (same as '>') in the GTK2 UI +\end{itemize} +\item Mac GUI: +\begin{itemize} +\item actions like < and > scroll to the next item as necessary. +\item Restart has a menu item and keyboard shortcut (command-R). +\item + Added a command-line tool for Mac OS X. It can be installed from + the Unison menu. +\item New icon. +\item Handle the "help" command-line argument properly. +\item Handle profiles given on the command line properly. +\item When a profile has been selected, the profile dialog is replaced by a + "connecting" message while the connection is being made. This + gives better feedback. +\item Size of left and right columns is now large enough so that + "PropsChanged" is not cut off. +\end{itemize} +\item Minor changes: +\begin{itemize} +\item Disable multi-threading when both roots are local +\item Improved error handling code. In particular, make sure all files + are closed in case of a transient failure +\item Under Windows, use \verb|$UNISON| for home directory as a last resort + (it was wrongly moved before \verb|$HOME| and \verb|$USERPROFILE| in + Unison 2.12.0) +\item Reopen the logfile if its name changes (profile change) +\item Double-check that permissions and modification times have been + properly set: there are some combination of OS and filesystem on + which setting them can fail in a silent way. +\item Check for bad Windows filenames for pure Windows synchronization + also (not just cross architecture synchronization). + This way, filenames containing backslashes, which are not correctly + handled by unison, are rejected right away. +\item Attempt to resolve issues with synchronizing modification times + of read-only files under Windows +\item Ignore chmod failures when deleting files +\item Ignore trailing dots in filenames in case insensitive mode +\item Proper quoting of paths, files and extensions ignored using the UI +\item The strings CURRENT1 and CURRENT2 are now correctly substitued when + they occur in the diff preference +\item Improvements to syncing resource forks between Macs via a non-Mac system. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.10.2} +\item \incompatible{} Archive format has changed. +\item Source code availability: The Unison sources are now managed using + Subversion. One nice side-effect is that anonymous checkout is now + possible, like this: +\begin{verbatim} + svn co https://cvs.cis.upenn.edu:3690/svnroot/unison/ +\end{verbatim} +We will also continue to export a ``developer tarball'' of the current +(modulo one day) sources in the web export directory. To receive commit logs +for changes to the sources, subscribe to the \verb|unison-hackers| list +(\ONEURL{http://www.cis.upenn.edu/~bcpierce/unison/lists.html}). +\item Text user interface: +\begin{itemize} +\item Substantial reworking of the internal logic of the text UI to make it +a bit easier to modify. +\item The {\tt dumbtty} flag in the text UI is automatically set to true if +the client is running on a Unix system and the {\tt EMACS} environment +variable is set to anything other than the empty string. +\end{itemize} +\item Native OS X gui: +\begin{itemize} +\item Added a synchronize menu item with keyboard shortcut +\item Added a merge menu item, still needs to be debugged +\item Fixes to compile for Panther +\item Miscellaneous improvements and bugfixes +\end{itemize} +\item Small changes: +\begin{itemize} +\item Changed the filename checking code to apply to Windows only, instead + of OS X as well. +\item Finder flags now synchronized +\item Fallback in copy.ml for filesystem that do not support \verb|O_EXCL| +\item Changed buffer size for local file copy (was highly inefficient with + synchronous writes) +\item Ignore chmod failure when deleting a directory +\item Fixed assertion failure when resolving a conflict content change / + permission changes in favor of the content change. +\item Workaround for transferring large files using rsync. +\item Use buffered I/O for files (this is the only way to open files in binary + mode under Cygwin). +\item On non-Cygwin Windows systems, the UNISON environment variable is now checked first to determine + where to look for Unison's archive and preference files, followed by \verb|HOME| and + \verb|USERPROFILE| in that order. On Unix and Cygwin systems, \verb|HOME| is used. +\item Generalized \verb|diff| preference so that it can be given either as just + the command name to be used for calculating diffs or else a whole command + line, containing the strings \verb|CURRENT1| and \verb|CURRENT2|, which will be replaced + by the names of the files to be diff'ed before the command is called. +\item Recognize password prompts in some newer versions of ssh. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.9.20} +\item \incompatible{} Archive format has changed. +\item Major functionality changes: +\begin{itemize} +\item Major tidying and enhancement of 'merge' functionality. The main + user-visible change is that the external merge program may either write + the merged output to a single new file, as before, or it may modify one or + both of its input files, or it may write {\em two} new files. In the + latter cases, its modifications will be copied back into place on both the + local and the remote host, and (if the two files are now equal) the + archive will be updated appropriately. More information can be found in + the user manual. Thanks to Malo Denielou and Alan Schmitt for these + improvements. + + Warning: the new merging functionality is not completely compatible with + old versions! Check the manual for details. +\item Files larger than 2Gb are now supported. +\item Added preliminary (and still somewhat experimental) support for the + Apple OS X operating system. +\begin{itemize} +\item Resource forks should be transferred correctly. (See the manual for +details of how this works when synchronizing HFS with non-HFS volumes.) +Synchronization of file type and creator information is also supported. +\item On OSX systems, the name of the directory for storing Unison's +archives, preference files, etc., is now determined as follows: +\begin{itemize} + \item if \verb+~/.unison+ exists, use it + \item otherwise, use \verb|~/Library/Application Support/Unison|, + creating it if necessary. +\end{itemize} +\item A preliminary native-Cocoa user interface is under construction. This +still needs some work, and some users experience unpredictable crashes, so +it is only for hackers for now. Run make with {\tt UISTYLE=mac} to build +this interface. +\end{itemize} +\end{itemize} + +\item Minor functionality changes: +\begin{itemize} +\item Added an {\tt ignorelocks} preference, which forces Unison to override left-over + archive locks. (Setting this preference is dangerous! Use it only if you + are positive you know what you are doing.) +% BCP: removed later +% \item Running with the {\tt -timers} flag set to true will now show the total time taken +% to check for updates on each directory. (This can be helpful for tidying directories to improve +% update detection times.) +\item Added a new preference {\tt assumeContentsAreImmutable}. If a directory + matches one of the patterns set in this preference, then update detection + is skipped for files in this directory. (The + purpose is to speed update detection for cases like Mail folders, which + contain lots and lots of immutable files.) Also a preference + {\tt assumeContentsAreImmutableNot}, which overrides the first, similarly + to {\tt ignorenot}. (Later amendment: these preferences are now called + {\tt immutable} and {\tt immutablenot}.) +\item The {\tt ignorecase} flag has been changed from a boolean to a three-valued + preference. The default setting, called {\tt default}, checks the operating systems + running on the client and server and ignores filename case if either of them is + OSX or Windows. Setting ignorecase to {\tt true} or {\tt false} overrides + this behavior. If you have been setting {\tt ignorecase} on the command + line using {\tt -ignorecase=true} or {\tt -ignorecase=false}, you will + need to change to {\tt -ignorecase true} or {\tt -ignorecase false}. +\item a new preference, 'repeat', for the text user interface (only). If 'repeat' is set to + a number, then, after it finishes synchronizing, Unison will wait for that many seconds and + then start over, continuing this way until it is killed from outside. Setting repeat to true + will automatically set the batch preference to true. +\item Excel files are now handled specially, so that the {\tt fastcheck} + optimization is skipped even if the {\tt fastcheck} flag is set. (Excel + does some naughty things with modtimes, making this optimization + unreliable and leading to failures during change propagation.) +\item The ignorecase flag has been changed from a boolean to a three-valued + preference. The default setting, called 'default', checks the operating systems + running on the client and server and ignores filename case if either of them is + OSX or Windows. Setting ignorecase to 'true' or 'false' overrides this behavior. +\item Added a new preference, 'repeat', for the text user interface (only, + at the moment). If 'repeat' is set to a number, then, after it finishes + synchronizing, Unison will wait for that many seconds and then start over, + continuing this way until it is killed from outside. Setting repeat to + true will automatically set the batch preference to true. +\item The 'rshargs' preference has been split into 'rshargs' and 'sshargs' + (mainly to make the documentation clearer). In fact, 'rshargs' is no longer + mentioned in the documentation at all, since pretty much everybody uses + ssh now anyway. +\end{itemize} +\item Documentation +\begin{itemize} +\item The web pages have been completely redesigned and reorganized. + (Thanks to Alan Schmitt for help with this.) +\end{itemize} +\item User interface improvements +\begin{itemize} +\item Added a GTK2 user interface, capable (among other things) of displaying filenames + in any locale encoding. Kudos to Stephen Tse for contributing this code! +\item The text UI now prints a list of failed and skipped transfers at the end of + synchronization. +\item Restarting update detection from the graphical UI will reload the current + profile (which in particular will reset the -path preference, in case + it has been narrowed by using the ``Recheck unsynchronized items'' + command). +\item Several small improvements to the text user interface, including a + progress display. +\end{itemize} +\item Bug fixes (too numerous to count, actually, but here are some): +\begin{itemize} +\item The {\tt maxthreads} preference works now. +\item Fixed bug where warning message about uname returning an unrecognized + result was preventing connection to server. (The warning is no longer + printed, and all systems where 'uname' returns anything other than 'Darwin' + are assumed not to be running OS X.) +\item Fixed a problem on OS X that caused some valid file names (e.g., + those including colons) to be considered invalid. +\item Patched Path.followLink to follow links under cygwin in addition to Unix + (suggested by Matt Swift). +\item Small change to the storeRootsName function, suggested by bliviero at + ichips.intel.com, to fix a problem in unison with the `rootalias' + option, which allows you to tell unison that two roots contain the same + files. Rootalias was being applied after the hosts were + sorted, so it wouldn't work properly in all cases. +\item Incorporated a fix by Dmitry Bely for setting utimes of read-only files + on Win32 systems. +\end{itemize} +\item Installation / portability: +\begin{itemize} +\item Unison now compiles with OCaml version 3.07 and later out of the box. +\item Makefile.OCaml fixed to compile out of the box under OpenBSD. +\item a few additional ports (e.g. OpenBSD, Zaurus/IPAQ) are now mentioned in + the documentation +\item Unison can now be installed easily on OSX systems using the Fink + package manager +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.9.1} +\item Added a preference {\tt maxthreads} that can be used to limit the +number of simultaneous file transfers. +\item Added a {\tt backupdir} preference, which controls where backup +files are stored. +\item Basic support added for OSX. In particular, Unison now recognizes +when one of the hosts being synchronized is running OSX and switches to +a case-insensitive treatment of filenames (i.e., 'foo' and 'FOO' are +considered to be the same file). + (OSX is not yet fully working, + however: in particular, files with resource forks will not be + synchronized correctly.) +\item The same hash used to form the archive name is now also added to +the names of the temp files created during file transfer. The reason for +this is that, during update detection, we are going to silently delete +any old temp files that we find along the way, and we want to prevent +ourselves from deleting temp files belonging to other instances of Unison +that may be running in parallel, e.g. synchronizing with a different +host. Thanks to Ruslan Ermilov for this suggestion. +\item Several small user interface improvements +\item Documentation +\begin{itemize} +\item FAQ and bug reporting instructions have been split out as separate + HTML pages, accessible directly from the unison web page. +\item Additions to FAQ, in particular suggestions about performance +tuning. +\end{itemize} +\item Makefile +\begin{itemize} +\item Makefile.OCaml now sets UISTYLE=text or UISTYLE=gtk automatically, + depending on whether it finds lablgtk installed +\item Unison should now compile ``out of the box'' under OSX +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.8.1} +\item Changing profile works again under Windows +\item File movement optimization: Unison now tries to use local copy instead of + transfer for moved or copied files. It is controled by a boolean option + ``xferbycopying''. +\item Network statistics window (transfer rate, amount of data transferred). + [NB: not available in Windows-Cygwin version.] +\item symlinks work under the cygwin version (which is dynamically linked). +\item Fixed potential deadlock when synchronizing between Windows and +Unix +\item Small improvements: + \begin{itemize} + \item If neither the {\tt USERPROFILE} nor the {\tt HOME} environment + variables are set, then Unison will put its temporary commit log + (called {\tt DANGER.README}) into the directory named by the + {\tt UNISON} environment variable, if any; otherwise it will use + {\tt C:}. + \item alternative set of values for fastcheck: yes = true; no = false; + default = auto. + \item -silent implies -contactquietly + \end{itemize} +\item Source code: + \begin{itemize} + \item Code reorganization and tidying. (Started breaking up some of the + basic utility modules so that the non-unison-specific stuff can be + made available for other projects.) + \item several Makefile and docs changes (for release); + \item further comments in ``update.ml''; + \item connection information is not stored in global variables anymore. + \end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.7.78} +\item Small bugfix to textual user interface under Unix (to avoid leaving + the terminal in a bad state where it would not echo inputs after Unison + exited). +\end{changesfromversion} + +\begin{changesfromversion}{2.7.39} +\item Improvements to the main web page (stable and beta version docs are + now both accessible). +\item User manual revised. +\item Added some new preferences: +\begin{itemize} +\item ``sshcmd'' and ``rshcmd'' for specifying paths to ssh and rsh programs. +\item ``contactquietly'' for suppressing the ``contacting server'' message +during Unison startup (under the graphical UI). +\end{itemize} +\item Bug fixes: +\begin{itemize} +\item Fixed small bug in UI that neglected to change the displayed column + headers if loading a new profile caused the roots to change. +\item Fixed a bug that would put the text UI into an infinite loop if it + encountered a conflict when run in batch mode. +\item Added some code to try to fix the display of non-Ascii characters in + filenames on Windows systems in the GTK UI. (This code is currently + untested---if you're one of the people that had reported problems with + display of non-ascii filenames, we'd appreciate knowing if this actually + fixes things.) +\item `\verb|-prefer/-force newer|' works properly now. + (The bug was reported by Sebastian Urbaniak and Sean Fulton.) +\end{itemize} +\item User interface and Unison behavior: +\begin{itemize} +\item Renamed `Proceed' to `Go' in the graphical UI. +\item Added exit status for the textual user interface. +\item Paths that are not synchronized because of conflicts or errors during + update detection are now noted in the log file. +\item \verb|[END]| messages in log now use a briefer format +\item Changed the text UI startup sequence so that + {\tt ./unison -ui text} will use the default profile instead of failing. +\item Made some improvements to the error messages. +\item Added some debugging messages to remote.ml. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.7.7} +\item Incorporated, once again, a multi-threaded transport sub-system. + It transfers several files at the same time, thereby making much + more effective use of available network bandwidth. Unlike the + earlier attempt, this time we do not rely on the native thread + library of OCaml. Instead, we implement a light-weight, + non-preemptive multi-thread library in OCaml directly. This version + appears stable. + + Some adjustments to unison are made to accommodate the multi-threaded + version. These include, in particular, changes to the + user interface and logging, for example: + \begin{itemize} + \item Two log entries for each transferring task, one for the + beginning, one for the end. + \item Suppressed warning messages against removing temp files left + by a previous unison run, because warning does not work nicely + under multi-threading. The temp file names are made less likely + to coincide with the name of a file created by the user. They + take the form \\ \verb|.#..unison.tmp|. + [N.b. This was later changed to \verb|.unison...unison.tmp|.] + \end{itemize} +\item Added a new command to the GTK user interface: pressing 'f' causes + Unison to start a new update detection phase, using as paths {\em just} + those paths that have been detected as changed and not yet marked as + successfully completed. Use this command to quickly restart Unison on + just the set of paths still needing attention after a previous run. +\item Made the {\tt ignorecase} preference user-visible, and changed the + initialization code so that it can be manually set to true, even if + neither host is running Windows. (This may be useful, e.g., when using + Unison running on a Unix system with a FAT volume mounted.) +\item Small improvements and bug fixes: + \begin{itemize} + \item Errors in preference files now generate fatal errors rather than + warnings at startup time. (I.e., you can't go on from them.) Also, + we fixed a bug that was preventing these warnings from appearing in the + text UI, so some users who have been running (unsuspectingly) with + garbage in their prefs files may now get error reports. + \item Error reporting for preference files now provides file name and + line number. + \item More intelligible message in the case of identical change to the same + files: ``Nothing to do: replicas have been changed only in identical + ways since last sync.'' + \item Files with prefix '.\#' excluded when scanning for preference + files. + \item Rsync instructions are send directly instead of first + marshaled. + \item Won't try forever to get the fingerprint of a continuously changing file: + unison will give up after certain number of retries. + \item Other bug fixes, including the one reported by Peter Selinger + (\verb|force=older preference| not working). + \end{itemize} +\item Compilation: + \begin{itemize} + \item Upgraded to the new OCaml 3.04 compiler, with the LablGtk + 1.2.3 library (patched version used for compiling under Windows). + \item Added the option to compile unison on the Windows platform with + Cygwin GNU C compiler. This option only supports building + dynamically linked unison executables. + \end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.7.4} +\item Fixed a silly (but debilitating) bug in the client startup sequence. +\end{changesfromversion} + +\begin{changesfromversion}{2.7.1} +\item Added \verb|addprefsto| preference, which (when set) controls which +preference file new preferences (e.g. new ignore patterns) are added to. +\item Bug fix: read the initial connection header one byte at a time, so +that we don't block if the header is shorter than expected. (This bug +did not affect normal operation --- it just made it hard to tell when you +were trying to use Unison incorrectly with an old version of the server, +since it would hang instead of giving an error message.) +\end{changesfromversion} + +\begin{changesfromversion}{2.6.59} +\item Changed \verb|fastcheck| from a boolean to a string preference. Its + legal values are \verb|yes| (for a fast check), \verb|no| (for a safe + check), or \verb|default| (for a fast check---which also happens to be + safe---when running on Unix and a safe check when on Windows). The default + is \verb|default|. + \item Several preferences have been renamed for consistency. All + preference names are now spelled out in lowercase. For backward + compatibility, the old names still work, but they are not mentioned in + the manual any more. +\item The temp files created by the 'diff' and 'merge' commands are now + named by {\em pre}pending a new prefix to the file name, rather than + appending a suffix. This should avoid confusing diff/merge programs + that depend on the suffix to guess the type of the file contents. +\item We now set the keepalive option on the server socket, to make sure + that the server times out if the communication link is unexpectedly broken. +\item Bug fixes: +\begin{itemize} +\item When updating small files, Unison now closes the destination file. +\item File permissions are properly updated when the file is behind a + followed link. +\item Several other small fixes. +\end{itemize} +\end{changesfromversion} + + +\begin{changesfromversion}{2.6.38} +\item Major Windows performance improvement! + +We've added a preference \verb|fastcheck| that makes Unison look only at +a file's creation time and last-modified time to check whether it has +changed. This should result in a huge speedup when checking for updates +in large replicas. + + When this switch is set, Unison will use file creation times as + 'pseudo inode numbers' when scanning Windows replicas for updates, + instead of reading the full contents of every file. This may cause + Unison to miss propagating an update if the create time, + modification time, and length of the file are all unchanged by + the update (this is not easy to achieve, but it can be done). + However, Unison will never {\em overwrite} such an update with + a change from the other replica, since it + always does a safe check for updates just before propagating a + change. Thus, it is reasonable to use this switch most of the time + and occasionally run Unison once with {\tt fastcheck} set to false, + if you are worried that Unison may have overlooked an update. + + Warning: This change is has not yet been thoroughly field-tested. If you + set the \verb|fastcheck| preference, pay careful attention to what + Unison is doing. + +\item New functionality: centralized backups and merging +\begin{itemize} +\item This version incorporates two pieces of major new functionality, + implemented by Sylvain Roy during a summer internship at Penn: a + {\em centralized backup} facility that keeps a full backup of + (selected files + in) each replica, and a {\em merging} feature that allows Unison to + invoke an external file-merging tool to resolve conflicting changes to + individual files. + +\item Centralized backups: +\begin{itemize} + \item Unison now maintains full backups of the last-synchronized versions + of (some of) the files in each replica; these function both as + backups in the usual sense + and as the ``common version'' when invoking external + merge programs. + \item The backed up files are stored in a directory ~/.unison/backup on each + host. (The name of this directory can be changed by setting + the environment variable \verb|UNISONBACKUPDIR|.) + \item The predicate \verb|backup| controls which files are actually + backed up: + giving the preference '\verb|backup = Path *|' causes backing up + of all files. + \item Files are added to the backup directory whenever unison updates + its archive. This means that + \begin{itemize} + \item When unison reconstructs its archive from scratch (e.g., + because of an upgrade, or because the archive files have + been manually deleted), all files will be backed up. + \item Otherwise, each file will be backed up the first time unison + propagates an update for it. + \end{itemize} + \item The preference \verb|backupversions| controls how many previous + versions of each file are kept. The default is 2 (i.e., the last + synchronized version plus one backup). + \item For backward compatibility, the \verb|backups| preference is also + still supported, but \verb|backup| is now preferred. + \item It is OK to manually delete files from the backup directory (or to throw + away the directory itself). Before unison uses any of these files for + anything important, it checks that its fingerprint matches the one + that it expects. +\end{itemize} + +\item Merging: +\begin{itemize} + \item Both user interfaces offer a new 'merge' command, invoked by pressing + 'm' (with a changed file selected). + \item The actual merging is performed by an external program. + The preferences \verb|merge| and \verb|merge2| control how this + program is invoked. If a backup exists for this file (see the + \verb|backup| preference), then the \verb|merge| preference is used for + this purpose; otherwise \verb|merge2| is used. In both cases, the + value of the preference should be a string representing the command + that should be passed to a shell to invoke the + merge program. Within this string, the special substrings + \verb|CURRENT1|, \verb|CURRENT2|, \verb|NEW|, and \verb|OLD| may appear + at any point. Unison will substitute these as follows before invoking + the command: + \begin{itemize} + \item \relax\verb|CURRENT1| is replaced by the name of the local + copy of the file; + \item \relax\verb|CURRENT2| is replaced by the name of a temporary + file, into which the contents of the remote copy of the file have + been transferred by Unison prior to performing the merge; + \item \relax\verb|NEW| is replaced by the name of a temporary + file that Unison expects to be written by the merge program when + it finishes, giving the desired new contents of the file; and + \item \relax\verb|OLD| is replaced by the name of the backed up + copy of the original version of the file (i.e., its state at the + end of the last successful run of Unison), if one exists + (applies only to \verb|merge|, not \verb|merge2|). + \end{itemize} + For example, on Unix systems setting the \verb|merge| preference to +\begin{verbatim} + merge = diff3 -m CURRENT1 OLD CURRENT2 > NEW +\end{verbatim} + will tell Unison to use the external \verb|diff3| program for merging. + + A large number of external merging programs are available. For + example, \verb|emacs| users may find the following convenient: +\begin{verbatim} + merge2 = emacs -q --eval '(ediff-merge-files "CURRENT1" "CURRENT2" + nil "NEW")' + merge = emacs -q --eval '(ediff-merge-files-with-ancestor + "CURRENT1" "CURRENT2" "OLD" nil "NEW")' +\end{verbatim} +(These commands are displayed here on two lines to avoid running off the +edge of the page. In your preference file, each should be written on a +single line.) + + \item If the external program exits without leaving any file at the + path \verb|NEW|, + Unison considers the merge to have failed. If the merge program writes + a file called \verb|NEW| but exits with a non-zero status code, + then Unison + considers the merge to have succeeded but to have generated conflicts. + In this case, it attempts to invoke an external editor so that the + user can resolve the conflicts. The value of the \verb|editor| + preference controls what editor is invoked by Unison. The default + is \verb|emacs|. + + \item Please send us suggestions for other useful values of the + \verb|merge2| and \verb|merge| preferences -- we'd like to give several + examples in the manual. +\end{itemize} +\end{itemize} + +\item Smaller changes: +\begin{itemize} +\item When one preference file includes another, unison no longer adds the + suffix '\verb|.prf|' to the included file by default. If a file with + precisely the given name exists in the .unison directory, it will be used; + otherwise Unison will + add \verb|.prf|, as it did before. (This change means that included + preference files can be named \verb|blah.include| instead of + \verb|blah.prf|, so that unison will not offer them in its 'choose + a preference file' dialog.) +\item For Linux systems, we now offer both a statically linked and a dynamically + linked executable. The static one is larger, but will probably run on more + systems, since it doesn't depend on the same versions of dynamically + linked library modules being available. +\item Fixed the \verb|force| and \verb|prefer| preferences, which were + getting the propagation direction exactly backwards. +\item Fixed a bug in the startup code that would cause unison to crash + when the default profile (\verb|~/.unison/default.prf|) does not exist. +\item Fixed a bug where, on the run when a profile is first created, + Unison would confusingly display the roots in reverse order in the user + interface. +\end{itemize} + +\item For developers: +\begin{itemize} +\item We've added a module dependency diagram to the source distribution, in + \verb|src/DEPENDENCIES.ps|, to help new prospective developers with + navigating the code. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.6.11} +\item \incompatible{} Archive format has changed. + +\item \incompatible{} The startup sequence has been completely rewritten +and greatly simplified. The main user-visible change is that the +\verb|defaultpath| preference has been removed. Its effect can be +approximated by using multiple profiles, with \verb|include| directives +to incorporate common settings. All uses of \verb|defaultpath| in +existing profiles should be changed to \verb|path|. + +Another change in startup behavior that will affect some users is that it +is no longer possible to specify roots {\em both} in the profile {\em + and} on the command line. + +You can achieve a similar effect, though, by breaking your profile into +two: +\begin{verbatim} + + default.prf = + root = blah + root = foo + include common + + common.prf = + +\end{verbatim} +Now do +\begin{verbatim} + unison common root1 root2 +\end{verbatim} +when you want to specify roots explicitly. + +\item The \verb|-prefer| and \verb|-force| options have been extended to +allow users to specify that files with more recent modtimes should be +propagated, writing either \verb|-prefer newer| or \verb|-force newer|. +(For symmetry, Unison will also accept \verb|-prefer older| or +\verb|-force older|.) The \verb|-force older/newer| options can only be +used when \verb|-times| is also set. + +The graphical user interface provides access to these facilities on a +one-off basis via the \verb|Actions| menu. + +\item Names of roots can now be ``aliased'' to allow replicas to be +relocated without changing the name of the archive file where Unison +stores information between runs. (This feature is for experts only. See +the ``Archive Files'' section of the manual for more information.) + +\item Graphical user-interface: +\begin{itemize} +\item A new command is provided in the Synchronization menu for + switching to a new profile without restarting Unison from scratch. +\item The GUI also supports one-key shortcuts for commonly +used profiles. If a profile contains a preference of the form +% +'\verb|key = n|', where \verb|n| is a single digit, then pressing this +key will cause Unison to immediately switch to this profile and begin +synchronization again from scratch. (Any actions that may have been +selected for a set of changes currently being displayed will be +discarded.) + +\item Each profile may include a preference '\verb|label = |' giving a + descriptive string that described the options selected in this profile. + The string is listed along with the profile name in the profile selection + dialog, and displayed in the top-right corner of the main Unison window. +\end{itemize} + +\item Minor: +\begin{itemize} +\item Fixed a bug that would sometimes cause the 'diff' display to order + the files backwards relative to the main user interface. (Thanks + to Pascal Brisset for this fix.) +\item On Unix systems, the graphical version of Unison will check the + \verb|DISPLAY| variable and, if it is not set, automatically fall back + to the textual user interface. +\item Synchronization paths (\verb|path| preferences) are now matched + against the ignore preferences. So if a path is both specified in a + \verb|path| preference and ignored, it will be skipped. +\item Numerous other bugfixes and small improvements. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.6.1} +\item The synchronization of modification times has been disabled for + directories. + +\item Preference files may now include lines of the form + \verb+include +, which will cause \verb+name.prf+ to be read + at that point. + +\item The synchronization of permission between Windows and Unix now + works properly. + +\item A binding \verb|CYGWIN=binmode| in now added to the environment + so that the Cygwin port of OpenSSH works properly in a non-Cygwin + context. + +\item The \verb|servercmd| and \verb|addversionno| preferences can now + be used together: \verb|-addversionno| appends an appropriate + \verb+-NNN+ to the server command, which is found by using the value + of the \verb|-servercmd| preference if there is one, or else just + \verb|unison|. + +\item Both \verb|'-pref=val'| and \verb|'-pref val'| are now allowed for + boolean values. (The former can be used to set a preference to false.) + +\item Lot of small bugs fixed. +\end{changesfromversion} + +\begin{changesfromversion}{2.5.31} +\item The \verb|log| preference is now set to \verb|true| by default, + since the log file seems useful for most users. +\item Several miscellaneous bugfixes (most involving symlinks). +\end{changesfromversion} + +\begin{changesfromversion}{2.5.25} +\item \incompatible{} Archive format has changed (again). + +\item Several significant bugs introduced in 2.5.25 have been fixed. +\end{changesfromversion} + +\begin{changesfromversion}{2.5.1} +\item \incompatible{} Archive format has changed. Make sure you +synchronize your replicas before upgrading, to avoid spurious +conflicts. The first sync after upgrading will be slow. + +\item New functionality: +\begin{itemize} +\item Unison now synchronizes file modtimes, user-ids, and group-ids. + +These new features are controlled by a set of new preferences, all of +which are currently \verb|false| by default. + +\begin{itemize} +\item When the \verb|times| preference is set to \verb|true|, file +modification times are propaged. (Because the representations of time +may not have the same granularity on both replicas, Unison may not always +be able to make the modtimes precisely equal, but it will get them as +close as the operating systems involved allow.) +\item When the \verb|owner| preference is set to \verb|true|, file +ownership information is synchronized. +\item When the \verb|group| preference is set to \verb|true|, group +information is synchronized. +\item When the \verb|numericIds| preference is set to \verb|true|, owner +and group information is synchronized numerically. By default, owner and +group numbers are converted to names on each replica and these names are +synchronized. (The special user id 0 and the special group 0 are never +mapped via user/group names even if this preference is not set.) +\end{itemize} + +\item Added an integer-valued preference \verb|perms| that can be used to +control the propagation of permission bits. The value of this preference +is a mask indicating which permission bits should be synchronized. It is +set by default to $0o1777$: all bits but the set-uid and set-gid bits are +synchronised (synchronizing theses latter bits can be a security hazard). +If you want to synchronize all bits, you can set the value of this +preference to $-1$. + +\item Added a \verb|log| preference (default \verb|false|), which makes +Unison keep a complete record of the changes it makes to the replicas. +By default, this record is written to a file called \verb|unison.log| in +the user's home directory (the value of the \verb|HOME| environment +variable). If you want it someplace else, set the \verb|logfile| +preference to the full pathname you want Unison to use. + +\item Added an \verb|ignorenot| preference that maintains a set of patterns + for paths that should definitely {\em not} be ignored, whether or not + they match an \verb|ignore| pattern. (That is, a path will now be ignored + iff it matches an ignore pattern and does not match any ignorenot patterns.) +\end{itemize} + +\item User-interface improvements: +\begin{itemize} +\item Roots are now displayed in the user interface in the same order +as they were given on the command line or in the preferences file. +\item When the \verb|batch| preference is set, the graphical user interface no + longer waits for user confirmation when it displays a warning message: it + simply pops up an advisory window with a Dismiss button at the bottom and + keeps on going. +\item Added a new preference for controlling how many status messages are + printed during update detection: \verb|statusdepth| controls the maximum + depth for paths on the local machine (longer paths are not displayed, nor + are non-directory paths). The value should be an integer; default is 1. +\item Removed the \verb|trace| and \verb|silent| preferences. They did +not seem very useful, and there were too many preferences for controlling +output in various ways. +\item The text UI now displays just the default command (the one that +will be used if the user just types \verb||) instead of all +available commands. Typing \verb|?| will print the full list of +possibilities. +\item The function that finds the canonical hostname of the local host +(which is used, for example, in calculating the name of the archive file +used to remember which files have been synchronized) normally uses the +\verb|gethostname| operating system call. However, if the environment +variable \verb|UNISONLOCALHOSTNAME| is set, its value will now be used +instead. This makes it easier to use Unison in situations where a +machine's name changes frequently (e.g., because it is a laptop and gets +moved around a lot). +\item File owner and group are now displayed in the ``detail window'' at +the bottom of the screen, when unison is configured to synchronize them. +\end{itemize} + +\item For hackers: +\begin{itemize} +\item Updated to Jacques Garrigue's new version of \verb|lablgtk|, which + means we can throw away our local patched version. + + If you're compiling the GTK version of unison from sources, you'll need + to update your copy of lablgtk to the developers release. + (Warning: installing lablgtk under Windows is currently a bit + challenging.) + +\item The TODO.txt file (in the source distribution) has been cleaned up +and reorganized. The list of pending tasks should be much easier to +make sense of, for people that may want to contribute their programming +energies. There is also a separate file BUGS.txt for open bugs. +\item The Tk user interface has been removed (it was not being maintained +and no longer compiles). +\item The \verb|debug| preference now prints quite a bit of additional +information that should be useful for identifying sources of problems. +\item The version number of the remote server is now checked right away + during the connection setup handshake, rather than later. (Somebody + sent a bug report of a server crash that turned out to come from using + inconsistent versions: better to check this earlier and in a way that + can't crash either client or server.) +\item Unison now runs correctly on 64-bit architectures (e.g. Alpha +linux). We will not be distributing binaries for these architectures +ourselves (at least for a while) but if someone would like to make them +available, we'll be glad to provide a link to them. +\end{itemize} + +\item Bug fixes: +\begin{itemize} +\item Pattern matching (e.g. for \verb|ignore|) is now case-insensitive + when Unison is in case-insensitive mode (i.e., when one of the replicas + is on a windows machine). +\item Some people had trouble with mysterious failures during + propagation of updates, where files would be falsely reported as having + changed during synchronization. This should be fixed. +\item Numerous smaller fixes. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.4.1} +\item Added a number of 'sorting modes' for the user interface. By +default, conflicting changes are displayed at the top, and the rest of +the entries are sorted in alphabetical order. This behavior can be +changed in the following ways: +\begin{itemize} +\item Setting the \verb|sortnewfirst| preference to \verb|true| causes +newly created files to be displayed before changed files. +\item Setting \verb|sortbysize| causes files to be displayed in +increasing order of size. +\item Giving the preference \verb|sortfirst=| (where +\verb|| is a path descriptor in the same format as 'ignore' and 'follow' +patterns, causes paths matching this pattern to be displayed first. +\item Similarly, giving the preference \verb|sortlast=| +causes paths matching this pattern to be displayed last. +\end{itemize} +The sorting preferences are described in more detail in the user manual. +The \verb|sortnewfirst| and \verb|sortbysize| flags can also be accessed +from the 'Sort' menu in the grpahical user interface. + +\item Added two new preferences that can be used to change unison's +fundamental behavior to make it more like a mirroring tool instead of +a synchronizer. +\begin{itemize} +\item Giving the preference \verb|prefer| with argument \verb|| +(by adding \verb|-prefer | to the command line or \verb|prefer=|) +to your profile) means that, if there is a conflict, the contents of +\verb|| +should be propagated to the other replica (with no questions asked). +Non-conflicting changes are treated as usual. +\item Giving the preference \verb|force| with argument \verb|| +will make unison resolve {\em all} differences in favor of the given +root, even if it was the other replica that was changed. +\end{itemize} +These options should be used with care! (More information is available in +the manual.) + +\item Small changes: +\begin{itemize} +\item +Changed default answer to 'Yes' in all two-button dialogs in the + graphical interface (this seems more intuitive). + +\item The \verb|rsync| preference has been removed (it was used to +activate rsync compression for file transfers, but rsync compression is +now enabled by default). +\item In the text user interface, the arrows indicating which direction +changes are being + propagated are printed differently when the user has overridded Unison's + default recommendation (\verb|====>| instead of \verb|---->|). This + matches the behavior of the graphical interface, which displays such + arrows in a different color. +\item Carriage returns (Control-M's) are ignored at the ends of lines in + profiles, for Windows compatibility. +\item All preferences are now fully documented in the user manual. +\end{itemize} +\end{changesfromversion} + +\begin{changesfromversion}{2.3.12} +\item \incompatible{} Archive format has changed. Make sure you +synchronize your replicas before upgrading, to avoid spurious +conflicts. The first sync after upgrading will be slow. + +\item New/improved functionality: +\begin{itemize} +\item A new preference -sortbysize controls the order in which changes + are displayed to the user: when it is set to true, the smallest + changed files are displayed first. (The default setting is false.) +\item A new preference -sortnewfirst causes newly created files to be + listed before other updates in the user interface. +\item We now allow the ssh protocol to specify a port. +\item Incompatible change: The unison: protocol is deprecated, and we added + file: and socket:. You may have to modify your profiles in the + .unison directory. + If a replica is specified without an explicit protocol, we now + assume it refers to a file. (Previously "//saul/foo" meant to use + SSH to connect to saul, then access the foo directory. Now it means + to access saul via a remote file mechanism such as samba; the old + effect is now achieved by writing {\tt ssh://saul/foo}.) +\item Changed the startup sequence for the case where roots are given but + no profile is given on the command line. The new behavior is to + use the default profile (creating it if it does not exist), and + temporarily override its roots. The manual claimed that this case + would work by reading no profile at all, but AFAIK this was never + true. +\item In all user interfaces, files with conflicts are always listed first +\item A new preference 'sshversion' can be used to control which version + of ssh should be used to connect to the server. Legal values are 1 and 2. + (Default is empty, which will make unison use whatever version of ssh + is installed as the default 'ssh' command.) +\item The situation when the permissions of a file was updated the same on + both side is now handled correctly (we used to report a spurious conflict) + +\end{itemize} + +\item Improvements for the Windows version: +\begin{itemize} +\item The fact that filenames are treated case-insensitively under +Windows should now be handled correctly. The exact behavior is described +in the cross-platform section of the manual. +\item It should be possible to synchronize with Windows shares, e.g., + //host/drive/path. +\item Workarounds to the bug in syncing root directories in Windows. +The most difficult thing to fix is an ocaml bug: Unix.opendir fails on +c: in some versions of Windows. +\end{itemize} + +\item Improvements to the GTK user interface (the Tk interface is no +longer being maintained): +\begin{itemize} +\item The UI now displays actions differently (in blue) when they have been + explicitly changed by the user from Unison's default recommendation. +\item More colorful appearance. +\item The initial profile selection window works better. +\item If any transfers failed, a message to this effect is displayed along with + 'Synchronization complete' at the end of the transfer phase (in case they + may have scrolled off the top). +\item Added a global progress meter, displaying the percentage of {\em total} + bytes that have been transferred so far. +\end{itemize} + +\item Improvements to the text user interface: +\begin{itemize} +\item The file details will be displayed automatically when a + conflict is been detected. +\item when a warning is generated (e.g. for a temporary + file left over from a previous run of unison) Unison will no longer + wait for a response if it is running in -batch mode. +\item The UI now displays a short list of possible inputs each time it waits + for user interaction. +\item The UI now quits immediately (rather than looping back and starting + the interaction again) if the user presses 'q' when asked whether to + propagate changes. +\item Pressing 'g' in the text user interface will proceed immediately + with propagating updates, without asking any more questions. +\end{itemize} + +\item Documentation and installation changes: +\begin{itemize} +\item The manual now includes a FAQ, plus sections on common problems and +on tricks contributed by users. +\item Both the download page and the download directory explicitly say +what are the current stable and beta-test version numbers. +\item The OCaml sources for the up-to-the-minute developers' version (not +guaranteed to be stable, or even to compile, at any given time!) are now +available from the download page. +\item Added a subsection to the manual describing cross-platform + issues (case conflicts, illegal filenames) +\end{itemize} + +\item Many small bug fixes and random improvements. + +\end{changesfromversion} + +\begin{changesfromversion}{2.3.1} +\item Several bug fixes. The most important is a bug in the rsync +module that would occasionally cause change propagation to fail with a +'rename' error. +\end{changesfromversion} + +\begin{changesfromversion}{2.2} +\item The multi-threaded transport system is now disabled by default. +(It is not stable enough yet.) +\item Various bug fixes. +\item A new experimental feature: + + The final component of a -path argument may now be the wildcard + specifier \verb|*|. When Unison sees such a path, it expands this path on + the client into into the corresponding list of paths by listing the + contents of that directory. + + Note that if you use wildcard paths from the command line, you will + probably need to use quotes or a backslash to prevent the * from + being interpreted by your shell. + + If both roots are local, the contents of the first one will be used + for expanding wildcard paths. (Nb: this is the first one {\em after} the + canonization step -- i.e., the one that is listed first in the user + interface -- not the one listed first on the command line or in the + preferences file.) +\end{changesfromversion} + +\begin{changesfromversion}{2.1} +\item The transport subsystem now includes an implementation by +Sylvain Gommier and Norman Ramsey of Tridgell and Mackerras's +\verb|rsync| protocol. This protocol achieves much faster +transfers when only a small part of a large file has been changed by +sending just diffs. This feature is mainly helpful for transfers over +slow links---on fast local area networks it can actually degrade +performance---so we have left it off by default. Start unison with +the \verb|-rsync| option (or put \verb|rsync=true| in your preferences +file) to turn it on. + +\item ``Progress bars'' are now diplayed during remote file transfers, +showing what percentage of each file has been transferred so far. + +\item The version numbering scheme has changed. New releases will now + be have numbers like 2.2.30, where the second component is + incremented on every significant public release and the third + component is the ``patch level.'' + +\item Miscellaneous improvements to the GTK-based user interface. +\item The manual is now available in PDF format. + +\item We are experimenting with using a multi-threaded transport +subsystem to transfer several files at the same time, making +much more effective use of available network bandwidth. This feature +is not completely stable yet, so by default it is disabled in the +release version of Unison. + +If you want to play with the multi-threaded version, you'll need to +recompile Unison from sources (as described in the documentation), +setting the THREADS flag in Makefile.OCaml to true. Make sure that +your OCaml compiler has been installed with the \verb|-with-pthreads| +configuration option. (You can verify this by checking whether the +file \verb|threads/threads.cma| in the OCaml standard library +directory contains the string \verb|-lpthread| near the end.) +\end{changesfromversion} + +\begin{changesfromversion}{1.292} +\item Reduced memory footprint (this is especially important during +the first run of unison, where it has to gather information about all +the files in both repositories). +\item Fixed a bug that would cause the socket server under NT to fail + after the client exits. +\item Added a SHIFT modifier to the Ignore menu shortcut keys in GTK + interface (to avoid hitting them accidentally). +\end{changesfromversion} + +\begin{changesfromversion}{1.231} +\item Tunneling over ssh is now supported in the Windows version. See +the installation section of the manual for detailed instructions. + +\item The transport subsystem now includes an implementation of the +\verb|rsync| protocol, built by Sylvain Gommier and Norman Ramsey. +This protocol achieves much faster transfers when only a small part of +a large file has been changed by sending just diffs. The rsync +feature is off by default in the current version. Use the +\verb|-rsync| switch to turn it on. (Nb. We still have a lot of +tuning to do: you may not notice much speedup yet.) + +\item We're experimenting with a multi-threaded transport subsystem, +written by Jerome Vouillon. The downloadable binaries are still +single-threaded: if you want to try the multi-threaded version, you'll +need to recompile from sources. (Say \verb|make THREADS=true|.) +Native thread support from the compiler is required. Use the option +\verb|-threads N| to select the maximal number of concurrent +threads (default is 5). Multi-threaded +and single-threaded clients/servers can interoperate. + +\item A new GTK-based user interface is now available, thanks to +Jacques Garrigue. The Tk user interface still works, but we'll be +shifting development effort to the GTK interface from now on. +\item OCaml 3.00 is now required for compiling Unison from sources. +The modules \verb|uitk| and \verb|myfileselect| have been changed to +use labltk instead of camltk. To compile the Tk interface in Windows, +you must have ocaml-3.00 and tk8.3. When installing tk8.3, put it in +\verb|c:\Tcl| rather than the suggested \verb|c:\Program Files\Tcl|, +and be sure to install the headers and libraries (which are not +installed by default). + +\item Added a new \verb|-addversionno| switch, which causes unison to +use \verb|unison-| instead of just \verb|unison| +as the remote server command. This allows multiple versions of unison +to coexist conveniently on the same server: whichever version is run +on the client, the same version will be selected on the server. +\end{changesfromversion} + +\begin{changesfromversion}{1.219} +\item \incompatible{} Archive format has changed. Make sure you +synchronize your replicas before upgrading, to avoid spurious +conflicts. The first sync after upgrading will be slow. + +\item This version fixes several annoying bugs, including: +\begin{itemize} +\item Some cases where propagation of file permissions was not +working. +\item umask is now ignored when creating directories +\item directories are create writable, so that a read-only directory and + its contents can be propagated. +\item Handling of warnings generated by the server. +\item Synchronizing a path whose parent is not a directory on both sides is +now flagged as erroneous. +\item Fixed some bugs related to symnbolic links and nonexistant roots. +\begin{itemize} +\item + When a change (deletion or new contents) is propagated onto a + 'follow'ed symlink, the file pointed to by the link is now changed. + (We used to change the link itself, which doesn't fit our assertion + that 'follow' means the link is completely invisible) + \item When one root did not exist, propagating the other root on top of it + used to fail, becuase unison could not calculate the working directory + into which to write changes. This should be fixed. +\end{itemize} +\end{itemize} + +\item A human-readable timestamp has been added to Unison's archive files. + +\item The semantics of Path and Name regular expressions now +correspond better. + +\item Some minor improvements to the text UI (e.g. a command for going +back to previous items) + +\item The organization of the export directory has changed --- should +be easier to find / download things now. +\end{changesfromversion} + +\begin{changesfromversion}{1.200} +\item \incompatible{} Archive format has changed. Make sure you +synchronize your replicas before upgrading, to avoid spurious +conflicts. The first sync after upgrading will be slow. + +\item This version has not been tested extensively on Windows. + +\item Major internal changes designed to make unison safer to run +at the same time as the replicas are being changed by the user. + +\item Internal performance improvements. +\end{changesfromversion} + +\begin{changesfromversion}{1.190} +\item \incompatible{} Archive format has changed. Make sure you +synchronize your replicas before upgrading, to avoid spurious +conflicts. The first sync after upgrading will be slow. + +\item A number of internal functions have been changed to reduce the +amount of memory allocation, especially during the first +synchronization. This should help power users with very big replicas. + +\item Reimplementation of low-level remote procedure call stuff, in +preparation for adding rsync-like smart file transfer in a later +release. + +\item Miscellaneous bug fixes. +\end{changesfromversion} + +\begin{changesfromversion}{1.180} +\item \incompatible{} Archive format has changed. Make sure you +synchronize your replicas before upgrading, to avoid spurious +conflicts. The first sync after upgrading will be slow. + +\item Fixed some small bugs in the interpretation of ignore patterns. + +\item Fixed some problems that were preventing the Windows version +from working correctly when click-started. + +\item Fixes to treatment of file permissions under Windows, which were +causing spurious reports of different permissions when synchronizing +between windows and unix systems. + +\item Fixed one more non-tail-recursive list processing function, +which was causing stack overflows when synchronizing very large +replicas. +\end{changesfromversion} + +\begin{changesfromversion}{1.169} +\item The text user interface now provides commands for ignoring + files. +\item We found and fixed some {\em more} non-tail-recursive list + processing functions. Some power users have reported success with + very large replicas. +\item \incompatible +Files ending in \verb|.tmp| are no longer ignored automatically. If you want +to ignore such files, put an appropriate ignore pattern in your profile. + +\item \incompatible{} The syntax of {\tt ignore} and {\tt follow} +patterns has changed. Instead of putting a line of the form +\begin{verbatim} + ignore = +\end{verbatim} + in your profile ({\tt .unison/default.prf}), you should put: +\begin{verbatim} + ignore = Regexp +\end{verbatim} +Moreover, two other styles of pattern are also recognized: +\begin{verbatim} + ignore = Name +\end{verbatim} +matches any path in which one component matches \verb||, while +\begin{verbatim} + ignore = Path +\end{verbatim} +matches exactly the path \verb||. + +Standard ``globbing'' conventions can be used in \verb|| and +\verb||: +\begin{itemize} +\item a \verb|?| matches any single character except \verb|/| +\item a \verb|*| matches any sequence of characters not including \verb|/| +\item \verb|[xyz]| matches any character from the set $\{{\tt x}, + {\tt y}, {\tt z} \}$ +\item \verb|{a,bb,ccc}| matches any one of \verb|a|, \verb|bb|, or + \verb|ccc|. +\end{itemize} + +See the user manual for some examples. +\end{changesfromversion} + +\begin{changesfromversion}{1.146} +\item Some users were reporting stack overflows when synchronizing + huge directories. We found and fixed some non-tail-recursive list + processing functions, which we hope will solve the problem. Please + give it a try and let us know. +\item Major additions to the documentation. +\end{changesfromversion} + +\begin{changesfromversion}{1.142} +\item Major internal tidying and many small bugfixes. +\item Major additions to the user manual. +\item Unison can now be started with no arguments -- it will prompt +automatically for the name of a profile file containing the roots to +be synchronized. This makes it possible to start the graphical UI +from a desktop icon. +\item Fixed a small bug where the text UI on NT was raising a 'no such + signal' exception. +\end{changesfromversion} + +\begin{changesfromversion}{1.139} +\item The precompiled windows binary in the last release was compiled +with an old OCaml compiler, causing propagation of permissions not to +work (and perhaps leading to some other strange behaviors we've heard +reports about). This has been corrected. If you're using precompiled +binaries on Windows, please upgrade. +\item Added a \verb|-debug| command line flag, which controls debugging +of various modules. Say \verb|-debug XXX| to enable debug tracing for +module \verb|XXX|, or \verb|-debug all| to turn on absolutely everything. +\item Fixed a small bug where the text UI on NT was raising a 'no such signal' +exception. +\end{changesfromversion} + +\begin{changesfromversion}{1.111} +\item \incompatible{} The names and formats of the preference files in +the .unison directory have changed. In particular: +\begin{itemize} +\item the file ``prefs'' should be renamed to default.prf +\item the contents of the file ``ignore'' should be merged into + default.prf. Each line of the form \verb|REGEXP| in ignore should + become a line of the form \verb|ignore = REGEXP| in default.prf. +\end{itemize} +\item Unison now handles permission bits and symbolic links. See the +manual for details. + +\item You can now have different preference files in your .unison +directory. If you start unison like this +\begin{verbatim} + unison profilename +\end{verbatim} +(i.e. with just one ``anonymous'' command-line argument), then the +file \verb|~/.unison/profilename.prf| will be loaded instead of +\verb|default.prf|. + +\item Some improvements to terminal handling in the text user interface + +\item Added a switch -killServer that terminates the remote server process +when the unison client is shutting down, even when using sockets for +communication. (By default, a remote server created using ssh/rsh is +terminated automatically, while a socket server is left running.) +\item When started in 'socket server' mode, unison prints 'server started' on + stderr when it is ready to accept connections. + (This may be useful for scripts that want to tell when a socket-mode server + has finished initalization.) +\item We now make a nightly mirror of our current internal development + tree, in case anyone wants an up-to-the-minute version to hack + around with. +\item Added a file CONTRIB with some suggestions for how to help us +make Unison better. +\end{changesfromversion} + Deleted: branches/2.32/src/Makefile.OCaml =================================================================== --- trunk/src/Makefile.OCaml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/Makefile.OCaml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,392 +0,0 @@ -#################################################################### -# Makefile rules for compiling ocaml programs # -#################################################################### - -#################################################################### -### Try to automatically guess OS - -ifeq (${OSCOMP},cygwingnuc) # Define this if compiling with Cygwin GNU C - OSARCH=win32gnuc - ETAGS=/bin/etags - buildexecutable:: win32rc/unison.res.lib -else -# Win32 system -ifeq (${OSTYPE},cygwin32) # Cygwin Beta 19 - OSARCH=win32 - ETAGS=/bin/etags -else -ifeq (${OSTYPE},cygwin) # Cygwin Beta 20 - OSARCH=win32 - ETAGS=/bin/etags -else - -# Unix system -ifeq ($(shell uname),SunOS) - OSARCH=solaris -else -ifeq ($(shell uname),Darwin) - OSARCH=osx -else -ifeq ($(shell uname),OpenBSD) - OSARCH=OpenBSD -else -ifeq ($(shell uname),NetBSD) - OSARCH=NetBSD -endif -endif -endif -endif -ETAGS=etags -endif -endif -endif - -# The OCaml lib dir is used by all versions -# It is extracted from 'ocamlc -v' and Windows '\' separators are turned -# to Unix '/' separators, and extraneous control-M's are deleted. -# Unfortunately there is a literal control-M buried in this, I'd rather -# get rid of it... -# OCAMLLIBDIR=$(shell ocamlc -v | tail -n -1 | sed -e 's/.* //g' | sed -e 's/\\/\//g' | sed -e 's///g') -# Better(?) version, June 2005: -OCAMLLIBDIR=$(shell ocamlc -v | tail -n -1 | sed -e 's/.* //g' | sed -e 's/\\/\//g' | tr -d '\r') - -## BCP (6/05) an alternative, but not quite working, version -## suggested by Nick Montfort: -# OCAMLLIBDIR=$(shell ocamlc -v | sed -n '$p' | sed -e 's/^Standard library directory: //' | sed -e 's/\\/\//g' | sed -e 's/\r//g') - -# User interface style: -# Legal values are -# UISTYLE=text -# UISTYLE=gtk -# UISTYLE=gtk2 -# UISTYLE=mac (old and limited, but working) -# UISTYLE=macnew (spiffy, but not yet extensively tested) -# -# This should be set to an appropriate value automatically, depending -# on whether the lablgtk library is available -LABLGTKLIB=$(OCAMLLIBDIR)/lablgtk -LABLGTK2LIB=$(OCAMLLIBDIR)/lablgtk2 -##BCP [3/2007]: Removed temporarily, since the OSX UI is not working well -## at the moment and we don't want to confuse people by building it by default -ifeq ($(OSARCH),osx) - UISTYLE=macnew -else - ifeq ($(wildcard $(LABLGTK2LIB)),$(LABLGTK2LIB)) - UISTYLE=gtk2 - else - UISTYLE=text -endif -endif -buildexecutable:: - @echo UISTYLE = $(UISTYLE) - -#################################################################### -### Default parameters - -INCLFLAGS=-I lwt -I ubase -CAMLFLAGS+=$(INCLFLAGS) - -ifeq ($(OSARCH),win32) - # Win32 system - EXEC_EXT=.exe - OBJ_EXT=.obj - CWD=. -# Fix suggested by Karl M, Jan 2009: -# "The new flexlink wrapper that OCaml 3.11 uses was gagging on the res -# file. So the res file has to be passed through flexlink untouched to -# the linker. I only touched the MSVC side, but mingw may have the same -# issue." -# CLIBS+=-cclib win32rc/unison.res -# STATICLIBS+=-cclib win32rc/unison.res - CLIBS+=-cclib "-link win32rc/unison.res" - STATICLIBS+=-cclib "-link win32rc/unison.res" - buildexecutable:: - @echo Building for Windows -else - # Unix system, or Cygwin with GNU C compiler - OBJ_EXT=.o - CWD=$(shell pwd) - ifeq ($(OSARCH),win32gnuc) - EXEC_EXT=.exe - CLIBS+=-cclib win32rc/unison.res.lib - STATIC=false # Cygwin is not MinGW :-( - buildexecutable:: - @echo Building for Windows with Cygwin GNU C - else - EXEC_EXT= - # openpty is in the libutil library - ifneq ($(OSARCH),solaris) - ifneq ($(OSARCH),osx) - CLIBS+=-cclib -lutil - endif - endif - buildexecutable:: - @echo Building for Unix - endif -endif - -buildexecutable:: - @echo NATIVE = $(NATIVE) - @echo THREADS = $(THREADS) - @echo STATIC = $(STATIC) - @echo OSTYPE = $(OSTYPE) - @echo OSARCH = $(OSARCH) - -ubase/projectInfo.ml: mkProjectInfo - echo 'let myName = "'$(NAME)'";;' > $@ - echo 'let myVersion = "'$(VERSION)'";;' >> $@ - echo 'let myMajorVersion = "'$(MAJORVERSION)'";;' >> $@ - -clean:: - $(RM) ubase/projectInfo.ml - -#################################################################### -### Unison objects and libraries - -ifeq ($(UISTYLE),mac) - buildexecutable:: macexecutable - UIMACDIR=uimac -else -ifeq ($(UISTYLE),macnew) - buildexecutable:: macexecutable - UIMACDIR=uimacnew -else - buildexecutable:: $(NAME)$(EXEC_EXT) -endif -endif - -# NOTE: the OCAMLLIBDIR is not getting passed correctly? -# The two cases for cltool are needed because Xcode 2.1+ -# builds in build/Default/, and earlier versions use build/ -macexecutable: $(NAME)-blob.o -# sed -e's/@@VERSION@@/$(VERSION)/' $(UIMACDIR)/Info.plist.template > $(UIMACDIR)/Info.plist - (cd $(UIMACDIR); xcodebuild OCAMLLIBDIR="$(OCAMLLIBDIR)" SYMROOT=build) - if [ -e $(UIMACDIR)/build/Default ]; then \ - gcc -mmacosx-version-min=10.4 $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon; \ - else \ - gcc -mmacosx-version-min=10.4 $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Unison.app/Contents/MacOS/cltool -framework Carbon; \ - fi - -# OCaml objects for the bytecode version -# File extensions will be substituted for the native code version - -OCAMLOBJS += \ - ubase/projectInfo.cmo ubase/myMap.cmo ubase/safelist.cmo \ - ubase/uprintf.cmo ubase/util.cmo ubase/rx.cmo ubase/uarg.cmo \ - ubase/prefs.cmo ubase/trace.cmo \ - \ - lwt/pqueue.cmo lwt/lwt.cmo lwt/lwt_util.cmo lwt/lwt_unix.cmo \ - \ - case.cmo pred.cmo uutil.cmo \ - fileutil.cmo name.cmo path.cmo fspath.cmo fingerprint.cmo \ - abort.cmo osx.cmo external.cmo \ - props.cmo fileinfo.cmo os.cmo lock.cmo clroot.cmo common.cmo \ - tree.cmo checksum.cmo terminal.cmo \ - transfer.cmo xferhint.cmo remote.cmo globals.cmo copy.cmo \ - stasher.cmo update.cmo \ - files.cmo sortri.cmo recon.cmo transport.cmo \ - strings.cmo uicommon.cmo uitext.cmo test.cmo - -OCAMLOBJS+=main.cmo - -# OCaml libraries for the bytecode version -# File extensions will be substituted for the native code version -OCAMLLIBS+=unix.cma str.cma - -COBJS+=osxsupport$(OBJ_EXT) pty$(OBJ_EXT) - -######################################################################## -### User Interface setup - -## Text UI -ifeq ($(UISTYLE), text) - OCAMLOBJS+=linktext.cmo -endif - -## Old Mac UI -ifeq ($(UISTYLE),mac) - OCAMLOBJS+=uimacbridge.cmo -endif - -## New Mac UI -ifeq ($(UISTYLE),macnew) - OCAMLOBJS+=uimacbridgenew.cmo - THREADS=true - OCAMLLIBS+=threads.cma - INCLFLAGS+=-thread -endif - -## Graphic UI - -# Setup the lib directories - -# Win32 system : this very Makefile must be used with GNU Make, so that we -# expect CygWin Bash to be used. -# The directory must be provided following one of the model below : -# - unix, relative ../../ocaml/lib/labltk -# - unix, absolute d:/home/foobar/ocaml/lib/labltk -# - dos, relative ..\\..\\ocaml\\lib\\labltk -# - dos, absolute d:\\home\\foobar\\ocaml\\lib\\labltk - -# Patch to make a Windows GUI version come up with no -# console when click-started -# ifeq ($(OSARCH), win32) -# COBJS+=winmain.c -# CFLAGS+=-cclib /subsystem:windows -# endif - -# Gtk GUI -ifeq ($(UISTYLE), gtk) - CAMLFLAGS+=-I +lablgtk - OCAMLOBJS+=pixmaps.cmo uigtk.cmo linkgtk.cmo - OCAMLLIBS+=lablgtk.cma -endif - -# Gtk2 GUI -ifeq ($(UISTYLE), gtk2) - CAMLFLAGS+=-I +lablgtk2 - OCAMLOBJS+=pixmaps.cmo uigtk2.cmo linkgtk2.cmo - OCAMLLIBS+=lablgtk.cma -endif - -#################################################################### -### Static build setup - -ifeq ($(STATIC), true) - STATICLIBS+=-cclib -static -endif - -#################################################################### -### Dependencies - -# Include an automatically generated list of dependencies -include .depend - -ifeq ($(OSARCH), OpenBSD) - ifeq ($(shell echo type ocamldot | ksh), file) - OCAMLDOT=true - endif -else - ifeq ($(shell echo type -t ocamldot | bash), file) - OCAMLDOT=true - endif -endif - -ifeq ($(OSARCH), NetBSD) - OCAMLDOT=false -endif - -# Rebuild dependencies (must be invoked manually) -.PHONY: depend -depend:: - ocamldep $(INCLFLAGS) *.mli *.ml */*.ml */*.mli > .depend -ifdef OCAMLDOT - echo 'digraph G {' > dot.tmp - echo '{ rank = same; "Fileinfo"; "Props"; "Fspath"; "Os"; "Path"; }'\ - >>dot.tmp - echo '{ rank = same; "Uitext"; "Uigtk"; }'>>dot.tmp - echo '{ rank = same; "Recon"; "Update"; "Transport"; "Files"; }'\ - >>dot.tmp - echo '{ rank = same; "Tree"; "Safelist"; }'>>dot.tmp - echo '{ rank = same; "Uarg"; "Prefs"; }'>>dot.tmp - ocamldot .depend | tail -n +2 >> dot.tmp - -dot -Tps -o DEPENDENCIES.ps dot.tmp -endif - -#################################################################### -### Compilation boilerplate - -ifeq ($(DEBUGGING), false) - ifneq ($(OSARCH), win32) - ifneq ($(OSARCH), osx) - # Strip the binary (does not work with MS compiler; might not work - # under OSX) - CFLAGS+=-cclib -Wl,-s - endif - endif -endif - -ifeq ($(PROFILING), true) - OCAMLC=ocamlcp -else - OCAMLC=ocamlc -endif -OCAMLOPT=ocamlopt - -ifeq ($(NATIVE), true) - ## Set up for native code compilation - - CAMLC=$(OCAMLOPT) - ifeq ($(PROFILING), true) - CAMLFLAGS+=-p - CLIBS+=-cclib -ldl - endif - - CAMLOBJS=$(subst .cmo,.cmx, $(subst .cma,.cmxa, $(OCAMLOBJS))) - CAMLLIBS=$(subst .cma,.cmxa, $(OCAMLLIBS)) - -else - ## Set up for bytecode compilation - - CAMLC=$(OCAMLC) - CAMLFLAGS+=-custom - ifeq ($(DEBUGGING), true) - CAMLFLAGS+=-g - endif - - CAMLOBJS=$(OCAMLOBJS) - CAMLLIBS=$(OCAMLLIBS) - -endif - -win32rc/unison.res.lib: win32rc/unison.res - windres win32rc/unison.res win32rc/unison.res.lib - -%.ml: %.mll - -$(RM) $@ - ocamllex $< - -%.cmi : %.mli - @echo "$(CAMLC): $< ---> $@" - $(CAMLC) $(CAMLFLAGS) -c $(CWD)/$< - -%.cmo: %.ml - @echo "$(OCAMLC): $< ---> $@" - $(OCAMLC) $(CAMLFLAGS) -c $(CWD)/$< - -%.cmx: %.ml - @echo "$(OCAMLOPT): $< ---> $@" - $(OCAMLOPT) $(CAMLFLAGS) -c $(CWD)/$< - -%.o %.obj: %.c - @echo "$(OCAMLOPT): $< ---> $@" - $(CAMLC) $(CAMLFLAGS) -c $(CWD)/$< - -$(NAME)$(EXEC_EXT): $(CAMLOBJS) $(COBJS) - @echo Linking $@ - $(CAMLC) -verbose $(CAMLFLAGS) -o $@ $(CFLAGS) $(CAMLLIBS) $(CLIBS) $^ - -# Unfortunately -output-obj does not put .o files into the output, only .cmx -# files, so we have to use $(LD) to take care of COBJS. -$(NAME)-blob.o: $(CAMLOBJS) $(COBJS) - @echo Linking $@ - $(CAMLC) -output-obj -verbose $(CAMLFLAGS) -o u-b.o $(CFLAGS) $(CAMLLIBS) $(CLIBS) $(CAMLOBJS) - $(LD) -r -o $@ u-b.o $(COBJS) - $(RM) u-b.o - -%$(EXEC_EXT): %.ml - $(OCAMLC) -verbose -o $@ $^ - -###################################################################### -### Misc - -clean:: - -$(RM) -r *.cmi *.cmo *.cmx *.cma *.cmxa TAGS tags - -$(RM) -r *.o core gmon.out *~ .*~ - -$(RM) -r *.obj *.lib *.exp - -$(RM) -r *.tmp *.bak?.tmp .*.bak?.tmp - -paths: - @echo PATH = $(PATH) - @echo OCAMLLIBDIR = $(OCAMLLIBDIR) - Copied: branches/2.32/src/Makefile.OCaml (from rev 320, trunk/src/Makefile.OCaml) =================================================================== --- branches/2.32/src/Makefile.OCaml (rev 0) +++ branches/2.32/src/Makefile.OCaml 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,394 @@ +#################################################################### +# Makefile rules for compiling ocaml programs # +#################################################################### + +#################################################################### +### Try to automatically guess OS + +ifeq (${OSCOMP},cygwingnuc) # Define this if compiling with Cygwin GNU C + OSARCH=win32gnuc + ETAGS=/bin/etags + buildexecutable:: win32rc/unison.res.lib +else +# Win32 system +ifeq (${OSTYPE},cygwin32) # Cygwin Beta 19 + OSARCH=win32 + ETAGS=/bin/etags +else +ifeq (${OSTYPE},cygwin) # Cygwin Beta 20 + OSARCH=win32 + ETAGS=/bin/etags +else + +# Unix system +ifeq ($(shell uname),SunOS) + OSARCH=solaris +else +ifeq ($(shell uname),Darwin) + OSARCH=osx +else +ifeq ($(shell uname),OpenBSD) + OSARCH=OpenBSD +else +ifeq ($(shell uname),NetBSD) + OSARCH=NetBSD +endif +endif +endif +endif +ETAGS=etags +endif +endif +endif + +# The OCaml lib dir is used by all versions +# It is extracted from 'ocamlc -v' and Windows '\' separators are turned +# to Unix '/' separators, and extraneous control-M's are deleted. +# Unfortunately there is a literal control-M buried in this, I'd rather +# get rid of it... +# OCAMLLIBDIR=$(shell ocamlc -v | tail -n -1 | sed -e 's/.* //g' | sed -e 's/\\/\//g' | sed -e 's///g') +# Better(?) version, June 2005: +OCAMLLIBDIR=$(shell ocamlc -v | tail -n -1 | sed -e 's/.* //g' | sed -e 's/\\/\//g' | tr -d '\r') + +## BCP (6/05) an alternative, but not quite working, version +## suggested by Nick Montfort: +# OCAMLLIBDIR=$(shell ocamlc -v | sed -n '$p' | sed -e 's/^Standard library directory: //' | sed -e 's/\\/\//g' | sed -e 's/\r//g') + +# User interface style: +# Legal values are +# UISTYLE=text +# UISTYLE=gtk +# UISTYLE=gtk2 +# UISTYLE=mac (old and limited, but working) +# UISTYLE=macnew (spiffy, but not yet extensively tested) +# +# This should be set to an appropriate value automatically, depending +# on whether the lablgtk library is available +LABLGTKLIB=$(OCAMLLIBDIR)/lablgtk +LABLGTK2LIB=$(OCAMLLIBDIR)/lablgtk2 +##BCP [3/2007]: Removed temporarily, since the OSX UI is not working well +## at the moment and we don't want to confuse people by building it by default +ifeq ($(OSARCH),osx) + UISTYLE=macnew +else + ifeq ($(wildcard $(LABLGTK2LIB)),$(LABLGTK2LIB)) + UISTYLE=gtk2 + else + UISTYLE=text +endif +endif +buildexecutable:: + @echo UISTYLE = $(UISTYLE) + +#################################################################### +### Default parameters + +INCLFLAGS=-I lwt -I ubase +CAMLFLAGS+=$(INCLFLAGS) + +ifeq ($(OSARCH),win32) + # Win32 system + EXEC_EXT=.exe + OBJ_EXT=.obj + CWD=. +# Fix suggested by Karl M, Jan 2009: +# "The new flexlink wrapper that OCaml 3.11 uses was gagging on the res +# file. So the res file has to be passed through flexlink untouched to +# the linker. I only touched the MSVC side, but mingw may have the same +# issue." +# CLIBS+=-cclib win32rc/unison.res +# STATICLIBS+=-cclib win32rc/unison.res + CLIBS+=-cclib "-link win32rc/unison.res" + STATICLIBS+=-cclib "-link win32rc/unison.res" + buildexecutable:: + @echo Building for Windows +else + # Unix system, or Cygwin with GNU C compiler + OBJ_EXT=.o + CWD=$(shell pwd) + ifeq ($(OSARCH),win32gnuc) + EXEC_EXT=.exe + CLIBS+=-cclib win32rc/unison.res.lib + STATIC=false # Cygwin is not MinGW :-( + buildexecutable:: + @echo Building for Windows with Cygwin GNU C + else + EXEC_EXT= + # openpty is in the libutil library + ifneq ($(OSARCH),solaris) + ifneq ($(OSARCH),osx) + CLIBS+=-cclib -lutil + endif + endif + buildexecutable:: + @echo Building for Unix + endif +endif + +buildexecutable:: + @echo NATIVE = $(NATIVE) + @echo THREADS = $(THREADS) + @echo STATIC = $(STATIC) + @echo OSTYPE = $(OSTYPE) + @echo OSARCH = $(OSARCH) + +ubase/projectInfo.ml: mkProjectInfo + echo 'let myName = "'$(NAME)'";;' > $@ + echo 'let myVersion = "'$(VERSION)'";;' >> $@ + echo 'let myMajorVersion = "'$(MAJORVERSION)'";;' >> $@ + +clean:: + $(RM) ubase/projectInfo.ml + +#################################################################### +### Unison objects and libraries + +ifeq ($(UISTYLE),mac) + buildexecutable:: macexecutable + UIMACDIR=uimac +else +ifeq ($(UISTYLE),macnew) + buildexecutable:: macexecutable + UIMACDIR=uimacnew +else + buildexecutable:: $(NAME)$(EXEC_EXT) +endif +endif + +MINOSXVERSION=10.5 + +# NOTE: the OCAMLLIBDIR is not getting passed correctly? +# The two cases for cltool are needed because Xcode 2.1+ +# builds in build/Default/, and earlier versions use build/ +macexecutable: $(NAME)-blob.o +# sed -e's/@@VERSION@@/$(VERSION)/' $(UIMACDIR)/Info.plist.template > $(UIMACDIR)/Info.plist + (cd $(UIMACDIR); xcodebuild OCAMLLIBDIR="$(OCAMLLIBDIR)" SYMROOT=build) + if [ -e $(UIMACDIR)/build/Default ]; then \ + gcc -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon; \ + else \ + gcc -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Unison.app/Contents/MacOS/cltool -framework Carbon; \ + fi + +# OCaml objects for the bytecode version +# File extensions will be substituted for the native code version + +OCAMLOBJS += \ + ubase/projectInfo.cmo ubase/myMap.cmo ubase/safelist.cmo \ + ubase/uprintf.cmo ubase/util.cmo ubase/rx.cmo ubase/uarg.cmo \ + ubase/prefs.cmo ubase/trace.cmo \ + \ + lwt/pqueue.cmo lwt/lwt.cmo lwt/lwt_util.cmo lwt/lwt_unix.cmo \ + \ + case.cmo pred.cmo uutil.cmo \ + fileutil.cmo name.cmo path.cmo fspath.cmo fingerprint.cmo \ + abort.cmo osx.cmo external.cmo \ + props.cmo fileinfo.cmo os.cmo lock.cmo clroot.cmo common.cmo \ + tree.cmo checksum.cmo terminal.cmo \ + transfer.cmo xferhint.cmo remote.cmo globals.cmo copy.cmo \ + stasher.cmo update.cmo \ + files.cmo sortri.cmo recon.cmo transport.cmo \ + strings.cmo uicommon.cmo uitext.cmo test.cmo + +OCAMLOBJS+=main.cmo + +# OCaml libraries for the bytecode version +# File extensions will be substituted for the native code version +OCAMLLIBS+=unix.cma str.cma + +COBJS+=osxsupport$(OBJ_EXT) pty$(OBJ_EXT) + +######################################################################## +### User Interface setup + +## Text UI +ifeq ($(UISTYLE), text) + OCAMLOBJS+=linktext.cmo +endif + +## Old Mac UI +ifeq ($(UISTYLE),mac) + OCAMLOBJS+=uimacbridge.cmo +endif + +## New Mac UI +ifeq ($(UISTYLE),macnew) + OCAMLOBJS+=uimacbridgenew.cmo + THREADS=true + OCAMLLIBS+=threads.cma + INCLFLAGS+=-thread +endif + +## Graphic UI + +# Setup the lib directories + +# Win32 system : this very Makefile must be used with GNU Make, so that we +# expect CygWin Bash to be used. +# The directory must be provided following one of the model below : +# - unix, relative ../../ocaml/lib/labltk +# - unix, absolute d:/home/foobar/ocaml/lib/labltk +# - dos, relative ..\\..\\ocaml\\lib\\labltk +# - dos, absolute d:\\home\\foobar\\ocaml\\lib\\labltk + +# Patch to make a Windows GUI version come up with no +# console when click-started +# ifeq ($(OSARCH), win32) +# COBJS+=winmain.c +# CFLAGS+=-cclib /subsystem:windows +# endif + +# Gtk GUI +ifeq ($(UISTYLE), gtk) + CAMLFLAGS+=-I +lablgtk + OCAMLOBJS+=pixmaps.cmo uigtk.cmo linkgtk.cmo + OCAMLLIBS+=lablgtk.cma +endif + +# Gtk2 GUI +ifeq ($(UISTYLE), gtk2) + CAMLFLAGS+=-I +lablgtk2 + OCAMLOBJS+=pixmaps.cmo uigtk2.cmo linkgtk2.cmo + OCAMLLIBS+=lablgtk.cma +endif + +#################################################################### +### Static build setup + +ifeq ($(STATIC), true) + STATICLIBS+=-cclib -static +endif + +#################################################################### +### Dependencies + +# Include an automatically generated list of dependencies +include .depend + +ifeq ($(OSARCH), OpenBSD) + ifeq ($(shell echo type ocamldot | ksh), file) + OCAMLDOT=true + endif +else + ifeq ($(shell echo type -t ocamldot | bash), file) + OCAMLDOT=true + endif +endif + +ifeq ($(OSARCH), NetBSD) + OCAMLDOT=false +endif + +# Rebuild dependencies (must be invoked manually) +.PHONY: depend +depend:: + ocamldep $(INCLFLAGS) *.mli *.ml */*.ml */*.mli > .depend +ifdef OCAMLDOT + echo 'digraph G {' > dot.tmp + echo '{ rank = same; "Fileinfo"; "Props"; "Fspath"; "Os"; "Path"; }'\ + >>dot.tmp + echo '{ rank = same; "Uitext"; "Uigtk"; }'>>dot.tmp + echo '{ rank = same; "Recon"; "Update"; "Transport"; "Files"; }'\ + >>dot.tmp + echo '{ rank = same; "Tree"; "Safelist"; }'>>dot.tmp + echo '{ rank = same; "Uarg"; "Prefs"; }'>>dot.tmp + ocamldot .depend | tail -n +2 >> dot.tmp + -dot -Tps -o DEPENDENCIES.ps dot.tmp +endif + +#################################################################### +### Compilation boilerplate + +ifeq ($(DEBUGGING), false) + ifneq ($(OSARCH), win32) + ifneq ($(OSARCH), osx) + # Strip the binary (does not work with MS compiler; might not work + # under OSX) + CFLAGS+=-cclib -Wl,-s + endif + endif +endif + +ifeq ($(PROFILING), true) + OCAMLC=ocamlcp +else + OCAMLC=ocamlc +endif +OCAMLOPT=ocamlopt + +ifeq ($(NATIVE), true) + ## Set up for native code compilation + + CAMLC=$(OCAMLOPT) + ifeq ($(PROFILING), true) + CAMLFLAGS+=-p + CLIBS+=-cclib -ldl + endif + + CAMLOBJS=$(subst .cmo,.cmx, $(subst .cma,.cmxa, $(OCAMLOBJS))) + CAMLLIBS=$(subst .cma,.cmxa, $(OCAMLLIBS)) + +else + ## Set up for bytecode compilation + + CAMLC=$(OCAMLC) + CAMLFLAGS+=-custom + ifeq ($(DEBUGGING), true) + CAMLFLAGS+=-g + endif + + CAMLOBJS=$(OCAMLOBJS) + CAMLLIBS=$(OCAMLLIBS) + +endif + +win32rc/unison.res.lib: win32rc/unison.res + windres win32rc/unison.res win32rc/unison.res.lib + +%.ml: %.mll + -$(RM) $@ + ocamllex $< + +%.cmi : %.mli + @echo "$(CAMLC): $< ---> $@" + $(CAMLC) $(CAMLFLAGS) -c $(CWD)/$< + +%.cmo: %.ml + @echo "$(OCAMLC): $< ---> $@" + $(OCAMLC) $(CAMLFLAGS) -c $(CWD)/$< + +%.cmx: %.ml + @echo "$(OCAMLOPT): $< ---> $@" + $(OCAMLOPT) $(CAMLFLAGS) -c $(CWD)/$< + +%.o %.obj: %.c + @echo "$(OCAMLOPT): $< ---> $@" + $(CAMLC) $(CAMLFLAGS) -c $(CWD)/$< + +$(NAME)$(EXEC_EXT): $(CAMLOBJS) $(COBJS) + @echo Linking $@ + $(CAMLC) -verbose $(CAMLFLAGS) -o $@ $(CFLAGS) $(CAMLLIBS) $(CLIBS) $^ + +# Unfortunately -output-obj does not put .o files into the output, only .cmx +# files, so we have to use $(LD) to take care of COBJS. +$(NAME)-blob.o: $(CAMLOBJS) $(COBJS) + @echo Linking $@ + $(CAMLC) -output-obj -verbose $(CAMLFLAGS) -o u-b.o $(CFLAGS) $(CAMLLIBS) $(CLIBS) $(CAMLOBJS) + $(LD) -r -o $@ u-b.o $(COBJS) + $(RM) u-b.o + +%$(EXEC_EXT): %.ml + $(OCAMLC) -verbose -o $@ $^ + +###################################################################### +### Misc + +clean:: + -$(RM) -r *.cmi *.cmo *.cmx *.cma *.cmxa TAGS tags + -$(RM) -r *.o core gmon.out *~ .*~ + -$(RM) -r *.obj *.lib *.exp + -$(RM) -r *.tmp *.bak?.tmp .*.bak?.tmp + +paths: + @echo PATH = $(PATH) + @echo OCAMLLIBDIR = $(OCAMLLIBDIR) + Deleted: branches/2.32/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/RECENTNEWS 2009-05-02 02:31:27 UTC (rev 322) @@ -1,585 +0,0 @@ -CHANGES FROM VERSION 2.32.5 - -* Ignore one hour differences for deciding whether a file may have - been updated. This avoids slow update detection after daylight - saving time changes under Windows. This makes it slightly more - likely to miss an update, but that should be safe enough. - -------------------------------- -CHANGES FROM VERSION 2.32.4 - -* Text UI now includes the current time in its completion message - -* Fix a small bug that was affecting mainly windows users. We need to - commit the archives at the end of the sync even if there are no - updates to propagate because some files (in fact, if we've just - switched to DST on windows, a LOT of files) might have new modtimes - in the archive. (Changed the text UI only. It's less clear where - to change the GUI.) - -* Small improvement to text UI "scanning..." messages, to print just - directories (hopefully making it clearer that individual files are - not necessarily being fingerprinted). - - -------------------------------- -CHANGES FROM VERSION 2.32.2 - -* Don't delete the temp file when a transfer fails due to a - fingerprint mismatch (so that we can have a look and see why!) - -------------------------------- -CHANGES FROM VERSION 2.32.1 - -* Applied a patch from Karl M to make the GTK2 version build with - OCaml 3.11 on Windows. - -* Don't use shortcuts or external copy programs to transfer - zero-length files (to avoid confusing status messages about - shortcut-copying completely unrelated files that happen to also have - zero length!). - - - - - - - -------------------------------- -CHANGES FROM VERSION 2.32.0 - -* Bumped version number to reflect newly added preference - - - - -------------------------------- -CHANGES FROM VERSION 2.31.11 - -* Fixed a bug that was causing new files to be created with - permissions 0x600 instead of using a reasonable default (like - 0x644), if the 'perms' flag was set to 0. (Bug reported by Ben - Crowell.) - -* Added a new preference, 'dontchmod'. By default, Unison uses the - 'chmod' system call to set the permission bits of files after it has - copied them. But in some circumstances (and under some operating - systems), the chmod call always fails. Setting this preference - completely prevents Unison from ever calling chmod. - -* Add some suggestions to TODO file - - - - - - -------------------------------- -CHANGES FROM VERSION 2.31.10 - -* Another slight tweak. - - - - - -------------------------------- -CHANGES FROM VERSION 2.31.9 - -* Slight tweak to the last commit, suggested by Rasmus. - - - - -------------------------------- -CHANGES FROM VERSION 2.31.8 - -* (Forgot to add a couple of new files.) - - - -------------------------------- -CHANGES FROM VERSION 2.31.5 - -* A special hack for Rasmus, who has a special situation that requires - the utimes-setting program to run 'setuid root' (and we do not want - all of Unison to run setuid, so we just spin off an external utility - to do it). This functionality is disabled by default and requires - editing the source code (changing 'false' to 'true' on line 496 of - props.ml) and recompiling to enable. If there are other people that - want it, we can easily make it accessible using a preference - instead, but I prefer not to add a preference until someone else - requests it, to avoid creating an incompatible version. - -* Logging tweak. - - - -------------------------------- -CHANGES FROM VERSION 2.31.5 - -* A special hack for Rasmus, who has a special situation that requires - the utimes-setting program to run 'setuid root' (and we do not want - all of Unison to run setuid, so we just spin off an external utility - to do it). This functionality is disabled by default and requires - editing the source code (changing 'false' to 'true' on line 496 of - props.ml) and recompiling to enable. If there are other people that - want it, we can easily make it accessible using a preference - instead, but I prefer not to add a preference until someone else - requests it, to avoid creating an incompatible version. - -* Logging tweak. - - - -------------------------------- -CHANGES FROM VERSION 2.31.5 - -* A special hack for Rasmus, who has a special situation that requires - the utimes-setting program to run 'setuid root' (and we do not want - all of Unison to run setuid, so we just spin off an external utility - to do it). This functionality is disabled by default and requires - editing the source code (changing 'false' to 'true' on line 496 of - props.ml) and recompiling to enable. If there are other people that - want it, we can easily make it accessible using a preference - instead, but I prefer not to add a preference until someone else - requests it, to avoid creating an incompatible version. - -* Logging tweak. - - -CHANGES FROM VERSION 2.31.5 - -Resizing the update window vertically no longer moves the status label. Fix contributed by Pedro Melo. -------------------------------- - -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. - -* Applied patch from Antoine Reilles for NetBSD compilation - -* Makefile tidying - -------------------------------- -CHANGES FROM VERSION 2.31.2 - -* Added a bit of debugging code for Alan. - -------------------------------- -CHANGES FROM VERSION 2.31.1 - -* Fixed a small bug with resuming interrupted file transfers when both - replicas are local. -------------------------------- -CHANGES FROM VERSION 2.31.-1 - -* Fixed a couple of file-transfer bugs. (One was about copying - resource forks. Another was about restarting interrupted transfers - on files where exactly zero bytes had been transferred so far and - the file had been created with null permissions -- believe it or - not, this is possible with rsync!) This required a protocol change, - so I'm also bumping the version number. - -------------------------------- -CHANGES FROM VERSION 2.30.4 - -* Work on text UI to prepare for new filesystem watcher functionality - -* Record some current TODO items - - - - -------------------------------- -CHANGES FROM VERSION 2.30.3 - -* Update docs - - - -------------------------------- -CHANGES FROM VERSION 2.30.2 - -fix quoting for Unix - -------------------------------- -CHANGES FROM VERSION 2.30.1 - -- Fixed handling of paths containing spaces when using rsync -- Better error report for fingerprint mismatch -------------------------------- -CHANGES FROM VERSION 2.30.0 - -* A better fix for the "single file transfer failed in large directory" issue. - - -------------------------------- -CHANGES FROM VERSION 2.29.9 - -* Trying a possible fix for the "assert failure in remote.ml" bug - (thanks Jerome!) - - -------------------------------- -CHANGES FROM VERSION 2.29.8 - -* Updated documentation. - -* Shortened the names of several preferences. The old names are also - still supported, for backwards compatibility, but they do not appear - in the documentation. - - -------------------------------- -CHANGES FROM VERSION 2.29.7 - -* Squashed a bug in transferring partially transferred directories - containing symlinks. - -* Squashed some more bugs in partial rsync transfers (rsync, oddly, - creates files with zero permissions and then on the next run - discovers that it cannot write to the file it partially wrote - before!). - -* Added a "copyprogrest" preference, so that we can give different - command lines for invoking the external copy utility depending on - whether a partially transferred file already exists or not. (Rsync - doesn't seem to care about this, but other utilities may.) - - - - -------------------------------- -CHANGES FROM VERSION 2.29.7 - -* Squashed a bug in transferring partially transferred directories - containing symlinks. - -* Squashed some more bugs in partial rsync transfers (rsync, oddly, - creates files with zero permissions and then on the next run - discovers that it cannot write to the file it partially wrote - before!). - -* Added a "copyprogrest" preference, so that we can give different - command lines for invoking the external copy utility depending on - whether a partially transferred file already exists or not. (Rsync - doesn't seem to care about this, but other utilities may.) - - - - -------------------------------- -CHANGES FROM VERSION 2.29.6 - -* Fix a small bug in the external copyprog setup. - - -------------------------------- -CHANGES FROM VERSION 2.29.5 - -* Lots of little documentation tidying. (In particular, I finally - spent the time to separate preferences into Basic and Advanced! - This should hopefully make Unison a little more approachable for new - users.) - - - -------------------------------- -CHANGES FROM VERSION 2.29.4 - -* When using the internal transfer method, remove any temp file on the - destination (which may be left over from a previous interrupted run - of Unison) before starting the transfer. - -* Fixed (hopefully!) the bug causing Unison to backup the new archive - version after a (partially or fully) successful merge. - -* Updated copyright notices to 2008. :-) - - -------------------------------- -CHANGES FROM VERSION 2.29.3 - -* Updated documentation to describe new features - -* Changed units of copythreshold to kilobytes - -* Added -z to flags for external rsync program -------------------------------- -CHANGES FROM VERSION 2.29.2 - -* Automatically supply "user@" in argument to external copy program. - - -------------------------------- -CHANGES FROM VERSION 2.29.1 - -Follow maxthreads preference when transferring directories. -------------------------------- -CHANGES FROM VERSION 2.29.0 - -This version introduces some pretty big changes, by BCP in -collaboration with Alan Schmitt. We've tested them minimally, but -this version should be considered "only for the adventurous" for the -moment. - -* Added some more debugging code to remote.ml to give more informative - error messages when we encounter the (dreaded and longstanding) - "assert failed during file transfer" bug - -* Experimental support for invoking an external file transfer tool for - whole-file copies instead of Unison's built-in transfer protocol. - - Two new preferences have been added: - - - copyprog is a string giving the name (and command-line switches, - if needed) of an external program that can be used to copy large - files efficiently. By default, rsync is invoked, but other - tools such as scp can be used instead by changing the value of - this preference. (Although this is not its primary purpose, - rsync is actually a pretty fast way of copying files that don't - already exist on the receiving host.) For files that do already - exist on (but that have been changed in one replica), Unison - will always use its built-in implementation of the rsync - algorithm. - - - copythreshold is an integer (-1 by default), indicating above - what filesize (in megabytes) Unison should use the external - copying utility specified by copyprog. Specifying 0 will cause - ALL copies to use the external program; a negative number will - prevent any files from using it. (Default is -1.) - -* If Unison is interrupted during a directory transfer, it will now - leave the partially transferred directory intact in a temporary - location. (This maintains the invariant that new files/directories - are transferred either completely or not at all.) The next time - Unison is run, it will continue filling in this temporary directory, - skipping transferring files that it finds are already there. - - -------------------------------- -CHANGES FROM VERSION 2.28.51 - -* Propagating changes from 2.27 branch - - -------------------------------- -CHANGES FROM VERSION 2.28.51 - -* Propagating changes from 2.27 branch - - -------------------------------- -CHANGES FROM VERSION 2.28.45 - -* Unison can sometimes fail to transfer a file, giving the unhelpful - message "Destination updated during synchronization" even though the - file has not been changed. This can be caused by programs that - change either the file's contents *or* the file's extended - attributes without changing its modification time. I'm not sure - what is the best fix for this -- it is not Unison's fault, but it - makes Unison's behavior puzzling -- but at least Unison can be more - helpful about suggesting a workaround (running once with 'fastcheck' - set to false). The failure message has been changed to give this - advice. - -* Upgraded to GPL version 3 and added copyright notice to - documentation files. - -------------------------------- -CHANGES FROM VERSION 2.28.36 - -* Transfer changes from 2.27 branch - -------------------------------- -------------------------------- -CHANGES FROM VERSION 2.28.29 - -* Propagage changes from 2.27 branch. - - -------------------------------- -CHANGES FROM VERSION 2.28.23 - -* Small improvement to error message when no archive files are - found (thanks to Norman Ramsey). - -* Patch from Karl M for GTK2 UI: - 1) reverts the problematic (when no profile is used) - reloadProfile on the restart button. - 2) it adds a reloadProfile call after the detectCmd for - rescanning unsynchronized items. - 3) it turns off confirmBigDeletes on a rescan and checks it - before issuing a warning popup. - 4) it adjusts the status results width so that everything fits. - -------------------------------- -CHANGES FROM VERSION 2.28.17 - -* Applying a patch from Karl M to make the Restart button reload the - profile in the uigtk2 UI. - -* Fixed a bug in the merge code (new archive was not being backed up). - Minor improvements to the merge code to make it say more about what - it's doing and why. - - -------------------------------- -CHANGES FROM VERSION 2.28.16 - -More Mac UI improvements -* Revert the combo ProgressIndicator / status message (couldn't get the flicker to go away...) -* Improved file change icons - - Lighter color / slight gradient wash - - Icons for Absent (opposite side of an add) and Unmodified (opposite side of a one sided change) -- these give the line balance -* Display panel for errors occuring during Connecting... phase - -------------------------------- -CHANGES FROM VERSION 2.28.15 - -Test commit. - -------------------------------- -CHANGES FROM VERSION 2.28.13 - -* Roll back non-fix for GTK2 UI - -------------------------------- -CHANGES FROM VERSION 2.28.11 - -* Added some files left out of the previous commit. - -* Fix for GTK2 UI, suggested by Karl M - -------------------------------- -CHANGES FROM VERSION 2.28.9 - -* More Mac GUI goodness from Craig. - -Enhancements: - - Default table layout is now outline view (middle choice in outline control) - - Outline layout initial does "smart expand" to open one screen full - - Action icons - Lighter parent icons - - Icons for Left / Right work (Added, Modified, Deleted) - -Bug Fixes: - - Fix problem with file Details not showing - - Sort by Action not working - - Missing status for some items (on right) - - Reset view contents (clear recon items) when re-syncing - - Action icons -- Fix upside-down question mark - - Fix centering of "Connecting..." message when panel is resized - - Force to progress to 100% when done - -Known Issues: - -1) The most controversial "enhancement" here is the replacement of the - text for Left / Right (e.g. "Modified", "Deleted") with more - compact / colorful icons. These icons are perhaps was too "loud", - but Craig thinks that if he can tone them down a bit that this will - be an improvement. [Actually, I like them pretty well as-is.] - - Any icon artists out there? - -2) The rendering of the status message in the main ProgressIndicator - is currently leading to flicker. - -------------------------------- -CHANGES FROM VERSION 2.28.8 - -* Some more files needed for Craig's updated Mac GUI. - -------------------------------- -CHANGES FROM VERSION 2.28.6 - -* More improvements to the OSX GUI from Craig Federighi, including a very - nice new "nested directory" display style and per-file progress bars. Any - unison hackers using Macs are invited to check out the new UI and post - any bugs or suggestions for improvement to the unison-hackers list. - - (There is one known issue that sometimes causes the list of changes to be - redisplayed incorrectly after an Ignore command.) - -------------------------------- -CHANGES FROM VERSION 2.28.5 - -* Add couple of missing files. - - -------------------------------- -CHANGES FROM VERSION 2.28.4 - -* Apply experimental patch from Craig Federighi, which seems to fix - the deadlocks and crashes in new OSX UI. (Actually, this is a major - rewrite and cleanup of the whole Cocoa UI.) Thanks, Craig!!! - - It would be great if some Mac users could help stress-test this fix. - -------------------------------- -CHANGES FROM VERSION 2.28.4 - -* Apply experimental patch from Craig Federighi, which seems to fix - the deadlocks and crashes in new OSX UI. (Actually, this is a major - rewrite and cleanup of the whole Cocoa UI.) Thanks, Craig!!! - - It would be great if some Mac users could help stress-test this fix. - -------------------------------- -CHANGES FROM VERSION 2.28.3 - -* Another fix to ctime (non-)handling - -------------------------------- -CHANGES FROM VERSION 2.28.1 - -* Small fix to ctime (non-)handling in update detection under windows - with fastcheck. This *might* fix the bug that Karl M. has reported. - (Copying fix into trunk.) - - -------------------------------- -CHANGES FROM VERSION 2.28.-2 - -* Very preliminary support for triggering Unison from an external - filesystem-watching utility. The current implementation is very - simple, not efficient, and almost completely untested. Not ready - for real users. But if someone wants to help me improve it (e.g., - by writing a filesystem watcher for your favorite OS), please let - me know. - - On the Unison side, the new behavior is incredibly simple: - - use the text UI - - start Unison with the command-line flag "-repeat FOO", - where FOO is name of a file where Unison should look - for notifications of changes - - when it starts up, Unison will read the whole contents - of this file (on both hosts), which should be a - newline-separated list of paths (relative to the root - of the synchronization) and synchronize just these paths, - as if it had been started with the "-path=xxx" option for - each one of them - - when it finishes, it will sleep for a few seconds and then - examine the watchfile again; if anything has been added, it - will read the new paths, synchronize them, and go back to - sleep - - that's it! - - To use this to drive Unison "incrementally," just start it in - this mode and start up a tool (on each host) to watch for - new changes to the filesystem and append the appropriate paths - to the watchfile. Hopefully such tools should not be too hard - to write. - - Since I'm an OSX user, I'm particularly interested in writing a - watcher tool for this platform. If anybody knows about - programming against the Spotlight API and can give me a hand, - that would be much appreciated. - -------------------------------- Copied: branches/2.32/src/RECENTNEWS (from rev 321, trunk/src/RECENTNEWS) =================================================================== --- branches/2.32/src/RECENTNEWS (rev 0) +++ branches/2.32/src/RECENTNEWS 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,6 @@ +CHANGES FROM VERSION 2.32.7 + +* Move descriptions of recent changes to documentation. + + +------------------------------- Deleted: branches/2.32/src/TODO.txt =================================================================== --- trunk/src/TODO.txt 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/TODO.txt 2009-05-02 02:31:27 UTC (rev 322) @@ -1,1120 +0,0 @@ -Here we list planned and imagined improvements to Unison. Ones that we -regard as most important are marked with more *s. (Unfortunately, since -Unison is no longer under active development [though it is still heavily -used by its original developers], the presence of a suggestion in this file -is not promise that anybody is going to implement it!) - -See the file BUGS.txt for a list of currently open bugs. - -########################################################################### - -* CURRENT -* ======= - -* Merge issues: - - It would be better to ignore the exit status of the external merge - tool and just look at what files it produced to decide what happened - - The function that runs the external program should not grab stdin / - stdout / stderr if Unison is running with the text UI. - - The confirmation step should offer to display the new merged file. - - (There are some older merge issues documented below) - -* Makefile for fstest - -* Work on the Unison side - - create temp file - - start watcher based on watcherosx switch, passing all paths as args - - on each loop - - parse results into shallow and deep ones - - combine the two lists (marking which is which) - - sort the list - - if there are any adjacent pairs where the first is a prefix of the - second, drop the second and mark the first as deep - - go through the list and drop any item for whioch any PREFIX of - its path matches 'ignore' and doesn't match 'ignorenot' - - bulletproof, handling fatal errors and restarting completely from - scratch if necessary - -* See if there are other hacks that should be propagated to 2.27 (the - directory transfer throttle for sure!), and Jerome's recent suggested fix - -* Rsync debugging - - - R can't run with debugging (even in 2.13) -- Alan cannot reproduce - - - when using socket mode under windows, upon completion of the first - external rsync call, the connection to the server is dropped (the - server gets an EOF and closes the connection; the client sees a - broken connection) - - - only with rsync, not scp - - only with socket mode connection by Unison, not ssh mode - - seems to have nothing to do with ssh tunneling - - - calling Unix.open_process_in instead of - Lwt_unix.open_process_full seems to make no difference - - - one difference we can see is that, at the end of the transfer, - the ssh started by rsync (when run with with -v -v) says - something like "FD1 clearing O_NONBLOCK". The similar call to - ssh from scp does not print this. - - We're running under Cygwin (which is needed to have rsync) - -########################################################################### - -* SOON -* ==== - -**** Document: root, fspath, path (local/not) - -**** Nice code cleanup trick: Add a phantom type param to Pref (and Pred?) - that prevents mutation from outside the module where the preference is - defined (by exposing it with a weak type). - -**** The third assertion in Remote.fill_buffer failed for me (BCP) during a transfer! - -**** Remaining problem with merging code: - - create two directories, each containing a .txt file - - sync so they are equal - - change the file so that one region is in conflict and another - region has changes that can be propagated correctly - - sync - - now we should be able to change the second region in just one file, - sync again, and see the change propagate; instead, it conflicts - - diagnosis: the merge stuff is not correctly updating the archive in - the event of a partial reconciliation - -**** When deleting a directory, we should *not* skip over Unison temp files - in the process of listing children - -*** Un-writeable directories can't be copied. - The 'rename' operation at the end of Files.copy will fail (at least on - OSX) if the path being renamed points to a directory and that directory - (not the one containing it!) is not writeable by the user. To fix this, - we'd need to notice when we are renaming a directory and temporarily - make it writeable just before the rename and then make it what it should - be just after. But I don't feel like writing this bit of code right - now, to handle such a corner case. [BCP, November 2008] - -*** make the ETA bar show which file is actually transferring bytes at the - moment - -*** Fix the pred module to understand negation and delete XXXnot predicates - -*** Web - - Add a "supported platforms" page mentioning system-specific stuff - - Add an installation instructions page, removing it from the manual - -*** See if we can get rid of some Osx.XXX stuff (e.g. ressLength!?) - -*** Add the following to the Problems FAQ: - - --- In unison-hackers at y..., "Matt Swift" wrote: - > I just posted a msg to cygwin at c... detailing some very strange - > behavior of chmod when a file's owner is also the file's group. It - - I was right about the crucial circumstances of owner = group. Moral: - do not let user=group under Cygwin. I know it causes a problem when - you make unison use the full permissions model on Cygwin systems; I - think this may also explain similar problems I had using the default - unison behavior (which treats Cygwin files as read-only or read-write - only) -- though there are several possible causes of like failures to - syncrhonize permissions. - - The answer is obvious, following from the basic handling of permissions - in Cygwin (in NT permissions mode), but I didn't see it. Users and - groups to Windows are the same kind of object (SID), and permissions on - a file or directory are represented as a list of (any number of) SIDs - paired with permissions such as read, write, execute (and quite a few - more). When you try to map this to the Unix model of user and group, - when the user and group happen to be the same, the user-permissions and - the group-permissions are operating on the same underlying Windows - object, and so they cannot be different. I think the user-permissions - prevail. - - For example, if you try to sync a Unix file with permissions rw-r--r-- - with a Cygwin file with permissions rw-rw-r-- whose owner happens to be - the same as the group, unison will report success, but the actual - permissions will not be changed. Moreover, during the next sync, - unison will by default propogate the Cygwin file back to the Unix file, - so that the degenerate permissions under Cygwin will migrate to the - Unix system unless you are careful to prevent unison from doing it. - (When you are trying to sync some 75,000 email and font files, this all - is more than a little exasperating!) - - --- - - Further important advice if you are going to synchronize Cygwin - filesystems with unison's full Unix permissions model (and perhaps it - is also important even with unison's default behavior): - - Background: the flags "ntsec" or "ntea" in the CYGWIN environment - variable signals Cygwin's libraries to use the richer NT permissions - model rather than a simplified Win95-98 model. "ntsec" requires an - NTFS filesystem, "ntea" will work with FAT filesystems. I use - "ntsec". - - If unison does not have CYGWIN set appropriately in its environment, - some chmod calls will not do the expected thing, even though they - return with success. This will result in the file coming up again in - the next synchronization, and unison will then by default propagate the - (wrong) permissions from the Cygwin file back to the Unix system. (The - first chmod apparently succeeded, so unison records the new permissions - in its archive; the second time, when the file does not match the - archive, it seems to unison that the Cygwin file has been changed.) - - If you run unison from the bash command line, you will most likely not - have a problem, since CYGWIN is probably set appropriately and exported - in the .bat script that launches bash. Likewise, when the Cygwin - filesystem is the remote one, Cygwin's sshd is by default set up (by - /usr/bin/ssh-host-config) to establish and export an appropriate value - of CYGWIN to ssh clients. - - If you launch unison directly from a Windows shortcut, however, you - must set CYGWIN in your Windows environment variables. This is - certainly a convenient way to launch unison either with a particular - profile or generically. The instructions for setting up Cygwin and the - discussions of the CYGWIN envariable in the user manual never mention - any need to put CYGWIN in the Windows envariables, however. (I'm - writing them to suggest they do.) - - >From the unison standpoint, the code which chooses to use the full - permissions model on Cygwin hosts (right now I have it hacked simply to - always use full permissions, by commenting out a line) perhaps ought to - confirm that "ntsec" or "ntea" is in the CYGWIN envariable and issue a - big warning that permissions may not be properly synchronized if - neither value is there. - -** add '' - to the head section of all the unison web pages. - -** Peter Selinger has built an SHA256 implementation that should be usable - as a drop-in replacement for MD5, if we ever need to do that - -* BUILDING AND INSTALLING -* ======================= - -** 'make install' could be improved (and documented) - 1. Typing "make install' after a "make" should simply install the - program that was made, not attempt to do a remake with different options. - ===> Doesn't it??? - 2. "make install' should try to install as /usr/local/bin/unison, not - ~/bin/, especially considering that ~/bin is the wrong place to do the - install under OSX (it should be ~/Apps or ~/Apps/bin) - -** document the dynamically linked version, as some user already reported - that it works fine. Also, try to make the statistics window work with - this version. [This is "under windows," I think.] - -should strip symbols from binary files in 'make exportnative' - - -* DOCUMENTATION -* ============= - -** Put a little more order on the flags and preferences -- e.g., - organize them into "basic preferences", "advanced preferences," - "expert preferences," etc. Requires hacking the Uarg module. - -** Add something to docs about how to use 'rootalias'. Include an - explanation of the semantics, a couple of examples, and a suggestion - for how to debug what it's doing by turning on appropriate debugging - flags. (And maybe we should actually make the debug output there a - bit more verbose?) - -** Misc: - - document good trick: use -1 switch to ssh if the paths are set up wrong - on the remote host - - should say whether trailing slashes are ok for paths; should say - that leading slashes are illegal. - ===> check - - not so clear what you have to do with a Regex to match a directory - and all its subfiles: foo or foo/ or foo/.* ? - ===> the first. document it. (Does foo/ match foo? I don't think so. - Document, one way or the other.) - - what happens when files are included whose parent dirs are - excluded? (With Regex? With multiple Path and Name?) - ===> document - - the documentation is very good, but i couldn't find a description of how - to respond to the prompts in the textual ui. is that explained - somewhere? a few typos i noticed: "with t fast", "nison", "off of". - -** what happens when we ssh through loopback and sync the same - directory? - ===> Needs to be thought about. In particular, what is the name of the - archive in this case? Could they ever be exactly the same? - ===> Try it and see. - - -* SMALL FUNCTIONALITY IMPROVEMENTS -* ================================ - -**** The archive should indicate whether it is case-dependant or not. - (This is important for correctness -- if the case-insensitive flag is - set differently on different runs, things can get very confused!) - -**** Use LargeFile (submodule of Unix) instead of standard file commands, - to avoid problems with huge files - DONE - -*** [Marcus Sundman, 2008] Unison can't propagate changes in read-only - folders. The correct way to do it is to temporarily add write - permissions for the user to the folder, then do the changes and then - reset the permissions. Now unison tries to just do the changes, which - fails with a "permission denied" error. - -*** [Adrian Stephens, 2007] I would like the scope of rootalias to be - expanded so that any command that expects a root will perform aliasing - on the command. In my application, I need to change the root statement - as I move my machine from desk to the road. I also have a "force" - statement, and I also have to remember to edit this to match. It would - be more convenient to have to edit in a single place and, more - importantly, avoids introducing any inconsistency. - --- [BCP:] I like this idea. However, since I'm struggling at the - moment to find time to finish polishing 2.27 to become the new stable - release, I am not going to undertake to implement it. If you (or - someone else) would like to give it a shot, here is what I think needs - to happen: - - Move the rootalias preference and the rootalias-expanding code from - Update.root2stringOrAlias into the Common module (creating a new - function there for rootalias expansion). - - Find places like Recon.lookupPreferredRoot that deal with names of - roots and add a call to the rootalias-expanding function. - -*** Delete old backups mechanism and, instead, extend new one to cover its - functionality - - put backups in same dir as files by default - - otherwise, put them in a central place if one is given - - Update.incrVersionsOfBackups should not be externally visible - -*** there's an HFS+ aware version of rsync called rsyncx. It should be - relatively easy to import that functionality into unison. - -*** Consider altering the socket method, so the server accepts connections - only on a particular address? This would be very useful, because many people - tunnel unison over an OpenVPN Link, and this software works with virtual - devices and additional IP addresses on it. If unison would accept - connections only on the virtual device, the security would be enhanced, - because the OpenVPN key should be unavailable for the black hats. - -*** unison -help doesn't go to stdout so it's hard to pipe it into less - ===> Probably *all* output should go to stdout, not stderr (but maybe - we need a switch to recover the current behavior) - -*** for the MSVC version of unison, we should deal with the nonstandard - semantics regarding read-only files. - ===> What does that mean?? - -*** If a root resides on a `host' with an ever and unpredictably changing - host name (like a public login cluster with dozens of machines and a - shared file system), listing each possible host name for this root is - not feasible. The ability of specifing patterns in rootaliases would - help a lot in this case. I'm thinking of something like this: - rootalias = //.*//afs/cern.ch/user/n/nagya -> - //cern.ch//afs/cern.ch/user/n/nagya [NAGY Andras , - March 12] - ===> We definitely ought to do something about this problem -- it's - increasingly common. Not sure if this is the right proposal, but - something. - -*** Currently, if a file changes on either side between the initial update - detection and the time when the transport module tries to propagate - changes, the transport is aborted. But if the change occurred on the - replica that is being used as the source for the transfer (which will - be the common case!), then there is no reason to abort -- we should - just propagate the newest version. - -*** When unison notices lock files in the archive directory, it should - offer to delete them *for* the user, rather than forcing the user to - delete them manually. - -*** improve error reporting when Unison is started with different versions of - client and server - -*** A switch to delete files before replication. It's not something I - would have considered doing, and in normal replication, there have - already been pointed out good reasons why Unison works the way it - does, but Roman makes a good reason for why this is useful in CD-RW - backups, and why this could be useful on a general to do list. And - this is certainly *generic*, which my point is not (as it only applies - to the Microsoft Windows NTFS situation). - -*** A switch to include NTFS ACE/ACL file permissions to be copied when - copying from one NTFS location to another NTFS location. As I - mentioned this is less generic, but of fundamental usefullness in - Windows usage, as NTFS permissions are absolutely essential in many - backup/replication situations in Windows systems. Robocopy has the - /SEC switch, but Unison is a far better tool, and I was hoping in that - light that Unison could implement the rights/permissions stuff also. - -*** There is no command-line argument to tell Unison where the .unison - directory is; Unison finds it in the environment or not at all. I was - able to workaround this with a symbolic link to put .unison where it was - expected, but it seems like an easy option to add. - -*** The other is possibly a bit more difficult, but more useful as well. There - is a brief window of vulnerability between when the local server is started - and when the remote client connects to it. (It's no longer than that - because Unison won't take more than one connection at a time.) I can - tolerate it, but the window could be eliminated entirely by allowing socket - connections to require a nonce. - -** Would be nice to transfer directories "incrementally" rather than - atomically (i.e., if Unison is interrupted during the transfer of a - directory, the partially-transferred directory should persist). Is - this allowed by the specification? (If so, then it should just become - the default behavior.) - ===> BCP and William Lovas have discussed how to do this, but it is - not all that straightforward. - -** we should reload the current preference file (if it's changed, at least) - when we restart - -** [A good idea for the ssh prompt issue...] I'm not sure why you would - need a C implementation; you could do the same thing in CAML that expect - does: allocate a PTY, start up ssh on that, and interact with it. On - Windows, you can probably do the same with the Win32 console API, - although I don't see why such an improvement needs to work uniformly - across all platforms to be useful. [Note that allocating PTYs is not - very portable, but we could at least try allocating one and see if - something useful comes back...] - -** An idea for the interface to the external merge functionality: - created a general mechanism for invoking external functionality... - - in profile, declare a command of the form - key M = external "merge ##1 ##2 ###" --> overwriting originals - (concrete syntax open to discussion!). Main parts are - - what key to bind it to in the UI(s) - - the command line to start up - - variables (##1 and ##2) for the local and remote files - (the remote file will automatically be copied to a local temp - file, if this variable is used) - - a variable (###) for a temporary output file - - an indication of what to do with this output file - (or maybe this could be automatic) - - (should also indicate which machine(s) to run the command on?) - -** small additions to merge functionality: - - if the external merge program *deletes* one of the files it is given, - Unison should interpret this as "Copy the other file onto this location - (instead of merging)". This will allow some other interesting - functionality, e.g. external programs that may decide to keep both - versions by moving one of them out of the way (mh-rename). - - the invocation of the external 'diff' program should be selectable - using the same conventions as the 'merge' program - - would be nice to be able to invoke DIFFERENT merge programs - depending on paths - -** We should document other available merge tools, e.g., - idiff [BCP has a copy of the code for idiff that Norman sent.] - -** Allow 'default.prf' in place of 'default' for profile names - -** [dlux at dlux.hu, Feb 2002] For some apps (e.g., some mail readers?), - putting temp files in the same directory as the file we're about to - overwrite is bad/dangerous. Some alternatives that we could - consider... - - Add a configuration option for temporary directory and notice the - user about the volume restrictions in the docs and then if the user - does not consider it, then we use a non-atomic (copy + unlink) - rename. In an ideal environment (where the user consider this - restriction), it makes possible to sync a maildir folder while it is - online! - - An even better solution: One more temporary file step. If the user - sets the temporary directory, then we synchronize the files to that - directory, and if the file is downloaded/uploaded fully, then we move - it to a tempfile into the target directory (with .unison.tmp - extension) and then rename it into the final name. - -** Suggestion for extending merge functionality - - add a new kind of preference -- a conditional stringlist preference - - in the preference file, each value looks like either - prefname = string - or - prefname = string WHEN Path PPPPP - prefname = string WHEN Name XXXXX - prefname = string WHEN Regex XXXXX - - when we look up such a preference, we provide a current path, and it - returns the one that matches the current path, if any - -** Would be good to (optionally) change the semantics of the "backup" - functionality, so that Unison would not insist on making a *full* - backup of the whole replica, but just do so lazily. (I.e., it would - not make backups when files get put into the archive, but only when - they actually get changed.) - -** Would also be nice to allow the backup preference to be set - differently on different hosts -- so that all the backups could be - kept on one side (if there is no space on the other side, e.g.). The - obvious way to do this is to add a switch like '-suppressbackupsonroot - BLAH' but this feels a bit ad hoc. It would be nicer to decide, in - general, which preferences can sensibly have different settings on - different roots (e.g., the location of the archive dir, ...) and - provide a general mechanism for setting them per-host. - -** ~/foo seems to work on the command line but not in root = ~/foo in the - config file. - -- - Similarly: It seems that when one specifies logfile = foobar - in the preferences file, then unison assumes that it is relative to the - current directory. Since neither ~ nor $HOME are understood in the - preference file, this is an inconvenience, because it forces the user to - remember to run unison from the root directory. - ===> Would be nice to support ~ internally - -** giving a -path preference whose parent dir doesn't exist currently causes - Unison to abort with a fatal error. Would be better if it just - signalled an error for that file. - -** no spec for escaping regexp chars; spaces? newlines? tabs? others? - mechanism for getting the list of files from another program (plugin)? - ===> needs to be documented (look at rx.ml) - -** seems not to recognise ignores when they are inside a path that has - just been added. -===> Jamey claims that if we add a new directory, some of whose children - are ignored, then when this new dir is propagated, also the ignored - stuff gets copied (if this is true, then it's probably a bug in - update.ml) - -* When loading archives (not just when dumping them), one should check that - they have the same checksum. - -* [July 2002, S. Garfinkel] Maybe we should turn the 'time' option on by - default. We might need to help people a little on the upgrading, - though. When you did a sync with time=false, then a sync with - time=true, you get a zillion conflicts... - ==> This is probably a good idea, but I'm a little scared of all the - messages we'd get from upgrading users - -* Maybe we should write debugging and tracing information to stdout - instead of stderr? - -* URI pathname syntax - Why is the following command wrong? - unison -servercmd `which unison` /usr/local ssh://labrador/usr/local - It took me three tries and careful reading of the documentation to - figure it out. I don't have any good suggestions here, other than - that I think the whole issue of relative vs absolute pathnames needs - serious thought. I think the current interfaces do not work very - well. One possibility that I will float is that you invent a special - character string to refer to the root of synchronization. - E.g., interpret ~ as $HOME in roots. - -- - Also: we should add the file:// syntax to URIs... - file://C:/Necula (C:/Necula on the local file system) - file:////share/subdir (//share/subdir as from the point of view of - the local file system) - unison://host///share/subdir - -- - Should local roots in a profile be canonized? - Right now, we can have a relative root in the profile. This - is going to be a problem if unison is started in a different - directory. - -* At the moment, if Unison is interrupted during a non-atomic operation - on the file system, the user has to clean things up manually, following - the instructions in the the recovery log. We should do that for them. - (This is actually a bit tricky, since we need to be careful about what - might happen if unison crashes during recovery, etc. The best way to - accomplish this would be to write a general logging/recovery facility - in OCaml.) - -* Dealing with ACLs: Maybe this is what we should do actually. We could - specify a user (and similarly a group) to unison. It would be - interpreted in a special way: if a file is owned by this user, unison - will rather consider that the owner of the file is undefined. So, when - a file owned by an unkown user is synchronized, the file owner is set - to the default user. Then, on the next synchronizations, unison will - consider that the owner has not been propagated and try again. [Should - be easy once the reconciler is made more modular] - -* The -terse preference should suppress more (in fact, almost all) - messages in the text ui. See Dale Worley's message for a detailed - proposal. - -Make sure that no filesystem check is missing in the transport agent. - ===> What does this mean? - -Would be nice to have the Unison log file relative to my home directory, - like this - logfile = ~/.unision/log - or - logfile = $HOME/.unision/log - (We should do this for *all* files that the user specifies.) - -It would be nice if Unison could have the "power" to copy write-protected - files, maybe as an option. - -Update checking over NFS might be *much* faster if we use only relative - pathnames (absolute paths may require an RPC per level!?) - -On one server (Saul), Unison seems to use HUGE amounts of memory (250Mb - resident), while on my laptop it's much less. WTF? - -[Ben Wong, Aug 2002] Why not make unison fall back to addversionno if it - would otherwise bomb out with an incorrect version number? That way I - wouldn't have to educate people on how to use Unison at my site; it'd - "just work". - -The -sortbysize is nice, but what I would really like is a -limitbysize. - When I'm connected over a modem line, I would like not to transfer the - larger files that need synchronization. That can wait until I am - connected via a faster connection. What I presently do is allow unison - to run in -sortbysize mode, and abort once I have all my little, more - important files. -limitbysize should simply filter the list of transfer - to only those that are below the threshold size. The syntax is - obvious... It should be -limitbysize xxx, where xxx is the size - (preferably in kb, but bytes will do as well). - -Maybe we should use getcwd for canonizing roots under Unix. For some - systems (Linux, for instance), getcwd succeeds even when some parent - directory is not readable. - -[From Yan Seiner] - Can unison modify the (*nix) environment to show the - ip/name/some_other_id of the system making the connection? This would - help tremendously. - For example, vtun does this: - --- - root 6319 0.0 0.6 1984 852 ? S< Aug27 0:37 vtund[s]: - bgsludge tun tun10 - root 6324 0.0 0.6 1984 852 ? S< Aug27 2:00 vtund[s]: - cardinal tun tun0 - root 17001 0.0 0.6 1984 848 ? S< Aug27 0:05 vtund[s]: - wtseller tun tun11 - root 20100 0.0 0.6 1984 852 ? S< Aug28 0:02 vtund[s]: - cardridg tun tun1 - ---- - So I know I have four sessions, to each named machine, and I know - immediately who is connected and who is not. If I have to kill a - session, I don't kill the wrong one. - -add a switch '-logerrors' that makes unison log error messages to a - separate file in addition to the standard logfile - -Dale Worley's suggestion for relocating archives: - > You're right: it's not all that tricky. So would you be happy if you - > could run unison in a special mode like this - > unison -relocate //old-host1//path1 //old-host2//path2 \ - > //new-host1//path1 //new-host2//path2 - > (where all the hosts and paths are normalized) and it would move the - > archives for you on both machines? - Actually, I think that what you want is for the user to specify the - old paths in *normalized* form and the new paths in *non-normalized* - form. That is, unison uses the old paths literally as provided by the - user, but it applies the usual normalization algorithm to the new - paths. - This may sound strange, but I think that it's the Right Thing: - - There is no guarantee that the normalization algorithm, applied to - the old paths as the user used to specify them, normalizes to the - the normalized paths that are recorded in the archive. Indeed, - there may no longer be *any* path which normalizes to the recorded - paths. - - The user can extract the normalized old paths from the second line - of the archive files. This is clumsy, but reliable. And we don't - intend the user to relocate an archive very often. - - But for the new paths, you want to normalize what the user supplies, - because he doesn't know in advance how Unison is going to normalize - the new paths, and may well specify them incorrectly. That would - leave him with a relocated archive that he might not be able to use - at all. - You might want to put quotes around the pathnames in the second line - of the archive, since MS-Windows directory names can contain spaces, - etc. - -For safety... - - Add a preference 'maxdelete' taking an integer parameter, default 100 - (or perhaps even less -- keeping it fairly small will help naive users - avoid shooting themselves in the foot). A negative number means - skip this check (i.e., infinity). - - When the transport subsystem gets control (i.e., just after the user - says 'go' to the user interface, when not running in batch mode) - it first checks the number of files that are going to be deleted - (including all the contents of any directories that are marked for - deletion). If it is more than maxdelete (and maxdelete is - positive), then... - - If we're in batch mode (batch=true), we halt without doing - anything. - - If we're not in batch mode, we display a warning message and - make the user confirm. (If they do *not* confirm, it would be - nice to dump them back into the user interface again, but this - would require a little rewriting of our control flow.) - - Would also be nice to include a display in the UI someplace that says - how many files are to be deleted/changed/created plus how many bytes - to be transferred, and a warning signal (display in red or something) - if these exceed the current setting of maxdelete. - -Might be nice to provide an option that says "if you're propagating a - newly created directory and something goes wrong with something inside - it, just ignore the file that failed and keep going with the rest of - the directory." [We probably don't want to continue in all cases (for - instance, when the disk is full)] - -Would be nice to be able to run unison in a special mode like this - unison -relocate //old-host1//path1 //old-host2//path2 \ - //new-host1//path1 //new-host2//path2 - (where all the hosts and paths are canonized) and have it move the - archives for you on both machines? - -It would be nice if unison had a tool by which it could regenerate all - the MD5 sums and compare them to what it has stored, then produce a list - of files that are different. I obviously cannot count on file size and - date in this case; those may not have changed but the contents may be - corrupt. - -If the connection to the server goes away and then comes back up, it - would be nice if Unison would transparently re-establish it (at least, - when this makes sense!) - -If we synchronize a path whose parent doesn't exist in one replica, we'll - fail. Might be nicer to create the parent path if needed. - -maybe put backup files somewhere other than in the replica (e.g. in - $HOME/tmp, or controlled by preference) - -Better documentation of the -backups flag, and a way to expire old backups - -Add a preference that makes the reconciler ignore prefs-only differences - between files (not updating the archive, though -- just suppressing - the difference -- will this slow things down too much?? Maybe it needs - to happen in the update detector, before things are transmitted across - the network.) - -Perhaps we should interpret both / and the local separator as path - separators, i.e., under Windows / and \, under Mac / and :, and under - Unix just /. For Windows this will be fine, since / is not allowed in - filenames. - -Maybe have an option to tell do not transfer toto.dvi if toto.tex exists (or - toto.ps if toto.dvi): something like - Ignore .dvi If .tex - ===> This is not a good idea -- would give different ignore results on - the two machines. But maybe a variant would work: - - Have an option to execute a command if a given file exist like - Execute rm core If core - Execute make clean If Makefile - -We should put in a preference that forces Unison to do really safe update - detection (with fingerprinting), even on Unix systems. (Maybe just for - some paths?) - -Maybe we should never emit a conflict for modtimes; instead, we just - propagate the largest one. - -[John Langford] Some code for (at least partially) handling large files - can be found in 64bit_ops.c in: - http://www-2.cs.cmu.edu/~jcl/programs/sync_file.tar.gz - Make sure you pay attention to the compile line as it is important. - -[Ivo Welch] I would do a quick test of case sensitivity in the program -itself at the time you do a first prf sync, so that the user does not have -to bother with it. Just write two files on each end which differ in case, -and see if there is overwriting. Then do the smart thing. The long-named -file in the .unison directory should keep this information thereafter. -(BCP: Implementing this is more difficult than it might seem. E.g., -whenever a symlink is followed we might need to go through the same -exercise. And then we'd need to be able to deal with replicas that are not -all one way or the other...) - -[Ivo Welch] I would give some examples in the man page of what an xxx -specification is. - -[Ivo Welch] I would allow '--' switches, in addition to the '-' switch spec. - -[Ivo Welch] On OSX, create a link from ~/Library/Application Support/Unison -to .unison, just for ease of finding it. It took me a long time to find my -.prf files. - -[Ivo Welch] the OSX GUI front end should be clear which side (left or right) -the local host and which side the remote host is. - -* USER INTERFACE -* ============== - -** In menu Actions - - show Diff applies to the current line, while - - revert to unision's recommandation applies to all lines - Should be clearer and/or homogeneous behavior. - I would also like to have "revert to unision's recommandation" for the - current line. - -** in gtk ui, display green checkmark next to finished items even if their - direction indicates a conflict; do not list such items as "skipped" at - the end - -** In both UIs, show how many bytes/files were successfully transferred - at the end - -** Should support auto-termination of the graphical UI (switch-controlled) - * Unison starts in the usual way and checks for changes - * If there are no conflicts, it proceeds without waiting for confirmation - * If there *are* conflicts, it waits for instructions, just like now - * In either case, when it's finished transferring the changes, it quits - -* [Matthew Swift] in the GTK gui at least, - display the total MB or #files or whatever it is that the ticking - %-meter is referring to when it goes from 0 to 100. it is useful to - know how big the xfer is going to be before starting it (might induce me - to choose "sort by size", or abandon and choose a smaller subset, etc.). - Also, esp. since the gui is single-threaded and unresponsive, i would - like to know what size of a synch that I am for example 50% or 22% - through. I know that an ETA and other things we're used to from many - downloading apps would require quite a bit of code, but it would help a - lot just to display whatever constant is represented by 100%. - - -* [BCP] Error reporting for per-file problems during updating leaves - something to be desired. In particular, there's no indication even of - which host the problem occurred on. (I added something that includes - "root 1" or "root 2", but I'm not sure that's better than nothing.) If - there are errors on both hosts, only one will be reported. If there - are lots of errors in a subdir, only the first will be reported. - Recon.propagateUpdates would be a starting point for changes. - -* [Jamey Leifer] - Would be nice if both UIs had a "revert to Unison's proposal" button... - -* [Jamey Leifer] - [graphic ui, wishlist] The documentation topics aren't searchable. As - a result "unison -doc running | less" is still indispensable if one - wants to find anything. I suggest adding a box - - "search in this topic: ---" - - which is always available in the doc viewer. It would be nice to - support keyboard shortcuts in the "less" style, namely "/", "n", and - "N" (i.e. search, next, previous) to avoid too much clicking. - - [graphic ui, wishlist] Ditto as far as searchability for diff reports. - -* Would be nice to have a keystroke in the UI that means 'add the current - directory to the set of ignore patterns.' - -* In the text UI, during the transport phase, print each file being - transferred on *one* line, with an arrow to indicate which way (and - dropping the explicit indication of which host from and to). The - logfile should be more explicit. - -* The unison gui currently displays a percentage completion in the lower right - corner. I would find it comforting if it would also display an effective - bandwidth there, i.e., how many bits per second are flowing through the - transport layer? I make this request because owing to a hardware - catastrophe, I have just started using Unison through the phone lines, and - it seems to do nothing for a long period of time. I don't know whether - to blame the cheap modem, the cheap ISP, or whether Unison simply isn't - telling me that bits are flowing through the wire. (netstat -tn - suggests not much is happening, but I don't know if the results can - be trusted.) - -* Would it be hard to add "tool tips" to the buttons in the UI? - ==> Look for "tooltip" in examples/testgtk.ml. - The easiest way is with a toolbar, but you can also add tooltips to any - widget (cf lines 867 and after). - -* > On a line, I would like to have a description of the action to be taken in - > clear words: (e.g. will erase file on local or will copy from local to - > remote, etc.) - This might be a good use for "tool tips," if I knew how to make them work - using lablGTK. - -* After clicking "Create new profile" in the initial profile window and - giving a name for the new profile, it is confusing to get dumped back - into the profile window again and have to explicitly select the new - profile. Would be better to skip this step and go straight into - filling in its fields. - -* Another usability issue in the text UI: , and < should mean the same to - unison. It would be nice if both had the same representation on-screen - (ie, show a "<" even if I typed a ","). Similarly for . and >. - -* The menu help for left/right arrow both said `transfer local to local'. - Not helpful. The items in question are pathnames, which you might not - have to abbreviate. To save space one might consider replacing any - common prefix, and also short prefixes that look like they might be - automounter goo, with an ellipsis. Then show, e.g., 20 chars. I'd - also be willing to name paths in my profile, e.g., replica flatcoat = - /home/cellar/nr replica cellar = /m/cellar60/nr This would be - especially attractive if my short names were meaningful on the command - line. - -* In the GTK user interface, it would be nice to be able to put up a window - displaying the contents of the log file (and add log messages to it - dynamically as we're working). Be careful, though: the log could get - large and we don't want this to be too slow. - -* Could there be an option between -ui text and -ui graphic that when combine - with -batch and -auto would start in text mode, but pop up an interactive - graphic window when real conflicts happens. - -* [Jamey Leifer] I think "unison -doc" should be mapped to "unison - -doc topics" and the error message for the former eliminated. - -* [Jamey Leifer] Typing "unison" results in the Profiles box - ("Select an existing profile..."). I think the help topics should be - available here. - -* [Jamey Leifer] The file list is confusing since the paths - are sometime relative to the root and sometimes relative to the - previous path: - Mail/drafts/3 - inbox/5538 - 5539 - 5540 - I now understand that the indentation is significant, but it's not - that clear. A further confusion is that there's varying amounts of - indentation depending on the depth of the enclosing path: - foo/1 - 2 - boo/goo/loo/1 - 3 - 4 - This is really hard to parse since the fonts are variable width. - I would prefer to read the former as: - Mail/drafts/3 - inbox/5538 - 5539 - 5540 - (with the indentation actually showing the relationship) though this - may take too much horizontal space. Alternatively, one could choose a - Windows-style display: - |-Mail/drafts/3 - |-inbox/5538 - |- 5539 - |- 5540 - -Unison's gui offers an `Actions' menu with a variety of features - regarding preferences. I would love to see an action with the following - semantics: if the two files differ only in their modification time, - prefer the older modification time. - ===> This would be easy to add, but I am beginning to worry that we are - getting too many funny little switches like this. We should think - about them all together and make sure they make sense. - -I'm watching it sync a very large file that I don't want anyway, and I'm in - a hurry. I'd like a way to say "forget that file, I don't care about it, go - on to the next one you have to sync". Doesn't sound hard...? - [Perdita Stevens, Perdita.Stevens at dcs.ed.ac.uk, Mar 14 2002] - ===> It's not trivial (involves some subtle stuff about our RPC - implementation and the single-thread nature of the GUI), but might - not be impossible either. - -"Quit" during synchronization should abort all current operations (so - that temporary files are deleted) before exiting. - ===> Again, requires some careful thinking about how this would work - with the RPC layer. - -It would be nice to have a command in the GUI that would allow a single - path within the replica to be selected from a file dialog and - synchronized. - -The scroll bar is not usable during transport: every time a line changes - in the list, the display jumps to that line; if many small files are - transfered, it makes browsing in the list quite impossible... - -[From Manuel Serrano] Would be nice to put the arrows in different - directions in different colors, so that, e.g., you could quickly scan the - list of changes and make sure that they are all in the same direction - ===> We tried this, but we couldn't find color combinations that did not - seem confusing. (Two different shades of green? Three? ...) If we - really want this, probably the best is to put in some preferences for the - user to control the colors of all the arrows individually. - -Under Windows, convert filename to Unicode before printing them. - -Text mode user interface should be brought up to date with graphical - interface (it should prompt for profile selection, creation, root - entry, etc.; command characters should be the same; ...) - -Since the manual is pretty big, it would be nice if the on-line version - were accessible through cascading menus, allowing direct access to - individual subsections. It would also be nice if it were formatted a - bit more attractively, using proportional-width fonts, etc. (Does GTK - have something like an RTF widget?) - -If I have a change I look at the detail window. It would be nice to be - able to click on one of the lines there instead of pressing one of <- - or ->. For one thing in the detail window the relative position of the - two files is up and down and translating that to <- or -> is somewhat - unintuitive. - -Also, it would be nice to highlight in the detailed window the - elements that have changed. - -Make it possible to select a bunch of conflicts at the same time and - override them all together - -The UI window should display the current roots somewhere. - -There should be a -geometry command-line interface, following the usual X - conventions. - -put in a command-line option that makes fatal errors exit right away - without displaying anything in the graphical UI (for debugging) - -Use the CTree widget to display the list of files - Add the ability to close and open directories in the UI. - -it would be nice to give a visual indication of which files are - particularly big, so that the user can tell where the transfer - operations may get slowed down. Maybe a "size bar" showing the log - of the size (perhaps also color coded). - ===> less urgent now because we can re-sort the update items by size - -Would it be hard to allow long-running transfers to be aborted? - For instance, the key "/" aborts the transmission of the selected file - OR: - Allow the user to terminate individual operations by clicking a - "cancel" button. (This is not completely straightforward because - the whole program is single-threaded. But it should be possible for - the low-level transport code in remote.ml to realize that the - operation has been aborted, clean up, and raise an exception.) - -It would be nice if the initial 'usage' message were not so long. Maybe - we could split options into 'novice' and 'expert' ones, and only print - the novice ones (with an indication how to obtain the full expert - printout). - -> Show diff should behave as an emacs view-mode buffer and quit on a single -> 'q' in the window, or better quit even without focus be sent to the diff -> window... -The UI for the diff functionality needs some polishing. (Also, it should -be merged with the new "merge" functionality.) - -consider separating switches into 'ordinary' and 'expert' categories, - documented in separate sections - -would be nice to be able to "Proceed" just the selected line - -might be nice if the GUI would beep when finished syncing (needs to be - switch-selectable and off by default, naturally). Is this easy with - LablGTK? - -It would be nice to be able to STOP the GUI in the middle of propagating - changes. - - -* TIDYING -* ======= - -* Go through the sources and make all fatal and transient error messages - as informative as possible - -More documentation (especially in the interface files) is always nice. - In particular, there isn't enough documentation of the big picture. - It isn't clear how to fit together archives, servers, paths, roots, - update detection, reconciliation, conflict resolution, or the user - interface... - -Ocamlexc v1.0, the uncaught exceptions analyzer for Objective Caml is now - available from Pessaux's home page. It would be fun to run it over the - Unison sources and see if it reveals any problems. - - -* LARGER EXTENSIONS -* ================= - -Fast update checking would be cool... Some resources: - FAM (used in Enlightenment) - dnotify (linux 2.4) - BSD kqueue - the "VFS stacking layer" implemented by a guy at Columbia - -[From JMS] - Some update detection speed improvement suggestions: - - Read the FFS (Fast Filesystem) paper for hints - - change the working directory instead of using absolute paths; this - avoids calls to the evil iname(?) facility in the kernel - - work breadth-first instead of depth first, to keep things in the - kernel cache - -Rewrite recon.ml in a more modular way. Probably, have for each property - a function taking the previous file state and the state on each - replicas, and returning in what the synchronization operation should be - (nothing, left, right, conflict); a combinator then merge the results. - -It would be good to have a graphical interface allowing management and - editing of profiles, ignore patterns, etc. Or, less ambitiously, just - have UI options for all command-line options (killServer) - -How about a facility so that you can specify more than one pair of - file systems for a single invocation of Unison? This would be like - calling Unison multiple times, except that it would ask all the - questions at once. Better yet, we could actually deal with the - multi-replica case. (The latter is pretty hard.) - -What about invoking some user-specified operation on each file as it - is transferred? Or in each directory where things have changed? - (This will require some careful design work.) - -Sync with archived directories (in tar / zip / gz format) would be - nice. Seems a bit awkward to implement, though: at the moment there - are a lot of functions all over the place that investigate and - modify the file system, and these would all have to be replaced with - a layer that transparently parses, etc., etc. - -Consider using other authentication services (e.g. Kerberos) instead - of / in addition to ssh. - -What happens when we synchronize, then decide to ignore some existing file - What happens to the entry in the archive? If mirroring, it may be - large, we probably want to delete it from the archive. - -File level synchronization (bookmarks, mailboxes) - -It might be nice to implement an (optional) safety check that detects - aliasing within a replica due to followed links (or hard links) and - complains if it finds any. This should not be *too* expensive, since - we already know all the inode numbers. (Even if it *is* expensive, it - might be useful to allow users to do this occasionally, if they are - paranoid.) - - -* WINDOWS ISSUES -* ============== - -Suggestion from Arnaud: - I have been using XP for a while and despite all the problems I have, there - is a very nice feature: being able to mount remote folders (nothing new), to - work with them offline and synchronize them. Really useful. - -- - A good way to simulate this with Unison would be to package it as a shell - extension. From the desktop by clicking on the right button the user selects - "create new Unison mount point" and answers a few trivial question. And the - rest is done in the background. There are a lot of examples of shell - extensions and there is a really good book for O'Reilly about it. - -- - A good project for a student :-) - -- - PS: see http://www.simplythebest.net/shellenh.html for some examples. - -when typing ctrl-c in windows (dos-window in win98SE) when - unison is asking for conflicting updates there araises following - message (sorry for my bad translation to english): - "This program is closes because of a non-valid action. Contact the - manufactura if the error remains". - -NTFS seems to have two ways of setting a file read-only! -Comments from Karl Moerder: - Tonight I made some files read-only on my desktop at home. I did this by - setting global read and execute permissions (from the security tab of - properties). I ran Unison and it didn't notice the change. I then set - the permissions back to full control and then selected the read-only box - (from the general tab of properties). I ran Unison again and it noticed - and pushed the perms change to the server. - I understand that Windows is a bit squirrely here, but how do you decide - which permissions to look at? It seems like perhaps the ones on the - security tab would be more natural. (?) - -- - I get similar results with both bits (they both cause read-only - behavior). - I believe that the origin of the two modes of setting is that the first - set is the old way of doing Windows protection (probably the interface - provided on FAT file systems) and the new way is the more Unix like way - (added for NTFS file systems). The new way has rwxdpo bits for each - group (and there can be several groups). - -Local Variables: -mode: outline -End: Copied: branches/2.32/src/TODO.txt (from rev 320, trunk/src/TODO.txt) =================================================================== --- branches/2.32/src/TODO.txt (rev 0) +++ branches/2.32/src/TODO.txt 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,1130 @@ +Here we list planned and imagined improvements to Unison. Ones that we +regard as most important are marked with more *s. (Unfortunately, since +Unison is no longer under active development [though it is still heavily +used by its original developers], the presence of a suggestion in this file +is not promise that anybody is going to implement it!) + +See the file BUGS.txt for a list of currently open bugs. + +########################################################################### + +* CURRENT +* ======= + +* Merge issues: + - It would be better to ignore the exit status of the external merge + tool and just look at what files it produced to decide what happened + - The function that runs the external program should not grab stdin / + stdout / stderr if Unison is running with the text UI. + - The confirmation step should offer to display the new merged file. + - (There are some older merge issues documented below) + +* Makefile for fstest + +* Work on the Unison side + - create temp file + - start watcher based on watcherosx switch, passing all paths as args + - on each loop + - parse results into shallow and deep ones + - combine the two lists (marking which is which) + - sort the list + - if there are any adjacent pairs where the first is a prefix of the + second, drop the second and mark the first as deep + - go through the list and drop any item for whioch any PREFIX of + its path matches 'ignore' and doesn't match 'ignorenot' + - bulletproof, handling fatal errors and restarting completely from + scratch if necessary + +* See if there are other hacks that should be propagated to 2.27 (the + directory transfer throttle for sure!), and Jerome's recent suggested fix + +* Rsync debugging + + - R can't run with debugging (even in 2.13) -- Alan cannot reproduce + + - when using socket mode under windows, upon completion of the first + external rsync call, the connection to the server is dropped (the + server gets an EOF and closes the connection; the client sees a + broken connection) + + - only with rsync, not scp + - only with socket mode connection by Unison, not ssh mode + - seems to have nothing to do with ssh tunneling + + - calling Unix.open_process_in instead of + Lwt_unix.open_process_full seems to make no difference + + - one difference we can see is that, at the end of the transfer, + the ssh started by rsync (when run with with -v -v) says + something like "FD1 clearing O_NONBLOCK". The similar call to + ssh from scp does not print this. + + We're running under Cygwin (which is needed to have rsync) + +########################################################################### + +* SOON +* ==== + +**** Document: root, fspath, path (local/not) + +**** Nice code cleanup trick: Add a phantom type param to Pref (and Pred?) + that prevents mutation from outside the module where the preference is + defined (by exposing it with a weak type). + +**** The third assertion in Remote.fill_buffer failed for me (BCP) during a transfer! + +**** Remaining problem with merging code: + - create two directories, each containing a .txt file + - sync so they are equal + - change the file so that one region is in conflict and another + region has changes that can be propagated correctly + - sync + - now we should be able to change the second region in just one file, + sync again, and see the change propagate; instead, it conflicts + - diagnosis: the merge stuff is not correctly updating the archive in + the event of a partial reconciliation + +**** When deleting a directory, we should *not* skip over Unison temp files + in the process of listing children + +*** Un-writeable directories can't be copied. + The 'rename' operation at the end of Files.copy will fail (at least on + OSX) if the path being renamed points to a directory and that directory + (not the one containing it!) is not writeable by the user. To fix this, + we'd need to notice when we are renaming a directory and temporarily + make it writeable just before the rename and then make it what it should + be just after. But I don't feel like writing this bit of code right + now, to handle such a corner case. [BCP, November 2008] + +*** make the ETA bar show which file is actually transferring bytes at the + moment + +*** Fix the pred module to understand negation and delete XXXnot predicates + +*** Web + - Add a "supported platforms" page mentioning system-specific stuff + - Add an installation instructions page, removing it from the manual + +*** See if we can get rid of some Osx.XXX stuff (e.g. ressLength!?) + +*** Add the following to the Problems FAQ: + + --- In unison-hackers at y..., "Matt Swift" wrote: + > I just posted a msg to cygwin at c... detailing some very strange + > behavior of chmod when a file's owner is also the file's group. It + + I was right about the crucial circumstances of owner = group. Moral: + do not let user=group under Cygwin. I know it causes a problem when + you make unison use the full permissions model on Cygwin systems; I + think this may also explain similar problems I had using the default + unison behavior (which treats Cygwin files as read-only or read-write + only) -- though there are several possible causes of like failures to + syncrhonize permissions. + + The answer is obvious, following from the basic handling of permissions + in Cygwin (in NT permissions mode), but I didn't see it. Users and + groups to Windows are the same kind of object (SID), and permissions on + a file or directory are represented as a list of (any number of) SIDs + paired with permissions such as read, write, execute (and quite a few + more). When you try to map this to the Unix model of user and group, + when the user and group happen to be the same, the user-permissions and + the group-permissions are operating on the same underlying Windows + object, and so they cannot be different. I think the user-permissions + prevail. + + For example, if you try to sync a Unix file with permissions rw-r--r-- + with a Cygwin file with permissions rw-rw-r-- whose owner happens to be + the same as the group, unison will report success, but the actual + permissions will not be changed. Moreover, during the next sync, + unison will by default propogate the Cygwin file back to the Unix file, + so that the degenerate permissions under Cygwin will migrate to the + Unix system unless you are careful to prevent unison from doing it. + (When you are trying to sync some 75,000 email and font files, this all + is more than a little exasperating!) + + --- + + Further important advice if you are going to synchronize Cygwin + filesystems with unison's full Unix permissions model (and perhaps it + is also important even with unison's default behavior): + + Background: the flags "ntsec" or "ntea" in the CYGWIN environment + variable signals Cygwin's libraries to use the richer NT permissions + model rather than a simplified Win95-98 model. "ntsec" requires an + NTFS filesystem, "ntea" will work with FAT filesystems. I use + "ntsec". + + If unison does not have CYGWIN set appropriately in its environment, + some chmod calls will not do the expected thing, even though they + return with success. This will result in the file coming up again in + the next synchronization, and unison will then by default propagate the + (wrong) permissions from the Cygwin file back to the Unix system. (The + first chmod apparently succeeded, so unison records the new permissions + in its archive; the second time, when the file does not match the + archive, it seems to unison that the Cygwin file has been changed.) + + If you run unison from the bash command line, you will most likely not + have a problem, since CYGWIN is probably set appropriately and exported + in the .bat script that launches bash. Likewise, when the Cygwin + filesystem is the remote one, Cygwin's sshd is by default set up (by + /usr/bin/ssh-host-config) to establish and export an appropriate value + of CYGWIN to ssh clients. + + If you launch unison directly from a Windows shortcut, however, you + must set CYGWIN in your Windows environment variables. This is + certainly a convenient way to launch unison either with a particular + profile or generically. The instructions for setting up Cygwin and the + discussions of the CYGWIN envariable in the user manual never mention + any need to put CYGWIN in the Windows envariables, however. (I'm + writing them to suggest they do.) + + >From the unison standpoint, the code which chooses to use the full + permissions model on Cygwin hosts (right now I have it hacked simply to + always use full permissions, by commenting out a line) perhaps ought to + confirm that "ntsec" or "ntea" is in the CYGWIN envariable and issue a + big warning that permissions may not be properly synchronized if + neither value is there. + +** add '' + to the head section of all the unison web pages. + +** Peter Selinger has built an SHA256 implementation that should be usable + as a drop-in replacement for MD5, if we ever need to do that + +* BUILDING AND INSTALLING +* ======================= + +** 'make install' could be improved (and documented) + 1. Typing "make install' after a "make" should simply install the + program that was made, not attempt to do a remake with different options. + ===> Doesn't it??? + 2. "make install' should try to install as /usr/local/bin/unison, not + ~/bin/, especially considering that ~/bin is the wrong place to do the + install under OSX (it should be ~/Apps or ~/Apps/bin) + +** document the dynamically linked version, as some user already reported + that it works fine. Also, try to make the statistics window work with + this version. [This is "under windows," I think.] + +should strip symbols from binary files in 'make exportnative' + + +* DOCUMENTATION +* ============= + +** Put a little more order on the flags and preferences -- e.g., + organize them into "basic preferences", "advanced preferences," + "expert preferences," etc. Requires hacking the Uarg module. + +** Add something to docs about how to use 'rootalias'. Include an + explanation of the semantics, a couple of examples, and a suggestion + for how to debug what it's doing by turning on appropriate debugging + flags. (And maybe we should actually make the debug output there a + bit more verbose?) + +** Misc: + - document good trick: use -1 switch to ssh if the paths are set up wrong + on the remote host + - should say whether trailing slashes are ok for paths; should say + that leading slashes are illegal. + ===> check + - not so clear what you have to do with a Regex to match a directory + and all its subfiles: foo or foo/ or foo/.* ? + ===> the first. document it. (Does foo/ match foo? I don't think so. + Document, one way or the other.) + - what happens when files are included whose parent dirs are + excluded? (With Regex? With multiple Path and Name?) + ===> document + - the documentation is very good, but i couldn't find a description of how + to respond to the prompts in the textual ui. is that explained + somewhere? a few typos i noticed: "with t fast", "nison", "off of". + +** what happens when we ssh through loopback and sync the same + directory? + ===> Needs to be thought about. In particular, what is the name of the + archive in this case? Could they ever be exactly the same? + ===> Try it and see. + + +* SMALL FUNCTIONALITY IMPROVEMENTS +* ================================ + +**** When I tell unison to ignore a file whose name has a comma in it, + then unison adds to the preferences file a line like: + ignore = Path{this file, has a comma} + which gets interpreted as "this file" OR " has a comma". + unison should be escaping that comma and write it as \, instead. + +**** Please let me say + root = ~/bla + instead of requiring me to give an absolute path to my home dir. + +**** The archive should indicate whether it is case-dependant or not. + (This is important for correctness -- if the case-insensitive flag is + set differently on different runs, things can get very confused!) + +**** Use LargeFile (submodule of Unix) instead of standard file commands, + to avoid problems with huge files + DONE + +*** [Marcus Sundman, 2008] Unison can't propagate changes in read-only + folders. The correct way to do it is to temporarily add write + permissions for the user to the folder, then do the changes and then + reset the permissions. Now unison tries to just do the changes, which + fails with a "permission denied" error. + +*** [Adrian Stephens, 2007] I would like the scope of rootalias to be + expanded so that any command that expects a root will perform aliasing + on the command. In my application, I need to change the root statement + as I move my machine from desk to the road. I also have a "force" + statement, and I also have to remember to edit this to match. It would + be more convenient to have to edit in a single place and, more + importantly, avoids introducing any inconsistency. + --- [BCP:] I like this idea. However, since I'm struggling at the + moment to find time to finish polishing 2.27 to become the new stable + release, I am not going to undertake to implement it. If you (or + someone else) would like to give it a shot, here is what I think needs + to happen: + - Move the rootalias preference and the rootalias-expanding code from + Update.root2stringOrAlias into the Common module (creating a new + function there for rootalias expansion). + - Find places like Recon.lookupPreferredRoot that deal with names of + roots and add a call to the rootalias-expanding function. + +*** Delete old backups mechanism and, instead, extend new one to cover its + functionality + - put backups in same dir as files by default + - otherwise, put them in a central place if one is given + - Update.incrVersionsOfBackups should not be externally visible + +*** there's an HFS+ aware version of rsync called rsyncx. It should be + relatively easy to import that functionality into unison. + +*** Consider altering the socket method, so the server accepts connections + only on a particular address? This would be very useful, because many people + tunnel unison over an OpenVPN Link, and this software works with virtual + devices and additional IP addresses on it. If unison would accept + connections only on the virtual device, the security would be enhanced, + because the OpenVPN key should be unavailable for the black hats. + +*** unison -help doesn't go to stdout so it's hard to pipe it into less + ===> Probably *all* output should go to stdout, not stderr (but maybe + we need a switch to recover the current behavior) + +*** for the MSVC version of unison, we should deal with the nonstandard + semantics regarding read-only files. + ===> What does that mean?? + +*** If a root resides on a `host' with an ever and unpredictably changing + host name (like a public login cluster with dozens of machines and a + shared file system), listing each possible host name for this root is + not feasible. The ability of specifing patterns in rootaliases would + help a lot in this case. I'm thinking of something like this: + rootalias = //.*//afs/cern.ch/user/n/nagya -> + //cern.ch//afs/cern.ch/user/n/nagya [NAGY Andras , + March 12] + ===> We definitely ought to do something about this problem -- it's + increasingly common. Not sure if this is the right proposal, but + something. + +*** Currently, if a file changes on either side between the initial update + detection and the time when the transport module tries to propagate + changes, the transport is aborted. But if the change occurred on the + replica that is being used as the source for the transfer (which will + be the common case!), then there is no reason to abort -- we should + just propagate the newest version. + +*** When unison notices lock files in the archive directory, it should + offer to delete them *for* the user, rather than forcing the user to + delete them manually. + +*** improve error reporting when Unison is started with different versions of + client and server + +*** A switch to delete files before replication. It's not something I + would have considered doing, and in normal replication, there have + already been pointed out good reasons why Unison works the way it + does, but Roman makes a good reason for why this is useful in CD-RW + backups, and why this could be useful on a general to do list. And + this is certainly *generic*, which my point is not (as it only applies + to the Microsoft Windows NTFS situation). + +*** A switch to include NTFS ACE/ACL file permissions to be copied when + copying from one NTFS location to another NTFS location. As I + mentioned this is less generic, but of fundamental usefullness in + Windows usage, as NTFS permissions are absolutely essential in many + backup/replication situations in Windows systems. Robocopy has the + /SEC switch, but Unison is a far better tool, and I was hoping in that + light that Unison could implement the rights/permissions stuff also. + +*** There is no command-line argument to tell Unison where the .unison + directory is; Unison finds it in the environment or not at all. I was + able to workaround this with a symbolic link to put .unison where it was + expected, but it seems like an easy option to add. + +*** The other is possibly a bit more difficult, but more useful as well. There + is a brief window of vulnerability between when the local server is started + and when the remote client connects to it. (It's no longer than that + because Unison won't take more than one connection at a time.) I can + tolerate it, but the window could be eliminated entirely by allowing socket + connections to require a nonce. + +** Would be nice to transfer directories "incrementally" rather than + atomically (i.e., if Unison is interrupted during the transfer of a + directory, the partially-transferred directory should persist). Is + this allowed by the specification? (If so, then it should just become + the default behavior.) + ===> BCP and William Lovas have discussed how to do this, but it is + not all that straightforward. + +** we should reload the current preference file (if it's changed, at least) + when we restart + +** [A good idea for the ssh prompt issue...] I'm not sure why you would + need a C implementation; you could do the same thing in CAML that expect + does: allocate a PTY, start up ssh on that, and interact with it. On + Windows, you can probably do the same with the Win32 console API, + although I don't see why such an improvement needs to work uniformly + across all platforms to be useful. [Note that allocating PTYs is not + very portable, but we could at least try allocating one and see if + something useful comes back...] + +** An idea for the interface to the external merge functionality: + created a general mechanism for invoking external functionality... + - in profile, declare a command of the form + key M = external "merge ##1 ##2 ###" --> overwriting originals + (concrete syntax open to discussion!). Main parts are + - what key to bind it to in the UI(s) + - the command line to start up + - variables (##1 and ##2) for the local and remote files + (the remote file will automatically be copied to a local temp + file, if this variable is used) + - a variable (###) for a temporary output file + - an indication of what to do with this output file + (or maybe this could be automatic) + - (should also indicate which machine(s) to run the command on?) + +** small additions to merge functionality: + - if the external merge program *deletes* one of the files it is given, + Unison should interpret this as "Copy the other file onto this location + (instead of merging)". This will allow some other interesting + functionality, e.g. external programs that may decide to keep both + versions by moving one of them out of the way (mh-rename). + - the invocation of the external 'diff' program should be selectable + using the same conventions as the 'merge' program + - would be nice to be able to invoke DIFFERENT merge programs + depending on paths + +** We should document other available merge tools, e.g., + idiff [BCP has a copy of the code for idiff that Norman sent.] + +** Allow 'default.prf' in place of 'default' for profile names + +** [dlux at dlux.hu, Feb 2002] For some apps (e.g., some mail readers?), + putting temp files in the same directory as the file we're about to + overwrite is bad/dangerous. Some alternatives that we could + consider... + - Add a configuration option for temporary directory and notice the + user about the volume restrictions in the docs and then if the user + does not consider it, then we use a non-atomic (copy + unlink) + rename. In an ideal environment (where the user consider this + restriction), it makes possible to sync a maildir folder while it is + online! + - An even better solution: One more temporary file step. If the user + sets the temporary directory, then we synchronize the files to that + directory, and if the file is downloaded/uploaded fully, then we move + it to a tempfile into the target directory (with .unison.tmp + extension) and then rename it into the final name. + +** Suggestion for extending merge functionality + - add a new kind of preference -- a conditional stringlist preference + - in the preference file, each value looks like either + prefname = string + or + prefname = string WHEN Path PPPPP + prefname = string WHEN Name XXXXX + prefname = string WHEN Regex XXXXX + - when we look up such a preference, we provide a current path, and it + returns the one that matches the current path, if any + +** Would be good to (optionally) change the semantics of the "backup" + functionality, so that Unison would not insist on making a *full* + backup of the whole replica, but just do so lazily. (I.e., it would + not make backups when files get put into the archive, but only when + they actually get changed.) + +** Would also be nice to allow the backup preference to be set + differently on different hosts -- so that all the backups could be + kept on one side (if there is no space on the other side, e.g.). The + obvious way to do this is to add a switch like '-suppressbackupsonroot + BLAH' but this feels a bit ad hoc. It would be nicer to decide, in + general, which preferences can sensibly have different settings on + different roots (e.g., the location of the archive dir, ...) and + provide a general mechanism for setting them per-host. + +** ~/foo seems to work on the command line but not in root = ~/foo in the + config file. + -- + Similarly: It seems that when one specifies logfile = foobar + in the preferences file, then unison assumes that it is relative to the + current directory. Since neither ~ nor $HOME are understood in the + preference file, this is an inconvenience, because it forces the user to + remember to run unison from the root directory. + ===> Would be nice to support ~ internally + +** giving a -path preference whose parent dir doesn't exist currently causes + Unison to abort with a fatal error. Would be better if it just + signalled an error for that file. + +** no spec for escaping regexp chars; spaces? newlines? tabs? others? + mechanism for getting the list of files from another program (plugin)? + ===> needs to be documented (look at rx.ml) + +** seems not to recognise ignores when they are inside a path that has + just been added. +===> Jamey claims that if we add a new directory, some of whose children + are ignored, then when this new dir is propagated, also the ignored + stuff gets copied (if this is true, then it's probably a bug in + update.ml) + +* When loading archives (not just when dumping them), one should check that + they have the same checksum. + +* [July 2002, S. Garfinkel] Maybe we should turn the 'time' option on by + default. We might need to help people a little on the upgrading, + though. When you did a sync with time=false, then a sync with + time=true, you get a zillion conflicts... + ==> This is probably a good idea, but I'm a little scared of all the + messages we'd get from upgrading users + +* Maybe we should write debugging and tracing information to stdout + instead of stderr? + +* URI pathname syntax + Why is the following command wrong? + unison -servercmd `which unison` /usr/local ssh://labrador/usr/local + It took me three tries and careful reading of the documentation to + figure it out. I don't have any good suggestions here, other than + that I think the whole issue of relative vs absolute pathnames needs + serious thought. I think the current interfaces do not work very + well. One possibility that I will float is that you invent a special + character string to refer to the root of synchronization. + E.g., interpret ~ as $HOME in roots. + -- + Also: we should add the file:// syntax to URIs... + file://C:/Necula (C:/Necula on the local file system) + file:////share/subdir (//share/subdir as from the point of view of + the local file system) + unison://host///share/subdir + -- + Should local roots in a profile be canonized? + Right now, we can have a relative root in the profile. This + is going to be a problem if unison is started in a different + directory. + +* At the moment, if Unison is interrupted during a non-atomic operation + on the file system, the user has to clean things up manually, following + the instructions in the the recovery log. We should do that for them. + (This is actually a bit tricky, since we need to be careful about what + might happen if unison crashes during recovery, etc. The best way to + accomplish this would be to write a general logging/recovery facility + in OCaml.) + +* Dealing with ACLs: Maybe this is what we should do actually. We could + specify a user (and similarly a group) to unison. It would be + interpreted in a special way: if a file is owned by this user, unison + will rather consider that the owner of the file is undefined. So, when + a file owned by an unkown user is synchronized, the file owner is set + to the default user. Then, on the next synchronizations, unison will + consider that the owner has not been propagated and try again. [Should + be easy once the reconciler is made more modular] + +* The -terse preference should suppress more (in fact, almost all) + messages in the text ui. See Dale Worley's message for a detailed + proposal. + +Make sure that no filesystem check is missing in the transport agent. + ===> What does this mean? + +Would be nice to have the Unison log file relative to my home directory, + like this + logfile = ~/.unision/log + or + logfile = $HOME/.unision/log + (We should do this for *all* files that the user specifies.) + +It would be nice if Unison could have the "power" to copy write-protected + files, maybe as an option. + +Update checking over NFS might be *much* faster if we use only relative + pathnames (absolute paths may require an RPC per level!?) + +On one server (Saul), Unison seems to use HUGE amounts of memory (250Mb + resident), while on my laptop it's much less. WTF? + +[Ben Wong, Aug 2002] Why not make unison fall back to addversionno if it + would otherwise bomb out with an incorrect version number? That way I + wouldn't have to educate people on how to use Unison at my site; it'd + "just work". + +The -sortbysize is nice, but what I would really like is a -limitbysize. + When I'm connected over a modem line, I would like not to transfer the + larger files that need synchronization. That can wait until I am + connected via a faster connection. What I presently do is allow unison + to run in -sortbysize mode, and abort once I have all my little, more + important files. -limitbysize should simply filter the list of transfer + to only those that are below the threshold size. The syntax is + obvious... It should be -limitbysize xxx, where xxx is the size + (preferably in kb, but bytes will do as well). + +Maybe we should use getcwd for canonizing roots under Unix. For some + systems (Linux, for instance), getcwd succeeds even when some parent + directory is not readable. + +[From Yan Seiner] + Can unison modify the (*nix) environment to show the + ip/name/some_other_id of the system making the connection? This would + help tremendously. + For example, vtun does this: + --- + root 6319 0.0 0.6 1984 852 ? S< Aug27 0:37 vtund[s]: + bgsludge tun tun10 + root 6324 0.0 0.6 1984 852 ? S< Aug27 2:00 vtund[s]: + cardinal tun tun0 + root 17001 0.0 0.6 1984 848 ? S< Aug27 0:05 vtund[s]: + wtseller tun tun11 + root 20100 0.0 0.6 1984 852 ? S< Aug28 0:02 vtund[s]: + cardridg tun tun1 + ---- + So I know I have four sessions, to each named machine, and I know + immediately who is connected and who is not. If I have to kill a + session, I don't kill the wrong one. + +add a switch '-logerrors' that makes unison log error messages to a + separate file in addition to the standard logfile + +Dale Worley's suggestion for relocating archives: + > You're right: it's not all that tricky. So would you be happy if you + > could run unison in a special mode like this + > unison -relocate //old-host1//path1 //old-host2//path2 \ + > //new-host1//path1 //new-host2//path2 + > (where all the hosts and paths are normalized) and it would move the + > archives for you on both machines? + Actually, I think that what you want is for the user to specify the + old paths in *normalized* form and the new paths in *non-normalized* + form. That is, unison uses the old paths literally as provided by the + user, but it applies the usual normalization algorithm to the new + paths. + This may sound strange, but I think that it's the Right Thing: + - There is no guarantee that the normalization algorithm, applied to + the old paths as the user used to specify them, normalizes to the + the normalized paths that are recorded in the archive. Indeed, + there may no longer be *any* path which normalizes to the recorded + paths. + - The user can extract the normalized old paths from the second line + of the archive files. This is clumsy, but reliable. And we don't + intend the user to relocate an archive very often. + - But for the new paths, you want to normalize what the user supplies, + because he doesn't know in advance how Unison is going to normalize + the new paths, and may well specify them incorrectly. That would + leave him with a relocated archive that he might not be able to use + at all. + You might want to put quotes around the pathnames in the second line + of the archive, since MS-Windows directory names can contain spaces, + etc. + +For safety... + - Add a preference 'maxdelete' taking an integer parameter, default 100 + (or perhaps even less -- keeping it fairly small will help naive users + avoid shooting themselves in the foot). A negative number means + skip this check (i.e., infinity). + - When the transport subsystem gets control (i.e., just after the user + says 'go' to the user interface, when not running in batch mode) + it first checks the number of files that are going to be deleted + (including all the contents of any directories that are marked for + deletion). If it is more than maxdelete (and maxdelete is + positive), then... + - If we're in batch mode (batch=true), we halt without doing + anything. + - If we're not in batch mode, we display a warning message and + make the user confirm. (If they do *not* confirm, it would be + nice to dump them back into the user interface again, but this + would require a little rewriting of our control flow.) + - Would also be nice to include a display in the UI someplace that says + how many files are to be deleted/changed/created plus how many bytes + to be transferred, and a warning signal (display in red or something) + if these exceed the current setting of maxdelete. + +Might be nice to provide an option that says "if you're propagating a + newly created directory and something goes wrong with something inside + it, just ignore the file that failed and keep going with the rest of + the directory." [We probably don't want to continue in all cases (for + instance, when the disk is full)] + +Would be nice to be able to run unison in a special mode like this + unison -relocate //old-host1//path1 //old-host2//path2 \ + //new-host1//path1 //new-host2//path2 + (where all the hosts and paths are canonized) and have it move the + archives for you on both machines? + +It would be nice if unison had a tool by which it could regenerate all + the MD5 sums and compare them to what it has stored, then produce a list + of files that are different. I obviously cannot count on file size and + date in this case; those may not have changed but the contents may be + corrupt. + +If the connection to the server goes away and then comes back up, it + would be nice if Unison would transparently re-establish it (at least, + when this makes sense!) + +If we synchronize a path whose parent doesn't exist in one replica, we'll + fail. Might be nicer to create the parent path if needed. + +maybe put backup files somewhere other than in the replica (e.g. in + $HOME/tmp, or controlled by preference) + +Better documentation of the -backups flag, and a way to expire old backups + +Add a preference that makes the reconciler ignore prefs-only differences + between files (not updating the archive, though -- just suppressing + the difference -- will this slow things down too much?? Maybe it needs + to happen in the update detector, before things are transmitted across + the network.) + +Perhaps we should interpret both / and the local separator as path + separators, i.e., under Windows / and \, under Mac / and :, and under + Unix just /. For Windows this will be fine, since / is not allowed in + filenames. + +Maybe have an option to tell do not transfer toto.dvi if toto.tex exists (or + toto.ps if toto.dvi): something like + Ignore .dvi If .tex + ===> This is not a good idea -- would give different ignore results on + the two machines. But maybe a variant would work: + - Have an option to execute a command if a given file exist like + Execute rm core If core + Execute make clean If Makefile + +We should put in a preference that forces Unison to do really safe update + detection (with fingerprinting), even on Unix systems. (Maybe just for + some paths?) + +Maybe we should never emit a conflict for modtimes; instead, we just + propagate the largest one. + +[John Langford] Some code for (at least partially) handling large files + can be found in 64bit_ops.c in: + http://www-2.cs.cmu.edu/~jcl/programs/sync_file.tar.gz + Make sure you pay attention to the compile line as it is important. + +[Ivo Welch] I would do a quick test of case sensitivity in the program +itself at the time you do a first prf sync, so that the user does not have +to bother with it. Just write two files on each end which differ in case, +and see if there is overwriting. Then do the smart thing. The long-named +file in the .unison directory should keep this information thereafter. +(BCP: Implementing this is more difficult than it might seem. E.g., +whenever a symlink is followed we might need to go through the same +exercise. And then we'd need to be able to deal with replicas that are not +all one way or the other...) + +[Ivo Welch] I would give some examples in the man page of what an xxx +specification is. + +[Ivo Welch] I would allow '--' switches, in addition to the '-' switch spec. + +[Ivo Welch] On OSX, create a link from ~/Library/Application Support/Unison +to .unison, just for ease of finding it. It took me a long time to find my +.prf files. + +[Ivo Welch] the OSX GUI front end should be clear which side (left or right) +the local host and which side the remote host is. + +* USER INTERFACE +* ============== + +** In menu Actions + - show Diff applies to the current line, while + - revert to unision's recommandation applies to all lines + Should be clearer and/or homogeneous behavior. + I would also like to have "revert to unision's recommandation" for the + current line. + +** in gtk ui, display green checkmark next to finished items even if their + direction indicates a conflict; do not list such items as "skipped" at + the end + +** In both UIs, show how many bytes/files were successfully transferred + at the end + +** Should support auto-termination of the graphical UI (switch-controlled) + * Unison starts in the usual way and checks for changes + * If there are no conflicts, it proceeds without waiting for confirmation + * If there *are* conflicts, it waits for instructions, just like now + * In either case, when it's finished transferring the changes, it quits + +* [Matthew Swift] in the GTK gui at least, + display the total MB or #files or whatever it is that the ticking + %-meter is referring to when it goes from 0 to 100. it is useful to + know how big the xfer is going to be before starting it (might induce me + to choose "sort by size", or abandon and choose a smaller subset, etc.). + Also, esp. since the gui is single-threaded and unresponsive, i would + like to know what size of a synch that I am for example 50% or 22% + through. I know that an ETA and other things we're used to from many + downloading apps would require quite a bit of code, but it would help a + lot just to display whatever constant is represented by 100%. + + +* [BCP] Error reporting for per-file problems during updating leaves + something to be desired. In particular, there's no indication even of + which host the problem occurred on. (I added something that includes + "root 1" or "root 2", but I'm not sure that's better than nothing.) If + there are errors on both hosts, only one will be reported. If there + are lots of errors in a subdir, only the first will be reported. + Recon.propagateUpdates would be a starting point for changes. + +* [Jamey Leifer] + Would be nice if both UIs had a "revert to Unison's proposal" button... + +* [Jamey Leifer] + [graphic ui, wishlist] The documentation topics aren't searchable. As + a result "unison -doc running | less" is still indispensable if one + wants to find anything. I suggest adding a box + + "search in this topic: ---" + + which is always available in the doc viewer. It would be nice to + support keyboard shortcuts in the "less" style, namely "/", "n", and + "N" (i.e. search, next, previous) to avoid too much clicking. + + [graphic ui, wishlist] Ditto as far as searchability for diff reports. + +* Would be nice to have a keystroke in the UI that means 'add the current + directory to the set of ignore patterns.' + +* In the text UI, during the transport phase, print each file being + transferred on *one* line, with an arrow to indicate which way (and + dropping the explicit indication of which host from and to). The + logfile should be more explicit. + +* The unison gui currently displays a percentage completion in the lower right + corner. I would find it comforting if it would also display an effective + bandwidth there, i.e., how many bits per second are flowing through the + transport layer? I make this request because owing to a hardware + catastrophe, I have just started using Unison through the phone lines, and + it seems to do nothing for a long period of time. I don't know whether + to blame the cheap modem, the cheap ISP, or whether Unison simply isn't + telling me that bits are flowing through the wire. (netstat -tn + suggests not much is happening, but I don't know if the results can + be trusted.) + +* Would it be hard to add "tool tips" to the buttons in the UI? + ==> Look for "tooltip" in examples/testgtk.ml. + The easiest way is with a toolbar, but you can also add tooltips to any + widget (cf lines 867 and after). + +* > On a line, I would like to have a description of the action to be taken in + > clear words: (e.g. will erase file on local or will copy from local to + > remote, etc.) + This might be a good use for "tool tips," if I knew how to make them work + using lablGTK. + +* After clicking "Create new profile" in the initial profile window and + giving a name for the new profile, it is confusing to get dumped back + into the profile window again and have to explicitly select the new + profile. Would be better to skip this step and go straight into + filling in its fields. + +* Another usability issue in the text UI: , and < should mean the same to + unison. It would be nice if both had the same representation on-screen + (ie, show a "<" even if I typed a ","). Similarly for . and >. + +* The menu help for left/right arrow both said `transfer local to local'. + Not helpful. The items in question are pathnames, which you might not + have to abbreviate. To save space one might consider replacing any + common prefix, and also short prefixes that look like they might be + automounter goo, with an ellipsis. Then show, e.g., 20 chars. I'd + also be willing to name paths in my profile, e.g., replica flatcoat = + /home/cellar/nr replica cellar = /m/cellar60/nr This would be + especially attractive if my short names were meaningful on the command + line. + +* In the GTK user interface, it would be nice to be able to put up a window + displaying the contents of the log file (and add log messages to it + dynamically as we're working). Be careful, though: the log could get + large and we don't want this to be too slow. + +* Could there be an option between -ui text and -ui graphic that when combine + with -batch and -auto would start in text mode, but pop up an interactive + graphic window when real conflicts happens. + +* [Jamey Leifer] I think "unison -doc" should be mapped to "unison + -doc topics" and the error message for the former eliminated. + +* [Jamey Leifer] Typing "unison" results in the Profiles box + ("Select an existing profile..."). I think the help topics should be + available here. + +* [Jamey Leifer] The file list is confusing since the paths + are sometime relative to the root and sometimes relative to the + previous path: + Mail/drafts/3 + inbox/5538 + 5539 + 5540 + I now understand that the indentation is significant, but it's not + that clear. A further confusion is that there's varying amounts of + indentation depending on the depth of the enclosing path: + foo/1 + 2 + boo/goo/loo/1 + 3 + 4 + This is really hard to parse since the fonts are variable width. + I would prefer to read the former as: + Mail/drafts/3 + inbox/5538 + 5539 + 5540 + (with the indentation actually showing the relationship) though this + may take too much horizontal space. Alternatively, one could choose a + Windows-style display: + |-Mail/drafts/3 + |-inbox/5538 + |- 5539 + |- 5540 + +Unison's gui offers an `Actions' menu with a variety of features + regarding preferences. I would love to see an action with the following + semantics: if the two files differ only in their modification time, + prefer the older modification time. + ===> This would be easy to add, but I am beginning to worry that we are + getting too many funny little switches like this. We should think + about them all together and make sure they make sense. + +I'm watching it sync a very large file that I don't want anyway, and I'm in + a hurry. I'd like a way to say "forget that file, I don't care about it, go + on to the next one you have to sync". Doesn't sound hard...? + [Perdita Stevens, Perdita.Stevens at dcs.ed.ac.uk, Mar 14 2002] + ===> It's not trivial (involves some subtle stuff about our RPC + implementation and the single-thread nature of the GUI), but might + not be impossible either. + +"Quit" during synchronization should abort all current operations (so + that temporary files are deleted) before exiting. + ===> Again, requires some careful thinking about how this would work + with the RPC layer. + +It would be nice to have a command in the GUI that would allow a single + path within the replica to be selected from a file dialog and + synchronized. + +The scroll bar is not usable during transport: every time a line changes + in the list, the display jumps to that line; if many small files are + transfered, it makes browsing in the list quite impossible... + +[From Manuel Serrano] Would be nice to put the arrows in different + directions in different colors, so that, e.g., you could quickly scan the + list of changes and make sure that they are all in the same direction + ===> We tried this, but we couldn't find color combinations that did not + seem confusing. (Two different shades of green? Three? ...) If we + really want this, probably the best is to put in some preferences for the + user to control the colors of all the arrows individually. + +Under Windows, convert filename to Unicode before printing them. + +Text mode user interface should be brought up to date with graphical + interface (it should prompt for profile selection, creation, root + entry, etc.; command characters should be the same; ...) + +Since the manual is pretty big, it would be nice if the on-line version + were accessible through cascading menus, allowing direct access to + individual subsections. It would also be nice if it were formatted a + bit more attractively, using proportional-width fonts, etc. (Does GTK + have something like an RTF widget?) + +If I have a change I look at the detail window. It would be nice to be + able to click on one of the lines there instead of pressing one of <- + or ->. For one thing in the detail window the relative position of the + two files is up and down and translating that to <- or -> is somewhat + unintuitive. + +Also, it would be nice to highlight in the detailed window the + elements that have changed. + +Make it possible to select a bunch of conflicts at the same time and + override them all together + +The UI window should display the current roots somewhere. + +There should be a -geometry command-line interface, following the usual X + conventions. + +put in a command-line option that makes fatal errors exit right away + without displaying anything in the graphical UI (for debugging) + +Use the CTree widget to display the list of files + Add the ability to close and open directories in the UI. + +it would be nice to give a visual indication of which files are + particularly big, so that the user can tell where the transfer + operations may get slowed down. Maybe a "size bar" showing the log + of the size (perhaps also color coded). + ===> less urgent now because we can re-sort the update items by size + +Would it be hard to allow long-running transfers to be aborted? + For instance, the key "/" aborts the transmission of the selected file + OR: + Allow the user to terminate individual operations by clicking a + "cancel" button. (This is not completely straightforward because + the whole program is single-threaded. But it should be possible for + the low-level transport code in remote.ml to realize that the + operation has been aborted, clean up, and raise an exception.) + +It would be nice if the initial 'usage' message were not so long. Maybe + we could split options into 'novice' and 'expert' ones, and only print + the novice ones (with an indication how to obtain the full expert + printout). + +> Show diff should behave as an emacs view-mode buffer and quit on a single +> 'q' in the window, or better quit even without focus be sent to the diff +> window... +The UI for the diff functionality needs some polishing. (Also, it should +be merged with the new "merge" functionality.) + +consider separating switches into 'ordinary' and 'expert' categories, + documented in separate sections + +would be nice to be able to "Proceed" just the selected line + +might be nice if the GUI would beep when finished syncing (needs to be + switch-selectable and off by default, naturally). Is this easy with + LablGTK? + +It would be nice to be able to STOP the GUI in the middle of propagating + changes. + + +* TIDYING +* ======= + +* Go through the sources and make all fatal and transient error messages + as informative as possible + +More documentation (especially in the interface files) is always nice. + In particular, there isn't enough documentation of the big picture. + It isn't clear how to fit together archives, servers, paths, roots, + update detection, reconciliation, conflict resolution, or the user + interface... + +Ocamlexc v1.0, the uncaught exceptions analyzer for Objective Caml is now + available from Pessaux's home page. It would be fun to run it over the + Unison sources and see if it reveals any problems. + + +* LARGER EXTENSIONS +* ================= + +Fast update checking would be cool... Some resources: + FAM (used in Enlightenment) + dnotify (linux 2.4) + BSD kqueue + the "VFS stacking layer" implemented by a guy at Columbia + +[From JMS] + Some update detection speed improvement suggestions: + - Read the FFS (Fast Filesystem) paper for hints + - change the working directory instead of using absolute paths; this + avoids calls to the evil iname(?) facility in the kernel + - work breadth-first instead of depth first, to keep things in the + kernel cache + +Rewrite recon.ml in a more modular way. Probably, have for each property + a function taking the previous file state and the state on each + replicas, and returning in what the synchronization operation should be + (nothing, left, right, conflict); a combinator then merge the results. + +It would be good to have a graphical interface allowing management and + editing of profiles, ignore patterns, etc. Or, less ambitiously, just + have UI options for all command-line options (killServer) + +How about a facility so that you can specify more than one pair of + file systems for a single invocation of Unison? This would be like + calling Unison multiple times, except that it would ask all the + questions at once. Better yet, we could actually deal with the + multi-replica case. (The latter is pretty hard.) + +What about invoking some user-specified operation on each file as it + is transferred? Or in each directory where things have changed? + (This will require some careful design work.) + +Sync with archived directories (in tar / zip / gz format) would be + nice. Seems a bit awkward to implement, though: at the moment there + are a lot of functions all over the place that investigate and + modify the file system, and these would all have to be replaced with + a layer that transparently parses, etc., etc. + +Consider using other authentication services (e.g. Kerberos) instead + of / in addition to ssh. + +What happens when we synchronize, then decide to ignore some existing file + What happens to the entry in the archive? If mirroring, it may be + large, we probably want to delete it from the archive. + +File level synchronization (bookmarks, mailboxes) + +It might be nice to implement an (optional) safety check that detects + aliasing within a replica due to followed links (or hard links) and + complains if it finds any. This should not be *too* expensive, since + we already know all the inode numbers. (Even if it *is* expensive, it + might be useful to allow users to do this occasionally, if they are + paranoid.) + + +* WINDOWS ISSUES +* ============== + +Suggestion from Arnaud: + I have been using XP for a while and despite all the problems I have, there + is a very nice feature: being able to mount remote folders (nothing new), to + work with them offline and synchronize them. Really useful. + -- + A good way to simulate this with Unison would be to package it as a shell + extension. From the desktop by clicking on the right button the user selects + "create new Unison mount point" and answers a few trivial question. And the + rest is done in the background. There are a lot of examples of shell + extensions and there is a really good book for O'Reilly about it. + -- + A good project for a student :-) + -- + PS: see http://www.simplythebest.net/shellenh.html for some examples. + +when typing ctrl-c in windows (dos-window in win98SE) when + unison is asking for conflicting updates there araises following + message (sorry for my bad translation to english): + "This program is closes because of a non-valid action. Contact the + manufactura if the error remains". + +NTFS seems to have two ways of setting a file read-only! +Comments from Karl Moerder: + Tonight I made some files read-only on my desktop at home. I did this by + setting global read and execute permissions (from the security tab of + properties). I ran Unison and it didn't notice the change. I then set + the permissions back to full control and then selected the read-only box + (from the general tab of properties). I ran Unison again and it noticed + and pushed the perms change to the server. + I understand that Windows is a bit squirrely here, but how do you decide + which permissions to look at? It seems like perhaps the ones on the + security tab would be more natural. (?) + -- + I get similar results with both bits (they both cause read-only + behavior). + I believe that the origin of the two modes of setting is that the first + set is the old way of doing Windows protection (probably the interface + provided on FAT file systems) and the new way is the more Unix like way + (added for NTFS file systems). The new way has rwxdpo bits for each + group (and there can be several groups). + +Local Variables: +mode: outline +End: Deleted: branches/2.32/src/abort.ml =================================================================== --- trunk/src/abort.ml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/abort.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,31 +0,0 @@ -(* Unison file synchronizer: src/abort.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) - -let debug = Trace.debug "abort" - -let files = ref ([] : Uutil.File.t list) -let abortAll = ref false - -(****) - -let reset () = files := []; abortAll := false - -(****) - -let file id = - debug (fun() -> Util.msg "Aborting line %s\n" (Uutil.File.toString id)); - files := id :: !files - -let all () = abortAll := true - -(****) - -let check id = - debug (fun() -> Util.msg "Checking line %s\n" (Uutil.File.toString id)); - if !abortAll || Safelist.mem id !files then begin - debug (fun() -> - Util.msg "Abort failure for line %s\n" (Uutil.File.toString id)); - raise (Util.Transient "Aborted") - end - -let testException e = e = Util.Transient "Aborted" Copied: branches/2.32/src/abort.ml (from rev 320, trunk/src/abort.ml) =================================================================== --- branches/2.32/src/abort.ml (rev 0) +++ branches/2.32/src/abort.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,46 @@ +(* Unison file synchronizer: src/abort.ml *) +(* Copyright 1999-2009, Benjamin C. Pierce + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + +let debug = Trace.debug "abort" + +let files = ref ([] : Uutil.File.t list) +let abortAll = ref false + +(****) + +let reset () = files := []; abortAll := false + +(****) + +let file id = + debug (fun() -> Util.msg "Aborting line %s\n" (Uutil.File.toString id)); + files := id :: !files + +let all () = abortAll := true + +(****) + +let check id = + debug (fun() -> Util.msg "Checking line %s\n" (Uutil.File.toString id)); + if !abortAll || Safelist.mem id !files then begin + debug (fun() -> + Util.msg "Abort failure for line %s\n" (Uutil.File.toString id)); + raise (Util.Transient "Aborted") + end + +let testException e = e = Util.Transient "Aborted" Deleted: branches/2.32/src/case.ml =================================================================== --- trunk/src/case.ml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/case.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,82 +0,0 @@ -(* Unison file synchronizer: src/case.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) - -(* The update detector, reconciler, and transporter behave differently *) -(* depending on whether the local and/or remote file system is case *) -(* insensitive. This pref is set during the initial handshake if any one of *) -(* the hosts is case insensitive. *) -let caseInsensitiveMode = - Prefs.createString "ignorecase" "default" - "!identify upper/lowercase filenames (true/false/default)" - ("When set to {\\tt true}, this flag causes Unison to treat " - ^ "filenames as case insensitive---i.e., files in the two " - ^ "replicas whose names differ in (upper- and lower-case) `spelling' " - ^ "are treated as the same file. When the flag is set to {\\tt false}, Unison " - ^ "will treat all filenames as case sensitive. Ordinarily, when the flag is " - ^ "set to {\\tt default}, " - ^ "filenames are automatically taken to be case-insensitive if " - ^ "either host is running Windows or OSX. In rare circumstances it is " - ^ "useful to set the flag manually (e.g. when running Unison on a " - ^ "Unix system with a FAT [Windows] volume mounted).") - -(* Defining this variable as a preference ensures that it will be propagated - to the other host during initialization *) -let someHostIsInsensitive = - Prefs.createBool "someHostIsInsensitive" false - "*Pseudo-preference for internal use only" "" - -(* Note: this function must be fast *) -let insensitive () = Prefs.read someHostIsInsensitive - -let needNormalization s = - let rec iter s pos len wasDot = - if pos = len then wasDot else - let c = s.[pos] in - (wasDot && c = '/') || iter s (pos + 1) len (c = '.') - in - iter s 0 (String.length s) false - -let removeTrailingDots s = - let len = String.length s in - let s' = String.create len in - let pos = ref (len - 1) in - let pos' = ref (len - 1) in - while !pos >= 0 do - while !pos >= 0 && s.[!pos] = '.' do decr pos done; - while !pos >= 0 && s.[!pos] <> '/' do - s'.[!pos'] <- s.[!pos]; decr pos; decr pos' - done; - while !pos >= 0 && s.[!pos] = '/' do - s'.[!pos'] <- s.[!pos]; decr pos; decr pos' - done - done; - String.sub s' (!pos' + 1) (len - !pos' - 1) - -(* Dots are ignored at the end of filenames under Windows. *) -let normalize s = - s -(*FIX: disabled for know -- requires an archive version change - if - insensitive () && -(*FIX: should only be done when one host is running under Windows... -(should be OK for now as it seems unlikely to have a file ending with - a dot and the same file with the same name but no dot at the end) - Prefs.read someHostIsRunningWindows && - not (Prefs.read allHostsAreRunningWindows) && -*) - needNormalization s - then - removeTrailingDots s - else - s -*) - -(* During startup the client determines the case sensitivity of each root. *) -(* If any root is case insensitive, all roots must know it; we ensure this *) -(* by storing the information in a pref so that it is propagated to the *) -(* server with the rest of the prefs. *) -let init b = - Prefs.set someHostIsInsensitive - (Prefs.read caseInsensitiveMode = "yes" || - Prefs.read caseInsensitiveMode = "true" || - (Prefs.read caseInsensitiveMode = "default" && b)) Copied: branches/2.32/src/case.ml (from rev 320, trunk/src/case.ml) =================================================================== --- branches/2.32/src/case.ml (rev 0) +++ branches/2.32/src/case.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,97 @@ +(* Unison file synchronizer: src/case.ml *) +(* Copyright 1999-2009, Benjamin C. Pierce + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + +(* The update detector, reconciler, and transporter behave differently *) +(* depending on whether the local and/or remote file system is case *) +(* insensitive. This pref is set during the initial handshake if any one of *) +(* the hosts is case insensitive. *) +let caseInsensitiveMode = + Prefs.createString "ignorecase" "default" + "!identify upper/lowercase filenames (true/false/default)" + ("When set to {\\tt true}, this flag causes Unison to treat " + ^ "filenames as case insensitive---i.e., files in the two " + ^ "replicas whose names differ in (upper- and lower-case) `spelling' " + ^ "are treated as the same file. When the flag is set to {\\tt false}, Unison " + ^ "will treat all filenames as case sensitive. Ordinarily, when the flag is " + ^ "set to {\\tt default}, " + ^ "filenames are automatically taken to be case-insensitive if " + ^ "either host is running Windows or OSX. In rare circumstances it is " + ^ "useful to set the flag manually (e.g. when running Unison on a " + ^ "Unix system with a FAT [Windows] volume mounted).") + +(* Defining this variable as a preference ensures that it will be propagated + to the other host during initialization *) +let someHostIsInsensitive = + Prefs.createBool "someHostIsInsensitive" false + "*Pseudo-preference for internal use only" "" + +(* Note: this function must be fast *) +let insensitive () = Prefs.read someHostIsInsensitive + +let needNormalization s = + let rec iter s pos len wasDot = + if pos = len then wasDot else + let c = s.[pos] in + (wasDot && c = '/') || iter s (pos + 1) len (c = '.') + in + iter s 0 (String.length s) false + +let removeTrailingDots s = + let len = String.length s in + let s' = String.create len in + let pos = ref (len - 1) in + let pos' = ref (len - 1) in + while !pos >= 0 do + while !pos >= 0 && s.[!pos] = '.' do decr pos done; + while !pos >= 0 && s.[!pos] <> '/' do + s'.[!pos'] <- s.[!pos]; decr pos; decr pos' + done; + while !pos >= 0 && s.[!pos] = '/' do + s'.[!pos'] <- s.[!pos]; decr pos; decr pos' + done + done; + String.sub s' (!pos' + 1) (len - !pos' - 1) + +(* Dots are ignored at the end of filenames under Windows. *) +let normalize s = + s +(*FIX: disabled for know -- requires an archive version change + if + insensitive () && +(*FIX: should only be done when one host is running under Windows... +(should be OK for now as it seems unlikely to have a file ending with + a dot and the same file with the same name but no dot at the end) + Prefs.read someHostIsRunningWindows && + not (Prefs.read allHostsAreRunningWindows) && +*) + needNormalization s + then + removeTrailingDots s + else + s +*) + +(* During startup the client determines the case sensitivity of each root. *) +(* If any root is case insensitive, all roots must know it; we ensure this *) +(* by storing the information in a pref so that it is propagated to the *) +(* server with the rest of the prefs. *) +let init b = + Prefs.set someHostIsInsensitive + (Prefs.read caseInsensitiveMode = "yes" || + Prefs.read caseInsensitiveMode = "true" || + (Prefs.read caseInsensitiveMode = "default" && b)) Deleted: branches/2.32/src/case.mli =================================================================== --- trunk/src/case.mli 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/case.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -1,8 +0,0 @@ -(* Unison file synchronizer: src/case.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) - -val insensitive : unit -> bool - -val normalize : string -> string - -val init : bool -> unit Copied: branches/2.32/src/case.mli (from rev 320, trunk/src/case.mli) =================================================================== --- branches/2.32/src/case.mli (rev 0) +++ branches/2.32/src/case.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,8 @@ +(* Unison file synchronizer: src/case.mli *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) + +val insensitive : unit -> bool + +val normalize : string -> string + +val init : bool -> unit Deleted: branches/2.32/src/checksum.ml =================================================================== --- trunk/src/checksum.ml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/checksum.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,50 +0,0 @@ -(* Unison file synchronizer: src/checksum.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) - -(* The checksum (or fast fingerprinting) algorithm must be fast and has to *) -(* be called in a rolling fashion (i.e. we must be able to calculate a new *) -(* checksum when provided the current checksum, the outgoing character and *) -(* the incoming one). *) - -(* Definition: cksum([c_n, c_{n-1}, ..., c_0]) = Sum c_i * 16381 ^ i *) - -type t = int - -type u = int array - -(* [power v n] computes [v ^ n] *) -let rec power v n = - if n = 0 then 1 else - let v' = power v (n / 2) in - let v'' = v' * v' in - if n land 1 <> 0 then v * v'' else v'' - -(* Takes the block length and returns a pre-computed table for the function *) -(* roll: If [init l] => I, then I_n = n * 16381 ^ (l + 1), for 0 <= n < 256 *) -(* NB: 256 is the upper-bound of ASCII code returned by Char.code *) - -let init l = - let p = power 16381 (l + 1) in - Array.init 256 (fun i -> (i * p) land 0x7fffffff) - -(* Function [roll] computes fixed-length checksum from previous checksum *) -(* Roughly: given the pre-computed table, compute the new checksum from the *) -(* old one along with the outgoing and incoming characters, i.e., *) -(* - *) -(* [roll cksum([c_n, ..., c_0]) c_n c'] => cksum([c_{n-1}, ..., c_0, c']) *) -(* - *) -let roll init cksum cout cin = - let v = cksum + Char.code cin in - (v lsl 14 - (v + v + v) (* v * 16381 *) - - Array.unsafe_get init (Char.code cout)) land 0x7fffffff - -(* Function [substring] computes checksum for a given substring in one batch *) -(* process: [substring s p l] => cksum([s_p, ..., s_{p + l - 1}]) *) - -let substring s p l = - let cksum = ref 0 in - for i = p to p + l - 1 do - let v = !cksum + Char.code (String.unsafe_get s i) in - cksum := (v lsl 14 - (v + v + v)) (* v * 16381 *) - done; - !cksum land 0x7fffffff Copied: branches/2.32/src/checksum.ml (from rev 320, trunk/src/checksum.ml) =================================================================== --- branches/2.32/src/checksum.ml (rev 0) +++ branches/2.32/src/checksum.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,65 @@ +(* Unison file synchronizer: src/checksum.ml *) +(* Copyright 1999-2009, Benjamin C. Pierce + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + +(* The checksum (or fast fingerprinting) algorithm must be fast and has to *) +(* be called in a rolling fashion (i.e. we must be able to calculate a new *) +(* checksum when provided the current checksum, the outgoing character and *) +(* the incoming one). *) + +(* Definition: cksum([c_n, c_{n-1}, ..., c_0]) = Sum c_i * 16381 ^ i *) + +type t = int + +type u = int array + +(* [power v n] computes [v ^ n] *) +let rec power v n = + if n = 0 then 1 else + let v' = power v (n / 2) in + let v'' = v' * v' in + if n land 1 <> 0 then v * v'' else v'' + +(* Takes the block length and returns a pre-computed table for the function *) +(* roll: If [init l] => I, then I_n = n * 16381 ^ (l + 1), for 0 <= n < 256 *) +(* NB: 256 is the upper-bound of ASCII code returned by Char.code *) + +let init l = + let p = power 16381 (l + 1) in + Array.init 256 (fun i -> (i * p) land 0x7fffffff) + +(* Function [roll] computes fixed-length checksum from previous checksum *) +(* Roughly: given the pre-computed table, compute the new checksum from the *) +(* old one along with the outgoing and incoming characters, i.e., *) +(* - *) +(* [roll cksum([c_n, ..., c_0]) c_n c'] => cksum([c_{n-1}, ..., c_0, c']) *) +(* - *) +let roll init cksum cout cin = + let v = cksum + Char.code cin in + (v lsl 14 - (v + v + v) (* v * 16381 *) + - Array.unsafe_get init (Char.code cout)) land 0x7fffffff + +(* Function [substring] computes checksum for a given substring in one batch *) +(* process: [substring s p l] => cksum([s_p, ..., s_{p + l - 1}]) *) + +let substring s p l = + let cksum = ref 0 in + for i = p to p + l - 1 do + let v = !cksum + Char.code (String.unsafe_get s i) in + cksum := (v lsl 14 - (v + v + v)) (* v * 16381 *) + done; + !cksum land 0x7fffffff Deleted: branches/2.32/src/checksum.mli =================================================================== --- trunk/src/checksum.mli 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/checksum.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -1,19 +0,0 @@ -(* Unison file synchronizer: src/checksum.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) - -type t = int -type u = int array - -val init : int (* blockSize *) - -> u (* pre-computed table *) - -val substring : string - -> int (* offset in string *) - -> int (* substring length *) - -> t - -val roll : u (* string length *) - -> t (* previous checksum *) - -> char (* outgoing char *) - -> char (* incoming char *) - -> t Copied: branches/2.32/src/checksum.mli (from rev 320, trunk/src/checksum.mli) =================================================================== --- branches/2.32/src/checksum.mli (rev 0) +++ branches/2.32/src/checksum.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,19 @@ +(* Unison file synchronizer: src/checksum.mli *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) + +type t = int +type u = int array + +val init : int (* blockSize *) + -> u (* pre-computed table *) + +val substring : string + -> int (* offset in string *) + -> int (* substring length *) + -> t + +val roll : u (* string length *) + -> t (* previous checksum *) + -> char (* outgoing char *) + -> char (* incoming char *) + -> t Deleted: branches/2.32/src/clroot.ml =================================================================== --- trunk/src/clroot.ml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/clroot.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,231 +0,0 @@ -(* Unison file synchronizer: src/clroot.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) - -(* - This file parses the unison command-line arguments that - specify replicas. The syntax for replicas is based on that of - URI's, described in RFC 2396. They have the following grammar: - - replica ::= [protocol:]//[user@][host][:port][/path] - | path - - protocol ::= file - | socket - | ssh - | rsh - - user ::= [-_a-zA-Z0-9]+ - - host ::= [-_a-zA-Z0-9.]+ - - port ::= [0-9]+ - - path is any string that does not begin with protocol: or //. - -*) - -(* Command-line roots *) -type clroot = - ConnectLocal of - string option (* root *) - | ConnectByShell of - string (* shell = "rsh" or "ssh" *) - * string (* name of host *) - * string option (* user name to log in as *) - * string option (* port *) - * string option (* root of replica in host fs *) - | ConnectBySocket of - string (* name of host *) - * string (* port where server should be listening *) - * string option (* root of replica in host fs *) - -(* Internal datatypes used in parsing command-line roots *) -type protocol = File | Rsh | Socket | Ssh -type uri = protocol (* - a protocol *) - * string option (* - an optional user *) - * string option (* - an optional host *) - * int option (* - an optional port *) - * string option (* - an optional path *) - -(* Regular expressions, used in parsing *) -let protocolColonSlashSlashRegexp = Str.regexp "[a-zA-Z]+://" -let protocolColonRegexp = Str.regexp "[a-zA-Z]+:" -let slashSlashRegexp = Str.regexp "//" - -let getProtocolSlashSlash s = - if Str.string_match protocolColonSlashSlashRegexp s 0 - then - let matched = Str.matched_string s in - let len = String.length matched in - let remainder = Str.string_after s len in - let protocolName = String.sub matched 0 (len-3) in - let protocol = - match protocolName with - "file" -> File - | "rsh" -> Rsh - | "socket" -> Socket - | "ssh" -> Ssh - | "unison" -> - raise(Invalid_argument - (Printf.sprintf "protocol unison has been deprecated, use file, ssh, rsh, or socket instead" )) - | _ -> - raise(Invalid_argument - (Printf.sprintf "unrecognized protocol %s" protocolName)) in - Some(protocol,remainder) - else if Str.string_match slashSlashRegexp s 0 - then Some(File,String.sub s 2 (String.length s - 2)) - else if Str.string_match protocolColonRegexp s 0 - then - let matched = Str.matched_string s in - match matched with - "file:" | "ssh:" | "rsh:" | "socket:" -> - raise(Util.Fatal - (Printf.sprintf - "ill-formed root specification %s (%s must be followed by //)" - s matched)) - | _ -> None - else None - -let userAtRegexp = Str.regexp "[-_a-zA-Z0-9.]+@" -let getUser s = - if Str.string_match userAtRegexp s 0 - then - let userAt = Str.matched_string s in - let len = String.length userAt in - let afterAt = Str.string_after s len in - let beforeAt = String.sub userAt 0 (len-1) in - (Some beforeAt,afterAt) - else (None,s) - -let hostRegexp = Str.regexp "[-_a-zA-Z0-9.]+" -let getHost s = - if Str.string_match hostRegexp s 0 - then - let host = Str.matched_string s in - let s' = Str.string_after s (String.length host) in - (Some host,s') - else (None,s) - -let colonPortRegexp = Str.regexp ":[^/]+" -let getPort s = - if Str.string_match colonPortRegexp s 0 - then - let colonPort = Str.matched_string s in - let len = String.length colonPort in - let port = String.sub colonPort 1 (len-1) in - let s' = Str.string_after s len in - (Some port,s') - else (None,s) - -(* parseUri : string - -> protocol - * user option - * host option - * port option - * path option - - where user, host, port, and path are strings, - and path is guaranteed to be non-empty -*) -let parseUri s = - match getProtocolSlashSlash s with - None -> - (File,None,None,None,Some s) - | Some(protocol,s0) -> - let (userOpt,s1) = getUser s0 in - let (hostOpt,s2) = getHost s1 in - let (portOpt,s3) = getPort s2 in - let pathOpt = - let len = String.length s3 in - if len <= 0 then None - else if String.get s3 0 = '/' then - if len=1 then None - else Some(String.sub s3 1 (len-1)) - else - raise(Util.Fatal - (Printf.sprintf "ill-formed root specification %s" s)) in - (protocol,userOpt,hostOpt,portOpt,pathOpt) - -(* These should succeed *) -let t1 = "socket://tjim at saul.cis.upenn.edu:4040/hello/world" -let t2 = "ssh://tjim at saul/hello/world" -let t3 = "rsh://saul:4040/hello/world" -let t4 = "rsh://saul/hello/world" -let t5 = "rsh://saul" -let t6 = "rsh:///hello/world" -let t7 = "///hello/world" -let t8 = "//raptor/usr/local/bin" -let t9 = "file://raptor/usr/local/bin" -let t9 = "//turtle/c:/winnt/" -let t9 = "file://turtle/c:/winnt/" - -(* These should fail *) -let b1 = "//saul:40a4/hello" -let b2 = "RSH://saul/hello" -let b3 = "rsh:/saul/hello" -let b4 = "//s%aul/hello" - -let cannotAbbrevFileRx = Rx.rx "(file:|ssh:|rsh:|socket:).*" -let networkNameRx = Rx.rx "//.*" -(* Main external printing function *) -let clroot2string = function - ConnectLocal None -> "." -| ConnectLocal(Some s) -> - if Rx.match_string cannotAbbrevFileRx s - then if Rx.match_string networkNameRx s - then Printf.sprintf "file:%s" s - else Printf.sprintf "file:///%s" s - else s -| ConnectBySocket(h,p,s) -> - Printf.sprintf "socket://%s:%s/%s" h p - (match s with None -> "" | Some x -> x) -| ConnectByShell(sh,h,u,p,s) -> - let user = match u with None -> "" | Some x -> x^"@" in - let port = match p with None -> "" | Some x -> ":"^x in - let path = match s with None -> "" | Some x -> x in - Printf.sprintf "%s://%s%s%s/%s" sh user h port path - -let sshversion = Prefs.createString "sshversion" "" - "*optional version suffix for ssh command [1 or 2]" - ("This preference can be used to control which version " - ^ "of ssh should be used to connect to the server. Legal values are " - ^ "1 and 2, which will cause unison to try to use \\verb|ssh1| or" - ^ "\\verb|ssh2| instead of just \\verb|ssh| to invoke ssh. " - ^ "The default value is empty, which will make unison use whatever " - ^ "version of ssh is installed as the default `ssh' command.") - -(* Main external function *) -let parseRoot string = - let illegal2 s = raise(Prefs.IllegalValue - (Printf.sprintf - "%s: %s" string s)) in - let (protocol,user,host,port,path) = parseUri string in - let clroot = - match protocol,user,host,port with - | _,_,None,Some _ - | _,Some _,None,None - | Rsh,_,None,_ - | Ssh,_,None,_ -> - illegal2 "missing host" - | Rsh,_,_,Some _ -> - illegal2 "ill-formed (cannot use a port number with rsh)" - | File,_,_,Some _ -> - illegal2 "ill-formed (cannot use a port number with file)" - | File,_,Some h,None -> - let prefix = "//"^h^"/" in - (match path with - None -> ConnectLocal(Some prefix) - | Some p -> ConnectLocal(Some(prefix^p))) - | File,None,None,None -> - ConnectLocal(path) - | Socket,None,Some h,Some p -> - ConnectBySocket(h,p,path) - | Socket,Some _,_,_ -> - illegal2 "ill-formed (cannot use a user with socket)" - | Socket,_,_,None -> - illegal2 "ill-formed (must give a port number with socket)" - | Rsh,_,Some h,_ -> - ConnectByShell("rsh",h,user,port,path) - | Ssh,_,Some h,_ -> - ConnectByShell("ssh"^(Prefs.read sshversion),h,user,port,path) in - clroot Copied: branches/2.32/src/clroot.ml (from rev 320, trunk/src/clroot.ml) =================================================================== --- branches/2.32/src/clroot.ml (rev 0) +++ branches/2.32/src/clroot.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,246 @@ +(* Unison file synchronizer: src/clroot.ml *) +(* Copyright 1999-2009, Benjamin C. Pierce + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + +(* + This file parses the unison command-line arguments that + specify replicas. The syntax for replicas is based on that of + URI's, described in RFC 2396. They have the following grammar: + + replica ::= [protocol:]//[user@][host][:port][/path] + | path + + protocol ::= file + | socket + | ssh + | rsh + + user ::= [-_a-zA-Z0-9]+ + + host ::= [-_a-zA-Z0-9.]+ + + port ::= [0-9]+ + + path is any string that does not begin with protocol: or //. + +*) + +(* Command-line roots *) +type clroot = + ConnectLocal of + string option (* root *) + | ConnectByShell of + string (* shell = "rsh" or "ssh" *) + * string (* name of host *) + * string option (* user name to log in as *) + * string option (* port *) + * string option (* root of replica in host fs *) + | ConnectBySocket of + string (* name of host *) + * string (* port where server should be listening *) + * string option (* root of replica in host fs *) + +(* Internal datatypes used in parsing command-line roots *) +type protocol = File | Rsh | Socket | Ssh +type uri = protocol (* - a protocol *) + * string option (* - an optional user *) + * string option (* - an optional host *) + * int option (* - an optional port *) + * string option (* - an optional path *) + +(* Regular expressions, used in parsing *) +let protocolColonSlashSlashRegexp = Str.regexp "[a-zA-Z]+://" +let protocolColonRegexp = Str.regexp "[a-zA-Z]+:" +let slashSlashRegexp = Str.regexp "//" + +let getProtocolSlashSlash s = + if Str.string_match protocolColonSlashSlashRegexp s 0 + then + let matched = Str.matched_string s in + let len = String.length matched in + let remainder = Str.string_after s len in + let protocolName = String.sub matched 0 (len-3) in + let protocol = + match protocolName with + "file" -> File + | "rsh" -> Rsh + | "socket" -> Socket + | "ssh" -> Ssh + | "unison" -> + raise(Invalid_argument + (Printf.sprintf "protocol unison has been deprecated, use file, ssh, rsh, or socket instead" )) + | _ -> + raise(Invalid_argument + (Printf.sprintf "unrecognized protocol %s" protocolName)) in + Some(protocol,remainder) + else if Str.string_match slashSlashRegexp s 0 + then Some(File,String.sub s 2 (String.length s - 2)) + else if Str.string_match protocolColonRegexp s 0 + then + let matched = Str.matched_string s in + match matched with + "file:" | "ssh:" | "rsh:" | "socket:" -> + raise(Util.Fatal + (Printf.sprintf + "ill-formed root specification %s (%s must be followed by //)" + s matched)) + | _ -> None + else None + +let userAtRegexp = Str.regexp "[-_a-zA-Z0-9.]+@" +let getUser s = + if Str.string_match userAtRegexp s 0 + then + let userAt = Str.matched_string s in + let len = String.length userAt in + let afterAt = Str.string_after s len in + let beforeAt = String.sub userAt 0 (len-1) in + (Some beforeAt,afterAt) + else (None,s) + +let hostRegexp = Str.regexp "[-_a-zA-Z0-9.]+" +let getHost s = + if Str.string_match hostRegexp s 0 + then + let host = Str.matched_string s in + let s' = Str.string_after s (String.length host) in + (Some host,s') + else (None,s) + +let colonPortRegexp = Str.regexp ":[^/]+" +let getPort s = + if Str.string_match colonPortRegexp s 0 + then + let colonPort = Str.matched_string s in + let len = String.length colonPort in + let port = String.sub colonPort 1 (len-1) in + let s' = Str.string_after s len in + (Some port,s') + else (None,s) + +(* parseUri : string + -> protocol + * user option + * host option + * port option + * path option + + where user, host, port, and path are strings, + and path is guaranteed to be non-empty +*) +let parseUri s = + match getProtocolSlashSlash s with + None -> + (File,None,None,None,Some s) + | Some(protocol,s0) -> + let (userOpt,s1) = getUser s0 in + let (hostOpt,s2) = getHost s1 in + let (portOpt,s3) = getPort s2 in + let pathOpt = + let len = String.length s3 in + if len <= 0 then None + else if String.get s3 0 = '/' then + if len=1 then None + else Some(String.sub s3 1 (len-1)) + else + raise(Util.Fatal + (Printf.sprintf "ill-formed root specification %s" s)) in + (protocol,userOpt,hostOpt,portOpt,pathOpt) + +(* These should succeed *) +let t1 = "socket://tjim at saul.cis.upenn.edu:4040/hello/world" +let t2 = "ssh://tjim at saul/hello/world" +let t3 = "rsh://saul:4040/hello/world" +let t4 = "rsh://saul/hello/world" +let t5 = "rsh://saul" +let t6 = "rsh:///hello/world" +let t7 = "///hello/world" +let t8 = "//raptor/usr/local/bin" +let t9 = "file://raptor/usr/local/bin" +let t9 = "//turtle/c:/winnt/" +let t9 = "file://turtle/c:/winnt/" + +(* These should fail *) +let b1 = "//saul:40a4/hello" +let b2 = "RSH://saul/hello" +let b3 = "rsh:/saul/hello" +let b4 = "//s%aul/hello" + +let cannotAbbrevFileRx = Rx.rx "(file:|ssh:|rsh:|socket:).*" +let networkNameRx = Rx.rx "//.*" +(* Main external printing function *) +let clroot2string = function + ConnectLocal None -> "." +| ConnectLocal(Some s) -> + if Rx.match_string cannotAbbrevFileRx s + then if Rx.match_string networkNameRx s + then Printf.sprintf "file:%s" s + else Printf.sprintf "file:///%s" s + else s +| ConnectBySocket(h,p,s) -> + Printf.sprintf "socket://%s:%s/%s" h p + (match s with None -> "" | Some x -> x) +| ConnectByShell(sh,h,u,p,s) -> + let user = match u with None -> "" | Some x -> x^"@" in + let port = match p with None -> "" | Some x -> ":"^x in + let path = match s with None -> "" | Some x -> x in + Printf.sprintf "%s://%s%s%s/%s" sh user h port path + +let sshversion = Prefs.createString "sshversion" "" + "*optional version suffix for ssh command [1 or 2]" + ("This preference can be used to control which version " + ^ "of ssh should be used to connect to the server. Legal values are " + ^ "1 and 2, which will cause unison to try to use \\verb|ssh1| or" + ^ "\\verb|ssh2| instead of just \\verb|ssh| to invoke ssh. " + ^ "The default value is empty, which will make unison use whatever " + ^ "version of ssh is installed as the default `ssh' command.") + +(* Main external function *) +let parseRoot string = + let illegal2 s = raise(Prefs.IllegalValue + (Printf.sprintf + "%s: %s" string s)) in + let (protocol,user,host,port,path) = parseUri string in + let clroot = + match protocol,user,host,port with + | _,_,None,Some _ + | _,Some _,None,None + | Rsh,_,None,_ + | Ssh,_,None,_ -> + illegal2 "missing host" + | Rsh,_,_,Some _ -> + illegal2 "ill-formed (cannot use a port number with rsh)" + | File,_,_,Some _ -> + illegal2 "ill-formed (cannot use a port number with file)" + | File,_,Some h,None -> + let prefix = "//"^h^"/" in + (match path with + None -> ConnectLocal(Some prefix) + | Some p -> ConnectLocal(Some(prefix^p))) + | File,None,None,None -> + ConnectLocal(path) + | Socket,None,Some h,Some p -> + ConnectBySocket(h,p,path) + | Socket,Some _,_,_ -> + illegal2 "ill-formed (cannot use a user with socket)" + | Socket,_,_,None -> + illegal2 "ill-formed (must give a port number with socket)" + | Rsh,_,Some h,_ -> + ConnectByShell("rsh",h,user,port,path) + | Ssh,_,Some h,_ -> + ConnectByShell("ssh"^(Prefs.read sshversion),h,user,port,path) in + clroot Deleted: branches/2.32/src/clroot.mli =================================================================== --- trunk/src/clroot.mli 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/clroot.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -1,21 +0,0 @@ -(* Unison file synchronizer: src/clroot.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) - -(* Command-line roots *) -type clroot = - ConnectLocal of - string option (* root *) - | ConnectByShell of - string (* shell = "rsh" or "ssh" *) - * string (* name of host *) - * string option (* user name to log in as *) - * string option (* port *) - * string option (* root of replica in host fs *) - | ConnectBySocket of - string (* name of host *) - * string (* port where server should be listening *) - * string option (* root of replica in host fs *) - -val clroot2string : clroot -> string - -val parseRoot : string -> clroot Copied: branches/2.32/src/clroot.mli (from rev 320, trunk/src/clroot.mli) =================================================================== --- branches/2.32/src/clroot.mli (rev 0) +++ branches/2.32/src/clroot.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,21 @@ +(* Unison file synchronizer: src/clroot.mli *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) + +(* Command-line roots *) +type clroot = + ConnectLocal of + string option (* root *) + | ConnectByShell of + string (* shell = "rsh" or "ssh" *) + * string (* name of host *) + * string option (* user name to log in as *) + * string option (* port *) + * string option (* root of replica in host fs *) + | ConnectBySocket of + string (* name of host *) + * string (* port where server should be listening *) + * string option (* root of replica in host fs *) + +val clroot2string : clroot -> string + +val parseRoot : string -> clroot Deleted: branches/2.32/src/common.ml =================================================================== --- trunk/src/common.ml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/common.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,203 +0,0 @@ -(* Unison file synchronizer: src/common.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) - -type hostname = string - -(* Canonized roots *) -type host = - Local - | Remote of hostname - -type root = host * Fspath.t - -type 'a oneperpath = ONEPERPATH of 'a list - -(* ------------------------------------------------------------------------- *) -(* Printing *) -(* ------------------------------------------------------------------------- *) - -let root2hostname root = - match root with - (Local, _) -> "local" - | (Remote host, _) -> host - -let root2string root = - match root with - (Local, fspath) -> Fspath.toString fspath - | (Remote host, fspath) -> "//"^host^"/"^(Fspath.toString fspath) - -(* ------------------------------------------------------------------------- *) -(* Root comparison *) -(* ------------------------------------------------------------------------- *) - -let compareRoots x y = - match x,y with - (Local,fspath1), (Local,fspath2) -> - (* FIX: This is a path comparison, should it take case - sensitivity into account ? *) - compare (Fspath.toString fspath1) (Fspath.toString fspath2) - | (Local,_), (Remote _,_) -> -1 - | (Remote _,_), (Local,_) -> 1 - | (Remote host1, fspath1), (Remote host2, fspath2) -> - let result = - (* FIX: Should this ALWAYS be a case insensitive compare? *) - compare host1 host2 in - if result = 0 then - (* FIX: This is a path comparison, should it take case - sensitivity into account ? *) - compare (Fspath.toString fspath1) (Fspath.toString fspath2) - else - result - -let sortRoots rootList = Safelist.sort compareRoots rootList - -(* ---------------------------------------------------------------------- *) - -type prevState = - Previous of Fileinfo.typ * Props.t * Os.fullfingerprint * Osx.ressStamp - | New - -type contentschange = - ContentsSame - | ContentsUpdated of Os.fullfingerprint * Fileinfo.stamp * Osx.ressStamp - -type permchange = PropsSame | PropsUpdated - -type updateItem = - NoUpdates (* Path not changed *) - | Updates (* Path changed in this replica *) - of updateContent (* - new state *) - * prevState (* - summary of old state *) - | Error (* Error while detecting updates *) - of string (* - description of error *) - -and updateContent = - Absent (* Path refers to nothing *) - | File (* Path refers to an ordinary file *) - of Props.t (* - summary of current state *) - * contentschange (* - hint to transport agent *) - | Dir (* Path refers to a directory *) - of Props.t (* - summary of current state *) - * (Name.t * updateItem) list (* - children; - MUST KEEP SORTED for recon *) - * permchange (* - did permissions change? *) - * bool (* - is the directory now empty? *) - | Symlink (* Path refers to a symbolic link *) - of string (* - link text *) - -(* ------------------------------------------------------------------------- *) - -type status = - [ `Deleted - | `Modified - | `PropsChanged - | `Created - | `Unchanged ] - -type replicaContent = Fileinfo.typ * status * Props.t * updateItem - -type direction = - Conflict - | Merge - | Replica1ToReplica2 - | Replica2ToReplica1 - -let direction2string = function - Conflict -> "conflict" - | Merge -> "merge" - | Replica1ToReplica2 -> "replica1 to replica2" - | Replica2ToReplica1 -> "replica2 to replica1" - -type replicas = - Problem of string (* There was a problem during update detection *) - | Different (* Replicas differ *) - of replicaContent (* - content of first replica *) - * replicaContent (* - content of second replica *) - * direction ref (* - action to take *) - * direction (* - default action to take *) - -type reconItem = - {path : Path.t; - replicas : replicas} - -let ucLength = function - File(desc,_) -> Props.length desc - | Dir(desc,_,_,_) -> Props.length desc - | _ -> Uutil.Filesize.zero - -let uiLength = function - Updates(uc,_) -> ucLength uc - | _ -> Uutil.Filesize.zero - -let riAction (_, s, _, _) (_, s', _, _) = - match s, s' with - `Deleted, _ -> - `Delete - | (`Unchanged | `PropsChanged), (`Unchanged | `PropsChanged) -> - `SetProps - | _ -> - `Copy - -let rcLength ((_, _, p, _) as rc) rc' = - if riAction rc rc' = `SetProps then - Uutil.Filesize.zero - else - Props.length p - -let riLength ri = - match ri.replicas with - Different(rc1, rc2, dir, _) -> - begin match !dir with - Replica1ToReplica2 -> rcLength rc1 rc2 - | Replica2ToReplica1 -> rcLength rc2 rc1 - | Conflict -> Uutil.Filesize.zero - | Merge -> Uutil.Filesize.zero (* underestimate :-*) - end - | _ -> - Uutil.Filesize.zero - -let fileInfos ui1 ui2 = - match ui1, ui2 with - (Updates (File (desc1, ContentsUpdated (fp1, _, ress1)), - Previous (`FILE, desc2, fp2, ress2)), - NoUpdates) - | (Updates (File (desc1, ContentsUpdated (fp1, _, ress1)), - Previous (`FILE, desc2, fp2, ress2)), - Updates (File (_, ContentsSame), _)) - | (NoUpdates, - Updates (File (desc2, ContentsUpdated (fp2, _, ress2)), - Previous (`FILE, desc1, fp1, ress1))) - | (Updates (File (_, ContentsSame), _), - Updates (File (desc2, ContentsUpdated (fp2, _, ress2)), - Previous (`FILE, desc1, fp1, ress1))) - | (Updates (File (desc1, ContentsUpdated (fp1, _, ress1)), _), - Updates (File (desc2, ContentsUpdated (fp2, _, ress2)), _)) -> - (desc1, fp1, ress1, desc2, fp2, ress2) - | _ -> - raise (Util.Transient "Can't diff") - -let problematic ri = - match ri.replicas with - Problem _ -> true - | Different (_,_,d,_) -> (!d = Conflict) - -let isDeletion ri = - match ri.replicas with - Different(rc1, rc2, rDir, _) -> - (match (!rDir, rc1, rc2) with - (Replica1ToReplica2, (`ABSENT, _, _, _), _) -> true - | (Replica2ToReplica1, _, (`ABSENT, _, _, _)) -> true - | _ -> false) - | _ -> false - -let rcType (fi, _, _, _) = - Fileinfo.type2string fi - -let riFileType ri = - match ri.replicas with - Different(rc1, rc2, dir, _) -> - begin match !dir with - Replica2ToReplica1 -> rcType rc2 - | _ -> rcType rc1 - end - | _ -> "nonexistent" Copied: branches/2.32/src/common.ml (from rev 320, trunk/src/common.ml) =================================================================== --- branches/2.32/src/common.ml (rev 0) +++ branches/2.32/src/common.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,218 @@ +(* Unison file synchronizer: src/common.ml *) +(* Copyright 1999-2009, Benjamin C. Pierce + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*) + + +type hostname = string + +(* Canonized roots *) +type host = + Local + | Remote of hostname + +type root = host * Fspath.t + +type 'a oneperpath = ONEPERPATH of 'a list + +(* ------------------------------------------------------------------------- *) +(* Printing *) +(* ------------------------------------------------------------------------- *) + +let root2hostname root = + match root with + (Local, _) -> "local" + | (Remote host, _) -> host + +let root2string root = + match root with + (Local, fspath) -> Fspath.toString fspath + | (Remote host, fspath) -> "//"^host^"/"^(Fspath.toString fspath) + +(* ------------------------------------------------------------------------- *) +(* Root comparison *) +(* ------------------------------------------------------------------------- *) + +let compareRoots x y = + match x,y with + (Local,fspath1), (Local,fspath2) -> + (* FIX: This is a path comparison, should it take case + sensitivity into account ? *) + compare (Fspath.toString fspath1) (Fspath.toString fspath2) + | (Local,_), (Remote _,_) -> -1 + | (Remote _,_), (Local,_) -> 1 + | (Remote host1, fspath1), (Remote host2, fspath2) -> + let result = + (* FIX: Should this ALWAYS be a case insensitive compare? *) + compare host1 host2 in + if result = 0 then + (* FIX: This is a path comparison, should it take case + sensitivity into account ? *) + compare (Fspath.toString fspath1) (Fspath.toString fspath2) + else + result + +let sortRoots rootList = Safelist.sort compareRoots rootList + +(* ---------------------------------------------------------------------- *) + +type prevState = + Previous of Fileinfo.typ * Props.t * Os.fullfingerprint * Osx.ressStamp + | New + +type contentschange = + ContentsSame + | ContentsUpdated of Os.fullfingerprint * Fileinfo.stamp * Osx.ressStamp + +type permchange = PropsSame | PropsUpdated + +type updateItem = + NoUpdates (* Path not changed *) + | Updates (* Path changed in this replica *) + of updateContent (* - new state *) + * prevState (* - summary of old state *) + | Error (* Error while detecting updates *) + of string (* - description of error *) + +and updateContent = + Absent (* Path refers to nothing *) + | File (* Path refers to an ordinary file *) + of Props.t (* - summary of current state *) + * contentschange (* - hint to transport agent *) + | Dir (* Path refers to a directory *) + of Props.t (* - summary of current state *) + * (Name.t * updateItem) list (* - children; + MUST KEEP SORTED for recon *) + * permchange (* - did permissions change? *) + * bool (* - is the directory now empty? *) + | Symlink (* Path refers to a symbolic link *) + of string (* - link text *) + +(* ------------------------------------------------------------------------- *) + +type status = + [ `Deleted + | `Modified + | `PropsChanged + | `Created + | `Unchanged ] + +type replicaContent = Fileinfo.typ * status * Props.t * updateItem + +type direction = + Conflict + | Merge + | Replica1ToReplica2 + | Replica2ToReplica1 + +let direction2string = function + Conflict -> "conflict" + | Merge -> "merge" + | Replica1ToReplica2 -> "replica1 to replica2" + | Replica2ToReplica1 -> "replica2 to replica1" + +type replicas = + Problem of string (* There was a problem during update detection *) + | Different (* Replicas differ *) + of replicaContent (* - content of first replica *) + * replicaContent (* - content of second replica *) + * direction ref (* - action to take *) + * direction (* - default action to take *) + +type reconItem = + {path : Path.t; + replicas : replicas} + +let ucLength = function + File(desc,_) -> Props.length desc + | Dir(desc,_,_,_) -> Props.length desc + | _ -> Uutil.Filesize.zero + +let uiLength = function + Updates(uc,_) -> ucLength uc + | _ -> Uutil.Filesize.zero + +let riAction (_, s, _, _) (_, s', _, _) = + match s, s' with + `Deleted, _ -> + `Delete + | (`Unchanged | `PropsChanged), (`Unchanged | `PropsChanged) -> + `SetProps + | _ -> + `Copy + +let rcLength ((_, _, p, _) as rc) rc' = + if riAction rc rc' = `SetProps then + Uutil.Filesize.zero + else + Props.length p + +let riLength ri = + match ri.replicas with + Different(rc1, rc2, dir, _) -> + begin match !dir with + Replica1ToReplica2 -> rcLength rc1 rc2 + | Replica2ToReplica1 -> rcLength rc2 rc1 + | Conflict -> Uutil.Filesize.zero + | Merge -> Uutil.Filesize.zero (* underestimate :-*) + end + | _ -> + Uutil.Filesize.zero + +let fileInfos ui1 ui2 = + match ui1, ui2 with + (Updates (File (desc1, ContentsUpdated (fp1, _, ress1)), + Previous (`FILE, desc2, fp2, ress2)), + NoUpdates) + | (Updates (File (desc1, ContentsUpdated (fp1, _, ress1)), + Previous (`FILE, desc2, fp2, ress2)), + Updates (File (_, ContentsSame), _)) + | (NoUpdates, + Updates (File (desc2, ContentsUpdated (fp2, _, ress2)), + Previous (`FILE, desc1, fp1, ress1))) + | (Updates (File (_, ContentsSame), _), + Updates (File (desc2, ContentsUpdated (fp2, _, ress2)), + Previous (`FILE, desc1, fp1, ress1))) + | (Updates (File (desc1, ContentsUpdated (fp1, _, ress1)), _), + Updates (File (desc2, ContentsUpdated (fp2, _, ress2)), _)) -> + (desc1, fp1, ress1, desc2, fp2, ress2) + | _ -> + raise (Util.Transient "Can't diff") + +let problematic ri = + match ri.replicas with + Problem _ -> true + | Different (_,_,d,_) -> (!d = Conflict) + +let isDeletion ri = + match ri.replicas with + Different(rc1, rc2, rDir, _) -> + (match (!rDir, rc1, rc2) with + (Replica1ToReplica2, (`ABSENT, _, _, _), _) -> true + | (Replica2ToReplica1, _, (`ABSENT, _, _, _)) -> true + | _ -> false) + | _ -> false + +let rcType (fi, _, _, _) = + Fileinfo.type2string fi + +let riFileType ri = + match ri.replicas with + Different(rc1, rc2, dir, _) -> + begin match !dir with + Replica2ToReplica1 -> rcType rc2 + | _ -> rcType rc1 + end + | _ -> "nonexistent" Deleted: branches/2.32/src/common.mli =================================================================== --- trunk/src/common.mli 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/common.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -1,127 +0,0 @@ -(* Unison file synchronizer: src/common.mli *) -(* Copyright 1999-2008 (see COPYING for details) *) - -(***************************************************************************) -(* COMMON TYPES USED BY ALL MODULES *) -(***************************************************************************) - -type hostname = string - -(* "Canonized" names of hosts *) -type host = - Local - | Remote of string - -(* Roots for replicas (this is the type that is used by most of the code) *) -type root = host * Fspath.t - -val root2string : root -> string - -(* Give a printable hostname from a root (local prints as "local") *) -val root2hostname : root -> hostname - -val compareRoots : root -> root -> int -val sortRoots : root list -> root list -(* Note, local roots come before remote roots *) - -(* There are a number of functions in several modules that accept or return - lists containing one element for each path-to-be-synchronized specified - by the user using the -path option. This type constructor is used - instead of list, to help document their behavior -- in particular, - allowing us to write 'blah list list' as 'blah list oneperpath' in a few - places. *) -type 'a oneperpath = ONEPERPATH of 'a list - - -(*****************************************************************************) -(* COMMON TYPES USED BY UPDATE MODULE AND RECONCILER *) -(*****************************************************************************) - -(* An updateItem describes the difference between the current state of the - filesystem below a given path and the state recorded in the archive below - that path. The other types are helpers. *) - -type prevState = - Previous of Fileinfo.typ * Props.t * Os.fullfingerprint * Osx.ressStamp - | New - -type contentschange = - ContentsSame - | ContentsUpdated of Os.fullfingerprint * Fileinfo.stamp * Osx.ressStamp -type permchange = PropsSame | PropsUpdated - -(* Variable name prefix: "ui" *) -type updateItem = - NoUpdates (* Path not changed *) - | Updates (* Path changed in this replica *) - of updateContent (* - new state *) - * prevState (* - summary of old state *) - | Error (* Error while detecting updates *) - of string (* - description of error *) - -(* Variable name prefix: "uc" *) -and updateContent = - Absent (* Path refers to nothing *) - | File (* Path refers to an ordinary file *) - of Props.t (* - summary of current state *) - * contentschange (* - hint to transport agent *) - | Dir (* Path refers to a directory *) - of Props.t (* - summary of current state *) - * (Name.t * updateItem) list (* - children - MUST KEEP SORTED for recon *) - * permchange (* - did permissions change? *) - * bool (* - is the directory now empty? *) - | Symlink (* Path refers to a symbolic link *) - of string (* - link text *) - - -(*****************************************************************************) -(* COMMON TYPES SHARED BY RECONCILER AND TRANSPORT AGENT *) -(*****************************************************************************) - -type status = - [ `Deleted - | `Modified - | `PropsChanged - | `Created - | `Unchanged ] - -(* Variable name prefix: "rc" *) -type replicaContent = Fileinfo.typ * status * Props.t * updateItem - -type direction = - Conflict - | Merge - | Replica1ToReplica2 - | Replica2ToReplica1 - -val direction2string : direction -> string - -(* Variable name prefix: "rplc" *) -type replicas = - Problem of string (* There was a problem during update detection *) - | Different (* Replicas differ *) - of replicaContent (* - content of first replica *) - * replicaContent (* - content of second replica *) - * direction ref (* - action to take (it's a ref so that the - user interface can change it) *) - * direction (* - default action to take *) - -(* Variable name prefix: "ri" *) -type reconItem = - {path : Path.t; - replicas : replicas} - -val ucLength : updateContent -> Uutil.Filesize.t -val uiLength : updateItem -> Uutil.Filesize.t -val riLength : reconItem -> Uutil.Filesize.t -val riFileType : reconItem -> string -val fileInfos : - updateItem -> updateItem -> - Props.t * Os.fullfingerprint * Osx.ressStamp * - Props.t * Os.fullfingerprint * Osx.ressStamp - -(* True if the ri's type is Problem or if it is Different and the direction - is Conflict *) -val problematic : reconItem -> bool -val isDeletion : reconItem -> bool Copied: branches/2.32/src/common.mli (from rev 320, trunk/src/common.mli) =================================================================== --- branches/2.32/src/common.mli (rev 0) +++ branches/2.32/src/common.mli 2009-05-02 02:31:27 UTC (rev 322) @@ -0,0 +1,127 @@ +(* Unison file synchronizer: src/common.mli *) +(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) + +(***************************************************************************) +(* COMMON TYPES USED BY ALL MODULES *) +(***************************************************************************) + +type hostname = string + +(* "Canonized" names of hosts *) +type host = + Local + | Remote of string + +(* Roots for replicas (this is the type that is used by most of the code) *) +type root = host * Fspath.t + +val root2string : root -> string + +(* Give a printable hostname from a root (local prints as "local") *) +val root2hostname : root -> hostname + +val compareRoots : root -> root -> int +val sortRoots : root list -> root list +(* Note, local roots come before remote roots *) + +(* There are a number of functions in several modules that accept or return + lists containing one element for each path-to-be-synchronized specified + by the user using the -path option. This type constructor is used + instead of list, to help document their behavior -- in particular, + allowing us to write 'blah list list' as 'blah list oneperpath' in a few + places. *) +type 'a oneperpath = ONEPERPATH of 'a list + + +(*****************************************************************************) +(* COMMON TYPES USED BY UPDATE MODULE AND RECONCILER *) +(*****************************************************************************) + +(* An updateItem describes the difference between the current state of the + filesystem below a given path and the state recorded in the archive below + that path. The other types are helpers. *) + +type prevState = + Previous of Fileinfo.typ * Props.t * Os.fullfingerprint * Osx.ressStamp + | New + +type contentschange = + ContentsSame + | ContentsUpdated of Os.fullfingerprint * Fileinfo.stamp * Osx.ressStamp +type permchange = PropsSame | PropsUpdated + +(* Variable name prefix: "ui" *) +type updateItem = + NoUpdates (* Path not changed *) + | Updates (* Path changed in this replica *) + of updateContent (* - new state *) + * prevState (* - summary of old state *) + | Error (* Error while detecting updates *) + of string (* - description of error *) + +(* Variable name prefix: "uc" *) +and updateContent = + Absent (* Path refers to nothing *) + | File (* Path refers to an ordinary file *) + of Props.t (* - summary of current state *) + * contentschange (* - hint to transport agent *) + | Dir (* Path refers to a directory *) + of Props.t (* - summary of current state *) + * (Name.t * updateItem) list (* - children + MUST KEEP SORTED for recon *) + * permchange (* - did permissions change? *) + * bool (* - is the directory now empty? *) + | Symlink (* Path refers to a symbolic link *) + of string (* - link text *) + + +(*****************************************************************************) +(* COMMON TYPES SHARED BY RECONCILER AND TRANSPORT AGENT *) +(*****************************************************************************) + +type status = + [ `Deleted + | `Modified + | `PropsChanged + | `Created + | `Unchanged ] + +(* Variable name prefix: "rc" *) +type replicaContent = Fileinfo.typ * status * Props.t * updateItem + +type direction = + Conflict + | Merge + | Replica1ToReplica2 + | Replica2ToReplica1 + +val direction2string : direction -> string + +(* Variable name prefix: "rplc" *) +type replicas = + Problem of string (* There was a problem during update detection *) + | Different (* Replicas differ *) + of replicaContent (* - content of first replica *) + * replicaContent (* - content of second replica *) + * direction ref (* - action to take (it's a ref so that the + user interface can change it) *) + * direction (* - default action to take *) + +(* Variable name prefix: "ri" *) +type reconItem = + {path : Path.t; + replicas : replicas} + +val ucLength : updateContent -> Uutil.Filesize.t +val uiLength : updateItem -> Uutil.Filesize.t +val riLength : reconItem -> Uutil.Filesize.t +val riFileType : reconItem -> string +val fileInfos : + updateItem -> updateItem -> + Props.t * Os.fullfingerprint * Osx.ressStamp * + Props.t * Os.fullfingerprint * Osx.ressStamp + +(* True if the ri's type is Problem or if it is Different and the direction + is Conflict *) +val problematic : reconItem -> bool +val isDeletion : reconItem -> bool Deleted: branches/2.32/src/copy.ml =================================================================== --- trunk/src/copy.ml 2009-04-29 14:36:48 UTC (rev 319) +++ branches/2.32/src/copy.ml 2009-05-02 02:31:27 UTC (rev 322) @@ -1,703 +0,0 @@ -(* Unison file synchronizer: src/copy.ml *) -(* Copyright 1999-2008 (see COPYING for details) *) - -let (>>=) = Lwt.bind - -let debug = Trace.debug "copy" - -(****) - -let openFileIn fspath path kind = - match kind with - `DATA -> open_in_gen [Open_rdonly; Open_binary] 0o444 - (Fspath.concatToString fspath path) - | `RESS _ -> Osx.openRessIn fspath path - -let openFileOut fspath path kind = - match kind with - `DATA -> - let fullpath = Fspath.concatToString fspath path in - let flags = [Unix.O_WRONLY;Unix.O_CREAT] in - let perm = 0o600 in - begin match Util.osType with - `Win32 -> - open_out_gen - [Open_wronly; Open_creat; Open_excl; Open_binary] perm fullpath - | `Unix -> - let fd = - try - Unix.openfile fullpath (Unix.O_EXCL :: flags) perm - with - Unix.Unix_error - ((Unix.EOPNOTSUPP | Unix.EUNKNOWNERR 524), _, _) -> - (* O_EXCL not supported under a Netware NFS-mounted filesystem. - Solaris and Linux report different errors. *) - Unix.openfile fullpath (Unix.O_TRUNC :: flags) perm - in - Unix.out_channel_of_descr fd - end - | `RESS len -> - Osx.openRessOut fspath path len - -let protect f g = - try - f () - with Sys_error _ | Unix.Unix_error _ | Util.Transient _ as e -> - begin try g () with Sys_error _ | Unix.Unix_error _ -> () end; - raise e - -let lwt_protect f g = - Lwt.catch f - (fun e -> - begin match e with - Sys_error _ | Unix.Unix_error _ | Util.Transient _ -> - begin try g () with Sys_error _ | Unix.Unix_error _ -> () end - | _ -> - () - end; - Lwt.fail e) - -(****) - -let localFile - fspathFrom pathFrom fspathTo pathTo realPathTo update desc ressLength ido = - let use_id f = match ido with Some id -> f id | None -> () in - Util.convertUnixErrorsToTransient - "copying locally" - (fun () -> - use_id (fun id -> Uutil.showProgress id Uutil.Filesize.zero "l"); - debug (fun () -> - Util.msg "Copy.localFile %s / %s to %s / %s\n" - (Fspath.toString fspathFrom) (Path.toString pathFrom) - (Fspath.toString fspathTo) (Path.toString pathTo)); - let inFd = openFileIn fspathFrom pathFrom `DATA in - protect (fun () -> - Os.delete fspathTo pathTo; - let outFd = openFileOut fspathTo pathTo `DATA in - protect (fun () -> - Uutil.readWrite inFd outFd - (fun l -> - use_id ( fun id -> - Abort.check id; - Uutil.showProgress id (Uutil.Filesize.ofInt l) "l")); - close_in inFd; - close_out outFd) - (fun () -> close_out_noerr outFd)) - (fun () -> close_in_noerr inFd); - if ressLength > Uutil.Filesize.zero then begin - let inFd = openFileIn fspathFrom pathFrom (`RESS ressLength) in - protect (fun () -> - let outFd = openFileOut fspathTo pathTo (`RESS ressLength) in - protect (fun () -> - Uutil.readWriteBounded inFd outFd ressLength - (fun l -> - use_id (fun id -> - Abort.check id; - Uutil.showProgress id (Uutil.Filesize.ofInt l) "l")); - close_in inFd; - close_out outFd) - (fun () -> close_out_noerr outFd)) - (fun () -> close_in_noerr inFd); - end; - match update with - `Update _ -> - Fileinfo.set fspathTo pathTo (`Copy realPathTo) desc - | `Copy -> - Fileinfo.set fspathTo pathTo (`Set Props.fileDefault) desc) - -(****) - -(* The file transfer functions here depend on an external module - 'transfer' that implements a generic transmission and the rsync - algorithm for optimizing the file transfer in the case where a - similar file already exists on the target. *) - -let rsyncActivated = - Prefs.createBool "rsync" true - "!activate the rsync transfer mode" - ("Unison uses the 'rsync algorithm' for 'diffs-only' transfer " - ^ "of updates to large files. Setting this flag to false makes Unison " - ^ "use whole-file transfers instead. Under normal circumstances, " - ^ "there is no reason to do this, but if you are having trouble with " - ^ "repeated 'rsync failure' errors, setting it to " - ^ "false should permit you to synchronize the offending files.") - -(* Lazy creation of the destination file *) -let destinationFd fspath path kind outfd = - match !outfd with - None -> - let fd = openFileOut fspath path kind in - outfd := Some fd; - fd - | Some fd -> - fd - -let decompressor = ref Remote.MsgIdMap.empty - -let startReceivingFile - fspath path realPath fileKind update srcFileSize id file_id = - (* We delay the opening of the file so that there are not too many - temporary files remaining after a crash *) - let outfd = ref None in - let showProgress count = - Abort.check id; - Uutil.showProgress id (Uutil.Filesize.ofInt count) "r" in - (* Install a simple generic decompressor *) - decompressor := - Remote.MsgIdMap.add file_id - (fun ti -> - let fd = destinationFd fspath path fileKind outfd in - Transfer.receive fd showProgress ti) - !decompressor; - if Prefs.read rsyncActivated then begin - match update with - `Update (destFileDataSize, destFileRessSize) - when let destFileSize = - match fileKind with - `DATA -> destFileDataSize - | `RESS _ -> destFileRessSize - in - Transfer.Rsync.aboveRsyncThreshold destFileSize - && Transfer.Rsync.aboveRsyncThreshold srcFileSize -> - Util.convertUnixErrorsToTransient - "preprocessing file" - (fun () -> - let infd = openFileIn fspath realPath fileKind in - (* Now that we've successfully opened the original version - of the file, install a more interesting decompressor *) - decompressor := - Remote.MsgIdMap.add file_id - (fun ti -> - let fd = destinationFd fspath path fileKind outfd in - Transfer.Rsync.rsyncDecompress infd fd showProgress ti) - !decompressor; - let bi = - protect (fun () -> Transfer.Rsync.rsyncPreprocess infd) - (fun () -> close_in_noerr infd) - in - let (firstBi, remBi) = - match bi with - [] -> assert false - | firstBi :: remBi -> (firstBi, remBi) - in - Lwt.return (outfd, ref (Some infd), Some firstBi, remBi)) - | _ -> - Lwt.return (outfd, ref None, None, []) - end else - Lwt.return (outfd, ref None, None, []) - -let processTransferInstruction conn (file_id, ti) = - Util.convertUnixErrorsToTransient - "processing a transfer instruction" - (fun () -> - ignore (Remote.MsgIdMap.find file_id !decompressor ti)); - Lwt.return () - -let marshalTransferInstruction = - (fun (file_id, (data, pos, len)) rem -> - ((Remote.encodeInt file_id, 0, 4) :: (data, pos, len) :: rem, len + 4)), - (fun buf pos -> - let len = String.length buf - pos - 4 in - (Remote.decodeInt (String.sub buf pos 4), (buf,