From patrice.espie at art-de-france-export.com Sun Jun 1 19:20:28 2008 From: patrice.espie at art-de-france-export.com (=?UTF-8?Q?Patrice_Espi=C3=A9?=) Date: Mon, 2 Jun 2008 07:20:28 +0800 Subject: [Unison-hackers] unison and inotify principle Message-ID: Hi All, I'm new to this mailling list, so I hope not to do too many mistakes ... I'm using unison from a few months now, and my configuration is a bit wide in a geographic point of view : I'm synchronizing (in the two ways) two computers (Linux) between France and China. In France, there is one laptop connected which is locally synchronised ; same situation in China. I get more than 40.000 files, and about 50 Go. I need to sync very often because of internal needs. I can tell you that a huge amount of time is necessary to do the job ... hopefully unison work well. I wonder if unison could be improved in this way : using inotify interface (wich exist on Windows too). In many cases, it could improve the sync process. Perhaps even in all cases where "almost real time" sync is required. I'm not sure that this kind of evolution is quite complex: - unison should run in a repeat mode - it could check for local modifications (using inotify or so) and buffer file names to be sync'ed - an important think : the remote unison should also run in a repeat mode to check it's own side - after a (parameterized) delay (say, one minute ?), the sync could occurs on the buffered names Yes, the more complex problem should be : unison must work on both sides (I don't know if it is the case for now in repeat mode). Do you think this is a possible evolution of unison ? I'm a (c++,java) programmer, and now my job has changer (I'm not in IT part from e few year) but, I can give some help if needed. Any suggestion ? Thanks -- Patrice Espie -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.seas.upenn.edu/pipermail/unison-hackers/attachments/20080601/a166b70d/attachment.htm From bcpierce at cis.upenn.edu Tue Jun 3 07:55:43 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Tue, 3 Jun 2008 07:55:43 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: Message-ID: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> Hi Patrice, This capability is something that I've wanted to add for a long time, and I agree with the basics of your design. But the devil is in the details. For example, exactly what should be the protocol between Unison and the external "filesystem watcher" facility? (I've only looked at the OSX one in any detail, but it is not completely straightforward to use; for example, it can occasionally get overwhelmed and miss updates, and Unison will need to recognize this case and react appropriately. Etc.) How should the user interface behave? If Unison becomes a completely "background process," how can it notify users of conflicts? And so on. There are certainly ways of addressing all these issues, but it adds up to a nontrivial design exercise. Best, - Benjamin On Jun 1, 2008, at 7:20 PM, Patrice Espi? wrote: > Hi All, > > I'm new to this mailling list, so I hope not to do too many > mistakes ... > > I'm using unison from a few months now, and my configuration is a > bit wide in a geographic point of view : I'm synchronizing (in the > two ways) two computers (Linux) between France and China. In > France, there is one laptop connected which is locally > synchronised ; same situation in China. > I get more than 40.000 files, and about 50 Go. > I need to sync very often because of internal needs. > > I can tell you that a huge amount of time is necessary to do the > job ... hopefully unison work well. > > I wonder if unison could be improved in this way : using inotify > interface (wich exist on Windows too). In many cases, it could > improve the sync process. Perhaps even in all cases where "almost > real time" sync is required. > I'm not sure that this kind of evolution is quite complex: > unison should run in a repeat mode > it could check for local modifications (using inotify or so) and > buffer file names to be sync'ed > an important think : the remote unison should also run in a repeat > mode to check it's own side > after a (parameterized) delay (say, one minute ?), the sync could > occurs on the buffered names > Yes, the more complex problem should be : unison must work on both > sides (I don't know if it is the case for now in repeat mode). > Do you think this is a possible evolution of unison ? I'm a (c+ > +,java) programmer, and now my job has changer (I'm not in IT part > from e few year) but, I can give some help if needed. > > Any suggestion ? > Thanks > -- > Patrice Espie > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From bcpierce at seas.upenn.edu Wed Jun 4 08:57:07 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Wed, 4 Jun 2008 08:57:07 -0400 Subject: [Unison-hackers] [unison-svn] r281 - in branches/2.27: . doc src Message-ID: <200806041257.m54Cv76F030160@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-04 08:56:56 -0400 (Wed, 04 Jun 2008) New Revision: 281 Modified: branches/2.27/Makefile branches/2.27/doc/unison-manual.tex branches/2.27/src/COPYING branches/2.27/src/RECENTNEWS branches/2.27/src/files.ml branches/2.27/src/mkProjectInfo.ml branches/2.27/src/strings.ml branches/2.27/src/update.ml Log: * 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. Modified: branches/2.27/Makefile =================================================================== --- branches/2.27/Makefile 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/Makefile 2008-06-04 12:56:56 UTC (rev 281) @@ -119,7 +119,7 @@ @echo Creating DOWNLOADDIR = $(DOWNLOADDIR) @echo -mkdir -p $(DOWNLOADDIR) - #touch $(DOWNLOADDIR)/THIS-IS-UNISON-$(VERSION) +# touch $(DOWNLOADDIR)/THIS-IS-UNISON-$(VERSION) exportsources: $(RM) -r $(TMP)/$(EXPORTNAME) Modified: branches/2.27/doc/unison-manual.tex =================================================================== --- branches/2.27/doc/unison-manual.tex 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/doc/unison-manual.tex 2008-06-04 12:56:56 UTC (rev 281) @@ -51,6 +51,7 @@ \LARGE% Version \unisonversion \\ % % \today % + \large Copyright 1998-2008, Benjamin C. Pierce \end{center}% \fi% % @@ -61,7 +62,7 @@ \TABLEOFCONTENTS \ifhevea\else\newpage\fi -\ifhevea\else\iftextversion\else \section*{Overview}\fi\fi +\SECTION{Overview}{overview}{ } \input{short} @@ -166,10 +167,22 @@ \TOPSUBSECTION{Copying}{copying} -Unison is free software. You are free to change and redistribute it -under the terms of the GNU General Public License. Please see the -file COPYING in the Unison distribution for more information. +This file is part of Unison. + Unison 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. + + Unison 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. + + The GNU Public License can be found at + \ONEURL{http://www.gnu.org/licenses}. A copy is also included in the + Unison source distribution in the file {\tt COPYING}. + \TOPSUBSECTION{Acknowledgements}{ack} Work on Unison has been supported by the National Science Foundation Modified: branches/2.27/src/COPYING =================================================================== --- branches/2.27/src/COPYING 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/src/COPYING 2008-06-04 12:56:56 UTC (rev 281) @@ -1,301 +1,642 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + TERMS AND CONDITIONS -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + 0. Definitions. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "This License" refers to version 3 of the GNU General Public License. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + A "covered work" means either the unmodified Program or a work based +on the Program. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + 1. Source Code. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + The Corresponding Source for a work in source code form is that +same work. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. + 14. Revised Versions of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + 16. Limitation of Liability. + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) - This program is free software; you can redistribute it and/or modify + 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 2 of the License, or + 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, @@ -304,37 +645,30 @@ 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program. If not, see . - Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. Modified: branches/2.27/src/RECENTNEWS =================================================================== --- branches/2.27/src/RECENTNEWS 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/src/RECENTNEWS 2008-06-04 12:56:56 UTC (rev 281) @@ -1,3 +1,19 @@ +CHANGES FROM VERSION 2.27.68 + +* 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.27.65 Tiny edit to docs Modified: branches/2.27/src/files.ml =================================================================== --- branches/2.27/src/files.ml 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/src/files.ml 2008-06-04 12:56:56 UTC (rev 281) @@ -261,9 +261,8 @@ "The file %s\nhas been modified during synchronization. \ Transfer aborted.%s" (Fspath.concatToString currfspath path) - (if - Util.osType = `Win32 && Update.useFastChecking () && - Props.same_time info.Fileinfo.desc archDesc + (if Update.useFastChecking () + && Props.same_time info.Fileinfo.desc archDesc then " If this happens repeatedly, try running once with the \ fastcheck option set to 'no'" Modified: branches/2.27/src/mkProjectInfo.ml =================================================================== --- branches/2.27/src/mkProjectInfo.ml 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/src/mkProjectInfo.ml 2008-06-04 12:56:56 UTC (rev 281) @@ -73,3 +73,4 @@ + Modified: branches/2.27/src/strings.ml =================================================================== --- branches/2.27/src/strings.ml 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/src/strings.ml 2008-06-04 12:56:56 UTC (rev 281) @@ -4,8 +4,13 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.27.57\n\ + Version 2.27.68\n\ \n\ + ")) +:: + ("", ("Overview", + "Overview\n\ + \n\ \032 Unison is a file-synchronization tool for Unix and Windows. It allows\n\ \032 two replicas of a collection of files and directories to be stored on\n\ \032 different hosts (or different disks on the same host), modified\n\ @@ -1421,12 +1426,12 @@ \032 should use the path preference to choose particular paths to\n\ \032 synchronize.\n\ \032 immutable xxx\n\ - \032 This preference specifies paths for directories whose children\n\ - \032 are all immutable files -- i.e., once a file has been created,\n\ - \032 its contents never changes. When scanning for updates, Unison\n\ - \032 does not check whether these files have been modified; this can\n\ - \032 speed update detection significantly (in particular, for mail\n\ - \032 directories).\n\ + \032 This preference specifies paths for directories whose immediate\n\ + \032 children are all immutable files -- i.e., once a file has been\n\ + \032 created, its contents never changes. When scanning for updates,\n\ + \032 Unison does not check whether these files have been modified;\n\ + \032 this can speed update detection significantly (in particular,\n\ + \032 for mail directories).\n\ \032 immutablenot xxx\n\ \032 This preference overrides immutable.\n\ \032 key xxx\n\ @@ -2019,7 +2024,8 @@ \n\ \032 A large number of external merging programs are available. For\n\ \032 example, on Unix systems setting the merge preference to\n\ - \032 merge = Name *.txt -> diff3 CURRENT1 CURRENTARCH CURRENT2 -m > NEW\n\ + \032 merge = Name *.txt -> diff3 -m CURRENT1 CURRENTARCH CURRENT2\n\ + \032 > NEW || echo \"differences detected\"\n\ \n\ \032 will tell Unison to use the external diff3 program for merging.\n\ \032 Alternatively, users of emacs may find the following settings\n\ @@ -2465,8 +2471,8 @@ \n\ ")) :: - ("news", ("Changes in Version 2.27.57", - "Changes in Version 2.27.57\n\ + ("news", ("Changes in Version 2.27.68", + "Changes in Version 2.27.68\n\ \n\ \032 Changes since 2.17:\n\ \032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\ Modified: branches/2.27/src/update.ml =================================================================== --- branches/2.27/src/update.ml 2008-05-30 11:45:42 UTC (rev 280) +++ branches/2.27/src/update.ml 2008-06-04 12:56:56 UTC (rev 281) @@ -973,7 +973,7 @@ let immutable = Pred.create "immutable" ("This preference specifies paths for directories whose \ - children are all immutable files --- i.e., once a file has been \ + immediate children are all immutable files --- i.e., once a file has been \ created, its contents never changes. When scanning for updates, \ Unison does not check whether these files have been modified; \ this can speed update detection significantly (in particular, for mail \ @@ -1868,7 +1868,12 @@ (* ...and check that this is a good description of what's out in the world *) let (_, uiNew) = buildUpdateRec archive fspath localPath false in if uiNew <> NoUpdates then - raise (Util.Transient "Destination updated during synchronization") + raise (Util.Transient ( + "Destination updated during synchronization\n" + ^ (if useFastChecking() then + " (if this happens repeatedly on a file that has not been changed, \n" + ^ " try running once with 'fastcheck' set to false)" + else ""))) let checkNoUpdatesOnRoot = Remote.registerRootCmd From bcpierce at seas.upenn.edu Wed Jun 4 09:12:54 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Wed, 4 Jun 2008 09:12:54 -0400 Subject: [Unison-hackers] [unison-svn] r282 - in branches/2.27: . src Message-ID: <200806041312.m54DCsdM030689@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-04 09:12:48 -0400 (Wed, 04 Jun 2008) New Revision: 282 Modified: branches/2.27/Makefile branches/2.27/src/RECENTNEWS branches/2.27/src/mkProjectInfo.ml branches/2.27/src/strings.ml Log: * Added 'make docs' to top-level Makefile Modified: branches/2.27/Makefile =================================================================== --- branches/2.27/Makefile 2008-06-04 12:56:56 UTC (rev 281) +++ branches/2.27/Makefile 2008-06-04 13:12:48 UTC (rev 282) @@ -18,6 +18,10 @@ src/mkProjectInfo: src/mkProjectInfo.ml ocamlc -o $@ $^ +docs: + $(MAKE) -C src UISTYLE=text + $(MAKE) -C doc + include src/Makefile.OCaml ###################################################################### Modified: branches/2.27/src/RECENTNEWS =================================================================== --- branches/2.27/src/RECENTNEWS 2008-06-04 12:56:56 UTC (rev 281) +++ branches/2.27/src/RECENTNEWS 2008-06-04 13:12:48 UTC (rev 282) @@ -1,3 +1,8 @@ +CHANGES FROM VERSION 2.27.74 + +* Added 'make docs' to top-level Makefile + +------------------------------- CHANGES FROM VERSION 2.27.68 * Unison can sometimes fail to transfer a file, giving the unhelpful Modified: branches/2.27/src/mkProjectInfo.ml =================================================================== --- branches/2.27/src/mkProjectInfo.ml 2008-06-04 12:56:56 UTC (rev 281) +++ branches/2.27/src/mkProjectInfo.ml 2008-06-04 13:12:48 UTC (rev 282) @@ -74,3 +74,4 @@ + Modified: branches/2.27/src/strings.ml =================================================================== --- branches/2.27/src/strings.ml 2008-06-04 12:56:56 UTC (rev 281) +++ branches/2.27/src/strings.ml 2008-06-04 13:12:48 UTC (rev 282) @@ -4,7 +4,7 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.27.68\n\ + Version 2.27.74\n\ \n\ ")) :: @@ -139,10 +139,22 @@ ("copying", ("Copying", "Copying\n\ \n\ - \032 Unison is free software. You are free to change and redistribute it\n\ - \032 under the terms of the GNU General Public License. Please see the file\n\ - \032 COPYING in the Unison distribution for more information.\n\ + \032 This file is part of Unison.\n\ \n\ + \032 Unison is free software: you can redistribute it and/or modify it\n\ + \032 under the terms of the GNU General Public License as published by the\n\ + \032 Free Software Foundation, either version 3 of the License, or (at your\n\ + \032 option) any later version.\n\ + \n\ + \032 Unison is distributed in the hope that it will be useful, but WITHOUT\n\ + \032 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\ + \032 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n\ + \032 for more details.\n\ + \n\ + \032 The GNU Public License can be found at http://www.gnu.org/licenses. A\n\ + \032 copy is also included in the Unison source distribution in the file\n\ + \032 COPYING.\n\ + \n\ ")) :: ("ack", ("Acknowledgements", @@ -2471,8 +2483,8 @@ \n\ ")) :: - ("news", ("Changes in Version 2.27.68", - "Changes in Version 2.27.68\n\ + ("news", ("Changes in Version 2.27.74", + "Changes in Version 2.27.74\n\ \n\ \032 Changes since 2.17:\n\ \032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\ From bcpierce at cis.upenn.edu Wed Jun 4 09:38:11 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Wed, 4 Jun 2008 09:38:11 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> Message-ID: <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> P.S. In case you want to help move this bit of design forward, I wanted to mention that version 2.28 of Unison actually includes a very simple version of this functionality. Here is the commit log entry... - Benjamin * 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. On Jun 3, 2008, at 7:55 AM, Benjamin Pierce wrote: > Hi Patrice, > > This capability is something that I've wanted to add for a long time, > and I agree with the basics of your design. But the devil is in the > details. For example, exactly what should be the protocol between > Unison and the external "filesystem watcher" facility? (I've only > looked at the OSX one in any detail, but it is not completely > straightforward to use; for example, it can occasionally get > overwhelmed and miss updates, and Unison will need to recognize this > case and react appropriately. Etc.) How should the user interface > behave? If Unison becomes a completely "background process," how can > it notify users of conflicts? And so on. There are certainly ways > of addressing all these issues, but it adds up to a nontrivial design > exercise. > > Best, > > - Benjamin > > > On Jun 1, 2008, at 7:20 PM, Patrice Espi? wrote: >> Hi All, >> >> I'm new to this mailling list, so I hope not to do too many >> mistakes ... >> >> I'm using unison from a few months now, and my configuration is a >> bit wide in a geographic point of view : I'm synchronizing (in the >> two ways) two computers (Linux) between France and China. In >> France, there is one laptop connected which is locally >> synchronised ; same situation in China. >> I get more than 40.000 files, and about 50 Go. >> I need to sync very often because of internal needs. >> >> I can tell you that a huge amount of time is necessary to do the >> job ... hopefully unison work well. >> >> I wonder if unison could be improved in this way : using inotify >> interface (wich exist on Windows too). In many cases, it could >> improve the sync process. Perhaps even in all cases where "almost >> real time" sync is required. >> I'm not sure that this kind of evolution is quite complex: >> unison should run in a repeat mode >> it could check for local modifications (using inotify or so) and >> buffer file names to be sync'ed >> an important think : the remote unison should also run in a repeat >> mode to check it's own side >> after a (parameterized) delay (say, one minute ?), the sync could >> occurs on the buffered names >> Yes, the more complex problem should be : unison must work on both >> sides (I don't know if it is the case for now in repeat mode). >> Do you think this is a possible evolution of unison ? I'm a (c+ >> +,java) programmer, and now my job has changer (I'm not in IT part >> from e few year) but, I can give some help if needed. >> >> Any suggestion ? >> Thanks >> -- >> Patrice Espie >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at lists.seas.upenn.edu >> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > From bcpierce at seas.upenn.edu Wed Jun 4 10:11:35 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Wed, 4 Jun 2008 10:11:35 -0400 Subject: [Unison-hackers] [unison-svn] r283 - branches/2.27/src Message-ID: <200806041411.m54EBZVH032616@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-04 10:11:31 -0400 (Wed, 04 Jun 2008) New Revision: 283 Modified: branches/2.27/src/RECENTNEWS branches/2.27/src/case.ml branches/2.27/src/mkProjectInfo.ml Log: * Tiny typo fix to docs Modified: branches/2.27/src/RECENTNEWS =================================================================== --- branches/2.27/src/RECENTNEWS 2008-06-04 13:12:48 UTC (rev 282) +++ branches/2.27/src/RECENTNEWS 2008-06-04 14:11:31 UTC (rev 283) @@ -1,3 +1,7 @@ +CHANGES FROM VERSION 2.27.75 + +* Tiny typo fix to docs +------------------------------- CHANGES FROM VERSION 2.27.74 * Added 'make docs' to top-level Makefile Modified: branches/2.27/src/case.ml =================================================================== --- branches/2.27/src/case.ml 2008-06-04 13:12:48 UTC (rev 282) +++ branches/2.27/src/case.ml 2008-06-04 14:11:31 UTC (rev 283) @@ -13,7 +13,7 @@ ^ "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}, " + ^ "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 " Modified: branches/2.27/src/mkProjectInfo.ml =================================================================== --- branches/2.27/src/mkProjectInfo.ml 2008-06-04 13:12:48 UTC (rev 282) +++ branches/2.27/src/mkProjectInfo.ml 2008-06-04 14:11:31 UTC (rev 283) @@ -75,3 +75,4 @@ + From bcpierce at seas.upenn.edu Wed Jun 4 10:31:04 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Wed, 4 Jun 2008 10:31:04 -0400 Subject: [Unison-hackers] [unison-svn] r284 - in trunk: . doc src src/uimacnew Message-ID: <200806041431.m54EV4gS000817@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-04 10:30:56 -0400 (Wed, 04 Jun 2008) New Revision: 284 Modified: trunk/Makefile trunk/doc/unison-manual.tex trunk/src/COPYING trunk/src/RECENTNEWS trunk/src/case.ml trunk/src/mkProjectInfo.ml trunk/src/uimacnew/Bridge.m trunk/src/uimacnew/ProgressCell.m Log: * Propagating changes from 2.27 branch Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/Makefile 2008-06-04 14:30:56 UTC (rev 284) @@ -18,6 +18,10 @@ src/mkProjectInfo: src/mkProjectInfo.ml ocamlc -o $@ $^ +docs: + $(MAKE) -C src UISTYLE=text + $(MAKE) -C doc + include src/Makefile.OCaml ###################################################################### @@ -44,6 +48,8 @@ DUPCMD = svn merge -r prev:committed ../branches/2.27 +# This doesn't seem to work, actually: svn doesn't detect all of the files with changes that +# need merging. :-( dup: @echo "Make sure changes have been committed in the 2.27 branch!" $(DUPCMD) --dry-run Modified: trunk/doc/unison-manual.tex =================================================================== --- trunk/doc/unison-manual.tex 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/doc/unison-manual.tex 2008-06-04 14:30:56 UTC (rev 284) @@ -51,6 +51,7 @@ \LARGE% Version \unisonversion \\ % % \today % + \large Copyright 1998-2008, Benjamin C. Pierce \end{center}% \fi% % @@ -61,7 +62,7 @@ \TABLEOFCONTENTS \ifhevea\else\newpage\fi -\ifhevea\else\iftextversion\else \section*{Overview}\fi\fi +\SECTION{Overview}{overview}{ } \input{short} @@ -166,10 +167,22 @@ \TOPSUBSECTION{Copying}{copying} -Unison is free software. You are free to change and redistribute it -under the terms of the GNU General Public License. Please see the -file COPYING in the Unison distribution for more information. +This file is part of Unison. + Unison 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. + + Unison 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. + + The GNU Public License can be found at + \ONEURL{http://www.gnu.org/licenses}. A copy is also included in the + Unison source distribution in the file {\tt COPYING}. + \TOPSUBSECTION{Acknowledgements}{ack} Work on Unison has been supported by the National Science Foundation Modified: trunk/src/COPYING =================================================================== --- trunk/src/COPYING 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/src/COPYING 2008-06-04 14:30:56 UTC (rev 284) @@ -1,301 +1,642 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + TERMS AND CONDITIONS -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + 0. Definitions. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "This License" refers to version 3 of the GNU General Public License. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + A "covered work" means either the unmodified Program or a work based +on the Program. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + 1. Source Code. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + The Corresponding Source for a work in source code form is that +same work. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. + 14. Revised Versions of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + 16. Limitation of Liability. + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) - This program is free software; you can redistribute it and/or modify + 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 2 of the License, or + 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, @@ -304,37 +645,30 @@ 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program. If not, see . - Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/src/RECENTNEWS 2008-06-04 14:30:56 UTC (rev 284) @@ -1,3 +1,15 @@ +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 @@ -10,6 +22,10 @@ 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 Modified: trunk/src/case.ml =================================================================== --- trunk/src/case.ml 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/src/case.ml 2008-06-04 14:30:56 UTC (rev 284) @@ -13,7 +13,7 @@ ^ "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}, " + ^ "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 " Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/src/mkProjectInfo.ml 2008-06-04 14:30:56 UTC (rev 284) @@ -68,3 +68,5 @@ + + Modified: trunk/src/uimacnew/Bridge.m =================================================================== --- trunk/src/uimacnew/Bridge.m 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/src/uimacnew/Bridge.m 2008-06-04 14:30:56 UTC (rev 284) @@ -3,7 +3,7 @@ // uimac // // Created by Craig Federighi on 4/25/07. -// Copyright 2007 __MyCompanyName__. All rights reserved. +// Copyright 1999-2008 (see COPYING for details) // #import "Bridge.h" Modified: trunk/src/uimacnew/ProgressCell.m =================================================================== --- trunk/src/uimacnew/ProgressCell.m 2008-06-04 14:11:31 UTC (rev 283) +++ trunk/src/uimacnew/ProgressCell.m 2008-06-04 14:30:56 UTC (rev 284) @@ -1,27 +1,8 @@ /****************************************************************************** - * Note -- loosely based on TorrentCell from Transmission (mostly just the .png - * files. Their original copyright is included below... + * Copyright 2007 (see file COPYING for more information) * - * - * Copyright (c) 2006-2007 Transmission authors and contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * Loosely based on TorrentCell from Transmission (.png files are from + * the original). *****************************************************************************/ #import "ProgressCell.h" From sylvain at le-gall.net Wed Jun 4 11:39:03 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Wed, 4 Jun 2008 15:39:03 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> Message-ID: Hello, On 04-06-2008, Benjamin Pierce wrote: > P.S. In case you want to help move this bit of design forward, I > wanted to mention that version 2.28 of Unison actually includes a > very simple version of this functionality. Here is the commit log > entry... > > > * 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. > I am a very humble user who just want to comment on this design (take all of this conditionaly -- if you feel this is just silly, forget about it). I don't like the idea of the "file which should be a newline-separated list of paths (relative to the root of the synchronization)". My idea is the following: - use "-repeat FOO" but FOO is a program - FOO read file scanned by unison on stdin - if FOO detects a change in a file scanned by UNISON, it writes it on stdout In this design, unison has just to send absolute filename name to FOO and wait for FOO to write any notification. Moreover, you will just have to use "Unix.open_process" which is one of the fully portable function (at least Linux/Windows) of the Unix module. Regards Sylvain Le Gall ps: the solution is less simple than the other but external notification program is easier to write and notification is more efficient. From bcpierce at cis.upenn.edu Wed Jun 4 13:40:31 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Wed, 4 Jun 2008 13:40:31 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> Message-ID: <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> Hi Sylvain, >> I am a very humble user who just want to comment on this design (take > all of this conditionaly -- if you feel this is just silly, forget > about > it). > > I don't like the idea of the "file which should be a newline-separated > list of paths (relative to the root of the synchronization)". > > My idea is the following: > - use "-repeat FOO" but FOO is a program > - FOO read file scanned by unison on stdin > - if FOO detects a change in a file scanned by UNISON, it writes it on > stdout > > In this design, unison has just to send absolute filename name to FOO > and wait for FOO to write any notification. I'm all in favor of simplicity, but I'm concerned about a couple of points in this design. 1) How is Unison going to hear about added files? 2) Is Unison really going to tell FOO about *every* file it scans? There may be very many of these (I haven't counted, but I'll bet there are more than 100k files in my filesystem). - Benjamin > > > Moreover, you will just have to use "Unix.open_process" which is one > of > the fully portable function (at least Linux/Windows) of the Unix > module. > > Regards > Sylvain Le Gall > > ps: the solution is less simple than the other but external > notification > program is easier to write and notification is more efficient. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From sylvain at le-gall.net Wed Jun 4 17:25:17 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Wed, 4 Jun 2008 21:25:17 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> Message-ID: On 04-06-2008, Benjamin Pierce wrote: > Hi Sylvain, > >>> I am a very humble user who just want to comment on this design (take >> all of this conditionaly -- if you feel this is just silly, forget >> about >> it). >> >> I don't like the idea of the "file which should be a newline-separated >> list of paths (relative to the root of the synchronization)". >> >> My idea is the following: >> - use "-repeat FOO" but FOO is a program >> - FOO read file scanned by unison on stdin >> - if FOO detects a change in a file scanned by UNISON, it writes it on >> stdout >> >> In this design, unison has just to send absolute filename name to FOO >> and wait for FOO to write any notification. > > I'm all in favor of simplicity, but I'm concerned about a couple of > points in this design. > I take the example of inotify, which i know a little bit. > 1) How is Unison going to hear about added files? > If you ask to monitor a directory, you will get notified of file added in this directory (or directory added...). 1) Let say unison scan directory /A/B. 2) unison send "/A/B" to FOO 3) FOO ask inotify to watch directory "/A/B" 4) user "touch /A/B/c" 5) inotify notify FOO that a file "/A/B/c" has been created 6) FOO send "/A/B/c" to unison (but doesn't ask for its watching) 7) unison take into consideration the new file and apply rules to see if it fits every rules (ignore...) 8) if unison is ok to take into account "/A/B/c" it sends "/A/B/c" to FOO (stating that FOO should watch also this file). This way FOO has only little knowledge of what unison rules are. It just need to check for files that unison is asking him... > 2) Is Unison really going to tell FOO about *every* file it scans? > There may be very many of these (I haven't counted, but I'll bet there > are more than 100k files in my filesystem). Inotify can handle 100k files. Transfering 100k x average size of a filename through a pipe (stdin/stdout for a Unix.open_process) is the fastest communication channel on most system. But you have other options, unison can only tell foo to take into consideration directories (i.e. only send directory filename). inotify can also watch for changes of file in watched directory. Last but not least, FOO command line options should be simple and standard: - "-enc ENC": define filename encoding for data that will be send/receive - "-only-dir": watch for changes only on directory The real advantage of my proposal is that FOO has very little to know about unison. FOO is only made to watch file... You also have the speed argument/power efficiency: unison is waked up only when there is a real change (i.e. FOO send a filename). There is no regular scan of the file. Scanning a file every now and then is a big problem (think of laptop user that don't like their hard drive to be spin up every 10 seconds). Regards, Sylvain Le Gall ps: i am not an expert at all, if you feel this proposal is not good, just tell me, i will stop arguing. From patrice.espie at art-de-france-export.com Wed Jun 4 20:42:06 2008 From: patrice.espie at art-de-france-export.com (=?UTF-8?Q?Patrice_Espi=C3=A9?=) Date: Thu, 5 Jun 2008 08:42:06 +0800 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> Message-ID: Hi All, First of all, I have to tell that I don't understand the language used to develop unison (OCaml ?). So I will not be able to help is this way. But for an external tool, why not ... Concerning Sylvain's design, I fully agree. Using a pipe to send external notifications to unison should be very efficient (under Linux and Windows, at least). Thank's 2008/6/5 Sylvain Le Gall : > On 04-06-2008, Benjamin Pierce wrote: > > Hi Sylvain, > > > >>> I am a very humble user who just want to comment on this design (take > >> all of this conditionaly -- if you feel this is just silly, forget > >> about > >> it). > >> > >> I don't like the idea of the "file which should be a newline-separated > >> list of paths (relative to the root of the synchronization)". > >> > >> My idea is the following: > >> - use "-repeat FOO" but FOO is a program > >> - FOO read file scanned by unison on stdin > >> - if FOO detects a change in a file scanned by UNISON, it writes it on > >> stdout > >> > >> In this design, unison has just to send absolute filename name to FOO > >> and wait for FOO to write any notification. > > > > I'm all in favor of simplicity, but I'm concerned about a couple of > > points in this design. > > > > I take the example of inotify, which i know a little bit. > > > 1) How is Unison going to hear about added files? > > > > If you ask to monitor a directory, you will get notified of file added > in this directory (or directory added...). > > 1) Let say unison scan directory /A/B. > 2) unison send "/A/B" to FOO > 3) FOO ask inotify to watch directory "/A/B" > 4) user "touch /A/B/c" > 5) inotify notify FOO that a file "/A/B/c" has been created > 6) FOO send "/A/B/c" to unison (but doesn't ask for its watching) > 7) unison take into consideration the new file and apply rules to see if > it fits every rules (ignore...) > 8) if unison is ok to take into account "/A/B/c" it sends "/A/B/c" to > FOO (stating that FOO should watch also this file). > > This way FOO has only little knowledge of what unison rules are. It just > need to check for files that unison is asking him... > > > 2) Is Unison really going to tell FOO about *every* file it scans? > > There may be very many of these (I haven't counted, but I'll bet there > > are more than 100k files in my filesystem). > > Inotify can handle 100k files. > Transfering 100k x average size of a filename through a pipe > (stdin/stdout for a Unix.open_process) is the fastest communication > channel on most system. > > But you have other options, unison can only tell foo to take into > consideration directories (i.e. only send directory filename). inotify > can also watch for changes of file in watched directory. > > Last but not least, FOO command line options should be simple and > standard: > - "-enc ENC": define filename encoding for data that will be > send/receive > - "-only-dir": watch for changes only on directory > > The real advantage of my proposal is that FOO has very little to know > about unison. FOO is only made to watch file... > > You also have the speed argument/power efficiency: unison is waked up > only when there is a real change (i.e. FOO send a filename). There is no > regular scan of the file. Scanning a file every now and then is a big > problem (think of laptop user that don't like their hard drive to be > spin up every 10 seconds). > > Regards, > Sylvain Le Gall > > ps: i am not an expert at all, if you feel this proposal is not good, > just tell me, i will stop arguing. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > -- Patrice Espie Art de France Export ?? Head office France : 3, rue G. Rossini, 26000 Valence Tel: +33 4 75 02 27 70 - Mobile: +33 6 33 04 34 23 www.art-de-france-export.com Shanghai Office : Victoire - ??? The Bund Side - Room 3102 - Building N?7 288 Baidu road - Shanghai 200010, China Tel: +86 21 6332 0787 - Mobile: +86 139 1740 2646 www.victoire.cn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.seas.upenn.edu/pipermail/unison-hackers/attachments/20080604/2256736c/attachment-0001.htm From bcpierce at cis.upenn.edu Wed Jun 4 22:20:02 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Wed, 4 Jun 2008 22:20:02 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> Message-ID: <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> > First of all, I have to tell that I don't understand the language > used to develop unison (OCaml ?). So I will not be able to help is > this way. But for an external tool, why not ... > > Concerning Sylvain's design, I fully agree. Using a pipe to send > external notifications to unison should be very efficient (under > Linux and Windows, at least). What happens if the pipe fills up? - Benjamin > > > Thank's > > 2008/6/5 Sylvain Le Gall : > On 04-06-2008, Benjamin Pierce wrote: > > Hi Sylvain, > > > >>> I am a very humble user who just want to comment on this design > (take > >> all of this conditionaly -- if you feel this is just silly, forget > >> about > >> it). > >> > >> I don't like the idea of the "file which should be a newline- > separated > >> list of paths (relative to the root of the synchronization)". > >> > >> My idea is the following: > >> - use "-repeat FOO" but FOO is a program > >> - FOO read file scanned by unison on stdin > >> - if FOO detects a change in a file scanned by UNISON, it writes > it on > >> stdout > >> > >> In this design, unison has just to send absolute filename name > to FOO > >> and wait for FOO to write any notification. > > > > I'm all in favor of simplicity, but I'm concerned about a couple of > > points in this design. > > > > I take the example of inotify, which i know a little bit. > > > 1) How is Unison going to hear about added files? > > > > If you ask to monitor a directory, you will get notified of file added > in this directory (or directory added...). > > 1) Let say unison scan directory /A/B. > 2) unison send "/A/B" to FOO > 3) FOO ask inotify to watch directory "/A/B" > 4) user "touch /A/B/c" > 5) inotify notify FOO that a file "/A/B/c" has been created > 6) FOO send "/A/B/c" to unison (but doesn't ask for its watching) > 7) unison take into consideration the new file and apply rules to > see if > it fits every rules (ignore...) > 8) if unison is ok to take into account "/A/B/c" it sends "/A/B/c" to > FOO (stating that FOO should watch also this file). > > This way FOO has only little knowledge of what unison rules are. It > just > need to check for files that unison is asking him... > > > 2) Is Unison really going to tell FOO about *every* file it scans? > > There may be very many of these (I haven't counted, but I'll bet > there > > are more than 100k files in my filesystem). > > Inotify can handle 100k files. > Transfering 100k x average size of a filename through a pipe > (stdin/stdout for a Unix.open_process) is the fastest communication > channel on most system. > > But you have other options, unison can only tell foo to take into > consideration directories (i.e. only send directory filename). inotify > can also watch for changes of file in watched directory. > > Last but not least, FOO command line options should be simple and > standard: > - "-enc ENC": define filename encoding for data that will be > send/receive > - "-only-dir": watch for changes only on directory > > The real advantage of my proposal is that FOO has very little to know > about unison. FOO is only made to watch file... > > You also have the speed argument/power efficiency: unison is waked up > only when there is a real change (i.e. FOO send a filename). There > is no > regular scan of the file. Scanning a file every now and then is a big > problem (think of laptop user that don't like their hard drive to be > spin up every 10 seconds). > > Regards, > Sylvain Le Gall > > ps: i am not an expert at all, if you feel this proposal is not good, > just tell me, i will stop arguing. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > > > -- > Patrice Espie > Art de France Export > ?? > > Head office France : > 3, rue G. Rossini, 26000 Valence > Tel: +33 4 75 02 27 70 - Mobile: +33 6 33 04 34 23 > www.art-de-france-export.com > > Shanghai Office : > Victoire - ??? > The Bund Side - Room 3102 - Building N?7 > 288 Baidu road - Shanghai 200010, China > Tel: +86 21 6332 0787 - Mobile: +86 139 1740 2646 > www.victoire.cn > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From sylvain at le-gall.net Thu Jun 5 04:11:20 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Thu, 5 Jun 2008 08:11:20 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> Message-ID: On 05-06-2008, Benjamin Pierce wrote: >> First of all, I have to tell that I don't understand the language >> used to develop unison (OCaml ?). So I will not be able to help is >> this way. But for an external tool, why not ... >> >> Concerning Sylvain's design, I fully agree. Using a pipe to send >> external notifications to unison should be very efficient (under >> Linux and Windows, at least). > > What happens if the pipe fills up? > Read/Write on pipe are blocking. If the pipe contains too much data, it just freeze the process trying to write on it, until the other end read it... (well you maybe have a buffer, but if the buffer is full, the process will freeze). Regards, Sylvain Le Gall From sylvain at le-gall.net Thu Jun 5 04:16:08 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Thu, 5 Jun 2008 08:16:08 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> Message-ID: On 05-06-2008, Sylvain Le Gall wrote: > On 05-06-2008, Benjamin Pierce wrote: >>> First of all, I have to tell that I don't understand the language >>> used to develop unison (OCaml ?). So I will not be able to help is >>> this way. But for an external tool, why not ... >>> >>> Concerning Sylvain's design, I fully agree. Using a pipe to send >>> external notifications to unison should be very efficient (under >>> Linux and Windows, at least). >> >> What happens if the pipe fills up? >> > > Read/Write on pipe are blocking. If the pipe contains too much data, it > just freeze the process trying to write on it, until the other end read > it... > > (well you maybe have a buffer, but if the buffer is full, the process > will freeze). > Forget to say: you can use "Unix.select" or similar polling function to check if there are data to be readi/write (not very portable though, but better than nothing). Unix.select will work on Mac and Linux. It will work on Windows with OCaml 3.11 Regards, Sylvain Le Gall From bcpierce at cis.upenn.edu Thu Jun 5 08:34:57 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Thu, 5 Jun 2008 08:34:57 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> Message-ID: <5FD07435-20AC-4866-89FE-D03B9E289762@cis.upenn.edu> >>> First of all, I have to tell that I don't understand the language >>> used to develop unison (OCaml ?). So I will not be able to help is >>> this way. But for an external tool, why not ... >>> >>> Concerning Sylvain's design, I fully agree. Using a pipe to send >>> external notifications to unison should be very efficient (under >>> Linux and Windows, at least). >> >> What happens if the pipe fills up? >> > > Read/Write on pipe are blocking. If the pipe contains too much > data, it > just freeze the process trying to write on it, until the other end > read > it... Right. And doesn't this mean that, if Unison is not listening (because it's working on a long transfer, e.g.), the notification process is in danger of blocking and then losing some updates? At least, I think this can happen on OSX. - Benjamin From bcpierce at cis.upenn.edu Thu Jun 5 08:41:26 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Thu, 5 Jun 2008 08:41:26 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> Message-ID: <02B23AFA-E7C0-45AF-AAB6-CDAD2600A2B0@cis.upenn.edu> > Forget to say: you can use "Unix.select" or similar polling > function to > check if there are data to be readi/write (not very portable > though, but > better than nothing). > > Unix.select will work on Mac and Linux. It will work on Windows with > OCaml 3.11 That's useful information and it may make indeed make the Unison side easier to implement in terms of pipes. (Actually, your design and mine are not so very far apart, I think -- using files vs. pipes [with enough buffering] should amount to much the same thing in the end.) - Benjamin From sylvain at le-gall.net Thu Jun 5 09:04:04 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Thu, 5 Jun 2008 13:04:04 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> <02B23AFA-E7C0-45AF-AAB6-CDAD2600A2B0@cis.upenn.edu> Message-ID: On 05-06-2008, Benjamin Pierce wrote: >> Forget to say: you can use "Unix.select" or similar polling >> function to >> check if there are data to be readi/write (not very portable >> though, but >> better than nothing). >> >> Unix.select will work on Mac and Linux. It will work on Windows with >> OCaml 3.11 > > That's useful information and it may make indeed make the Unison side > easier to implement in terms of pipes. (Actually, your design and > mine are not so very far apart, I think -- using files vs. pipes > [with enough buffering] should amount to much the same thing in the > end.) > Indeed, i think we could add to the former required command line option of FOO: - "-in fl": read dir/file to watch from file fl, if fl = "-", read from stdin - "-out fl": write name of file changed on file fl, if fl = "-", write to stdout + others options defined in a former post (-enc...) This way we can have almost both of what you think and what i propose with a little change... Regards, Sylvain Le Gall From bcpierce at cis.upenn.edu Fri Jun 6 06:43:25 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Fri, 6 Jun 2008 06:43:25 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <7131CB47-7033-40F3-B413-64778B4E625B@cis.upenn.edu> <822CE048-7AB1-403D-9326-C8B7A13DEE0F@cis.upenn.edu> <02B23AFA-E7C0-45AF-AAB6-CDAD2600A2B0@cis.upenn.edu> Message-ID: Well, in any case the main implementation work is on the side of the external notifier. What's already there on Unison's side is enough to work with. If someone gets far enough along with the external tool to need a more sophisticated interface to Unison, I'll be happy to work with them on getting it implemented (especially if it's on OSX, where it's easy for me to develop and test). - Benjamin On Jun 5, 2008, at 9:04 AM, Sylvain Le Gall wrote: > On 05-06-2008, Benjamin Pierce wrote: >>> Forget to say: you can use "Unix.select" or similar polling >>> function to >>> check if there are data to be readi/write (not very portable >>> though, but >>> better than nothing). >>> >>> Unix.select will work on Mac and Linux. It will work on Windows with >>> OCaml 3.11 >> >> That's useful information and it may make indeed make the Unison side >> easier to implement in terms of pipes. (Actually, your design and >> mine are not so very far apart, I think -- using files vs. pipes >> [with enough buffering] should amount to much the same thing in the >> end.) >> > > Indeed, i think we could add to the former required command line > option of FOO: > - "-in fl": read dir/file to watch from file fl, if fl = "-", read > from > stdin > - "-out fl": write name of file changed on file fl, if fl = "-", write > to stdout > + others options defined in a former post (-enc...) > > This way we can have almost both of what you think and what i propose > with a little change... > > Regards, > Sylvain Le Gall > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From glessard at tffenterprises.com Sat Jun 7 13:31:15 2008 From: glessard at tffenterprises.com (Guillaume Lessard) Date: Sat, 7 Jun 2008 11:31:15 -0600 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> Message-ID: On 08-06-04, at 07:38, Benjamin Pierce wrote: > 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. Is there any reason to not use the simpler and less data-intensive FSEvents API? It tells you about the particular directory in a tree where a file has changed; since unison is already adept at comparing directories, it should be quick unless the change happens to be in a directory with a large number of files... -- Guillaume Lessard glessard at tffenterprises.com From bcpierce at cis.upenn.edu Sat Jun 7 13:41:44 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Sat, 7 Jun 2008 13:41:44 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> Message-ID: <936AB206-2B4F-4B29-AF85-A3B6E376C435@cis.upenn.edu> No, FSEvents is probably better. (I think I wrote that description of Unison's prototype functionality a while ago, before FSEvents was available.) - B On Jun 7, 2008, at 1:31 PM, Guillaume Lessard wrote: > > On 08-06-04, at 07:38, Benjamin Pierce wrote: > >> 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. > > > Is there any reason to not use the simpler and less data-intensive > FSEvents API? > > It tells you about the particular directory in a tree where a file has > changed; since unison is already adept at comparing directories, it > should be quick unless the change happens to be in a directory with a > large number of files... > > -- > Guillaume Lessard > glessard at tffenterprises.com > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From sylvain at le-gall.net Sat Jun 7 17:48:17 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Sat, 7 Jun 2008 21:48:17 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <936AB206-2B4F-4B29-AF85-A3B6E376C435@cis.upenn.edu> Message-ID: On 07-06-2008, Benjamin Pierce wrote: > No, FSEvents is probably better. (I think I wrote that description > of Unison's prototype functionality a while ago, before FSEvents was > available.) I did some researche yesterday, about what to use for what platform: - linux: inotify http://svn.metaprl.org/viewvc/mojave/libmojave/cutil/fam_inotify.c?revision=9798&view=markup - BSD: kqueue http://svn.metaprl.org/viewvc/mojave/libmojave/cutil/fam_kqueue.c?revision=10381&view=markup - Win32: ReadDirectoryChangesW http://svn.metaprl.org/viewvc/mojave/libmojave/cutil/fam_win32.c?revision=12714&view=markup - Mac OS X: FSEvents For UNIX, you also have gamin and fam. Link above is extracted from libmojave, which is an OCaml library. I know that there is also ocaml-inotify. http://tab.snarc.org/projects/ocaml_inotify/ But of course, this is for writing the notifier program using OCaml ;-) If the external program work well and is written using OCaml, is there anyway that the program gets included in unison itself after a certain amount of time (6 months working without problems)? Regards, Sylvain Le Gall From bcpierce at cis.upenn.edu Sat Jun 7 22:03:59 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Sat, 7 Jun 2008 22:03:59 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <936AB206-2B4F-4B29-AF85-A3B6E376C435@cis.upenn.edu> Message-ID: Hi Sylvain, > If the external program work well and is written using OCaml, is there > anyway that the program gets included in unison itself after a certain > amount of time (6 months working without problems)? Yes. If it is written in OCaml in a portable way, then the simplest may be simply to make it be part of Unison (to maintain the current single-executable distribution model). But I am also open to other models where the notification program is written in another language and not necessarily in a portable way. At this point, we need to experiment to see what's going to work best. - Benjamin On Jun 7, 2008, at 5:48 PM, Sylvain Le Gall wrote: > On 07-06-2008, Benjamin Pierce wrote: >> No, FSEvents is probably better. (I think I wrote that description >> of Unison's prototype functionality a while ago, before FSEvents was >> available.) > > I did some researche yesterday, about what to use for what platform: > - linux: inotify > http://svn.metaprl.org/viewvc/mojave/libmojave/cutil/ > fam_inotify.c?revision=9798&view=markup > - BSD: kqueue > http://svn.metaprl.org/viewvc/mojave/libmojave/cutil/fam_kqueue.c? > revision=10381&view=markup > - Win32: ReadDirectoryChangesW > http://svn.metaprl.org/viewvc/mojave/libmojave/cutil/fam_win32.c? > revision=12714&view=markup > - Mac OS X: FSEvents > > For UNIX, you also have gamin and fam. > > Link above is extracted from libmojave, which is an OCaml library. I > know that there is also ocaml-inotify. > http://tab.snarc.org/projects/ocaml_inotify/ > > But of course, this is for writing the notifier program using > OCaml ;-) > > If the external program work well and is written using OCaml, is there > anyway that the program gets included in unison itself after a certain > amount of time (6 months working without problems)? > > Regards, > Sylvain Le Gall > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From sylvain at le-gall.net Sun Jun 8 05:37:45 2008 From: sylvain at le-gall.net (Sylvain Le Gall) Date: Sun, 8 Jun 2008 09:37:45 +0000 (UTC) Subject: [Unison-hackers] unison and inotify principle References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <936AB206-2B4F-4B29-AF85-A3B6E376C435@cis.upenn.edu> Message-ID: On 08-06-2008, Benjamin Pierce wrote: > Hi Sylvain, > >> If the external program work well and is written using OCaml, is there >> anyway that the program gets included in unison itself after a certain >> amount of time (6 months working without problems)? > > Yes. If it is written in OCaml in a portable way, then the simplest > may be simply to make it be part of Unison (to maintain the current > single-executable distribution model). But I am also open to other > models where the notification program is written in another language > and not necessarily in a portable way. At this point, we need to > experiment to see what's going to work best. > Full ack. The only thing i would like to underline, is that it should be really great to have some kind of "driver" model where you can either use an internal driver (integrated in unison) or an external one (using a program). The idea is to keep the driver external as long as possible for testing and then integrate the one that can be integrated. Concerning "portability", i think it will be really hard. There is no POSIX way to poll this kind of event (even UNIXes doesn't have the same way to do this task). It will probably require to write a program per OS (BSD/Mac OS X/Linux/Win32). I will probably try to write an inotify program for this. But i need to finish some other job before ;-) Regards, Sylvain Le Gall From bcpierce at cis.upenn.edu Sun Jun 8 09:27:28 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Sun, 8 Jun 2008 09:27:28 -0400 Subject: [Unison-hackers] unison and inotify principle In-Reply-To: References: <33FC1795-764B-439C-94B7-DA66A493F041@cis.upenn.edu> <3DF02505-A6A8-48CA-9D92-EEB49C21FC85@cis.upenn.edu> <936AB206-2B4F-4B29-AF85-A3B6E376C435@cis.upenn.edu> Message-ID: > Concerning "portability", i think it will be really hard. There is no > POSIX way to poll this kind of event (even UNIXes doesn't have the > same > way to do this task). It will probably require to write a program > per OS > (BSD/Mac OS X/Linux/Win32). I didn't mean that exactly the same code would perform notification on all architectures -- clearly the notification logic, low-level APIs, etc. are going to have to work differently on different OSs. I meant that things have to be set up so that the Unison sources will continue to *compile* on all architectures. - Benjamin > On Jun 8, 2008, at 5:37 AM, Sylvain Le Gall wrote: > On 08-06-2008, Benjamin Pierce wrote: >> Hi Sylvain, >> >>> If the external program work well and is written using OCaml, is >>> there >>> anyway that the program gets included in unison itself after a >>> certain >>> amount of time (6 months working without problems)? >> >> Yes. If it is written in OCaml in a portable way, then the simplest >> may be simply to make it be part of Unison (to maintain the current >> single-executable distribution model). But I am also open to other >> models where the notification program is written in another language >> and not necessarily in a portable way. At this point, we need to >> experiment to see what's going to work best. >> > > Full ack. > > The only thing i would like to underline, is that it should be really > great to have some kind of "driver" model where you can either use an > internal driver (integrated in unison) or an external one (using a > program). The idea is to keep the driver external as long as possible > for testing and then integrate the one that can be integrated. > > Concerning "portability", i think it will be really hard. There is no > POSIX way to poll this kind of event (even UNIXes doesn't have the > same > way to do this task). It will probably require to write a program > per OS > (BSD/Mac OS X/Linux/Win32). > > I will probably try to write an inotify program for this. But i > need to > finish some other job before ;-) > > Regards, > Sylvain Le Gall > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From patrice.espie at art-de-france-export.com Sun Jun 15 09:31:56 2008 From: patrice.espie at art-de-france-export.com (=?UTF-8?Q?Patrice_Espi=C3=A9?=) Date: Sun, 15 Jun 2008 21:31:56 +0800 Subject: [Unison-hackers] Unicode names on Windows Message-ID: Hi All, I know that this discussion about Unicode characters in file name is an old one, but I can't figure the problem is still alive ... So please, just tell me: Am I wrong with my usage of Unison (2.27.57) on my computers here ? (France / China, Ubuntu / Windows XP, and of course files Chinese characters in files ...) Because now, I'm disappointed: no freeware really works for doing bidirectional synchronization between Linux and Windows ??? (this does not mean that commercial ones can do it ...) Unison is very good, but this enormous bug on Windows (it does not "see" files with Chinese chars in file name) make me think it's not usable for me ... and No, I can't ask my users to stop using Chinese chars in files ... computers should stay a tool, not a task ;) Does this problem will be corrected in Unison ? I guess this comes from OCaml language ? (which I don't know). Why not to translate Unison in java, for example ? (jUnison ...) Many portable concern should disappear (even if some should stay). Thanks -- Patrice -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.seas.upenn.edu/pipermail/unison-hackers/attachments/20080615/97d68ded/attachment.htm From bcpierce at cis.upenn.edu Sun Jun 15 11:48:53 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Sun, 15 Jun 2008 11:48:53 -0400 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: References: Message-ID: <625991B0-CC4D-45FB-9CCB-F0D583978CD7@cis.upenn.edu> > I know that this discussion about Unicode characters in file name > is an old one, but I can't figure the problem is still alive ... > So please, just tell me: Am I wrong with my usage of Unison > (2.27.57) on my computers here ? (France / China, Ubuntu / Windows > XP, and of course files Chinese characters in files ...) > > Because now, I'm disappointed: no freeware really works for doing > bidirectional synchronization between Linux and Windows ??? (this > does not mean that commercial ones can do it ...) Unison is very > good, but this enormous bug on Windows (it does not "see" files > with Chinese chars in file name) make me think it's not usable for > me ... and No, I can't ask my users to stop using Chinese chars in > files ... computers should stay a tool, not a task ;) > > Does this problem will be corrected in Unison ? I guess this comes > from OCaml language ? (which I don't know). Why not to translate > Unison in java, for example ? (jUnison ...) Many portable concern > should disappear (even if some should stay). Not from the OCaml language itself, but from the fact that, when we started Unison, OCaml had no internationalization libraries. It does now, and it should be possible for someone to fix Unison to use them, but it is a nontrivial amount of work and no one is signed up to do it at the moment. Rewriting Unison in Java might be an interesting project, but it would be a *really* nontrivial amount of work. Best, - Benjamin > > > Thanks > -- > Patrice > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From unison at greggman.com Mon Jun 16 00:21:12 2008 From: unison at greggman.com (Gregg Tavares) Date: Sun, 15 Jun 2008 21:21:12 -0700 (PDT) Subject: [Unison-hackers] Unicode names on Windows Message-ID: <205869.34711.qm@web45402.mail.sp1.yahoo.com> > From: Benjamin Pierce > To: Unison hackers > Sent: Sunday, June 15, 2008 8:48:53 AM > Subject: Re: [Unison-hackers] Unicode names on Windows > > > I know that this discussion about Unicode characters in file name? > > is an old one, but I can't figure the problem is still alive ... > > So please, just tell me: Am I wrong with my usage of Unison? > > (2.27.57) on my computers here ? (France / China, Ubuntu / Windows? > > XP, and of course files Chinese characters in files ...) No, unison does not work with unicode file names. It's not unison's fault, it's that it only runs on Windows, AFAIK, through?the unix emulation library, cygwin, and cygwin does not yet support unicode. The cygwin team?claims to be working on it. I'm not sure they'll get there anytime soon though. When and if they do release cygwin with unicode support all program running using cygwin will need to be recompiled but should otherwise work including unison. From ralph-lehmann at web.de Mon Jun 16 17:53:09 2008 From: ralph-lehmann at web.de (Ralph Lehmann) Date: Mon, 16 Jun 2008 23:53:09 +0200 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: <205869.34711.qm@web45402.mail.sp1.yahoo.com> References: <205869.34711.qm@web45402.mail.sp1.yahoo.com> Message-ID: <4856E0C5.5010409@web.de> Gregg Tavares schrieb: >> From: Benjamin Pierce >> To: Unison hackers >> Sent: Sunday, June 15, 2008 8:48:53 AM >> Subject: Re: [Unison-hackers] Unicode names on Windows >> >> > I know that this discussion about Unicode characters in file name >> > is an old one, but I can't figure the problem is still alive ... >> > So please, just tell me: Am I wrong with my usage of Unison >> > (2.27.57) on my computers here ? (France / China, Ubuntu / Windows >> > XP, and of course files Chinese characters in files ...) > No, unison does not work with unicode file names. It's not unison's fault, > it's that it only runs on Windows, AFAIK, through the unix emulation library, > cygwin, and cygwin does not yet support unicode. Please take a look at this site: http://www.okisoft.co.jp/esc/utf8-cygwin/ HTH && HAND Ralph From unison at greggman.com Tue Jun 17 01:26:26 2008 From: unison at greggman.com (Gregg Tavares) Date: Mon, 16 Jun 2008 22:26:26 -0700 (PDT) Subject: [Unison-hackers] Unicode names on Windows Message-ID: <84226.31779.qm@web45412.mail.sp1.yahoo.com> ----- Original Message ---- > From: Ralph Lehmann > To: Unison hackers > Sent: Monday, June 16, 2008 2:53:09 PM > Subject: Re: [Unison-hackers] Unicode names on Windows > > Gregg Tavares schrieb: > >> From: Benjamin Pierce > >> To: Unison hackers > >> Sent: Sunday, June 15, 2008 8:48:53 AM > >> Subject: Re: [Unison-hackers] Unicode names on Windows > >> > >> > I know that this discussion about Unicode characters in file name? > >> > is an old one, but I can't figure the problem is still alive ... > >> > So please, just tell me: Am I wrong with my usage of Unison? > >> > (2.27.57) on my computers here ? (France / China, Ubuntu / Windows? > >> > XP, and of course files Chinese characters in files ...) > > No, unison does not work with unicode file names. It's not unison's fault, > > it's that it only runs on Windows, AFAIK, through the unix emulation library, > > cygwin, and cygwin does not yet support unicode. > > Please take a look at this site: > http://www.okisoft.co.jp/esc/utf8-cygwin/ > I did take a look at that. Unfortunately the filename buffers in cygwin are too small for typical chinese/japanese/korean filenames. It may work for short filenames but for a typical .mp3 filename like mp3folder/Band Name/Album Name/Track Name it will fail I tried recompiling that version of cygwin with larger filename buffers but it was beyond the time I had. The maximum filename size is not defined in one place. It could be that someone more familar with the code could get that patch to work easily but I couldn't. If?anyone does I'd love to hear about it. From unison at greggman.com Tue Jun 17 01:37:57 2008 From: unison at greggman.com (Gregg Tavares) Date: Mon, 16 Jun 2008 22:37:57 -0700 (PDT) Subject: [Unison-hackers] Unicode names on Windows Message-ID: <783807.51467.qm@web45401.mail.sp1.yahoo.com> ----- Original Message ---- > From: Gregg Tavares > To: Unison hackers > Sent: Monday, June 16, 2008 10:26:26 PM > Subject: Re: [Unison-hackers] Unicode names on Windows > > ----- Original Message ---- > > From: Ralph Lehmann > > To: Unison hackers > > Sent: Monday, June 16, 2008 2:53:09 PM > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > Gregg Tavares schrieb: > > >> From: Benjamin Pierce > > >> To: Unison hackers > > >> Sent: Sunday, June 15, 2008 8:48:53 AM > > >> Subject: Re: [Unison-hackers] Unicode names on Windows > > >> > > >> > I know that this discussion about Unicode characters in file name? > > >> > is an old one, but I can't figure the problem is still alive ... > > >> > So please, just tell me: Am I wrong with my usage of Unison? > > >> > (2.27.57) on my computers here ? (France / China, Ubuntu / Windows? > > >> > XP, and of course files Chinese characters in files ...) > > > No, unison does not work with unicode file names. It's not unison's fault, > > > it's that it only runs on Windows, AFAIK, through the unix emulation > library, > > > cygwin, and cygwin does not yet support unicode. > > > > Please take a look at this site: > > http://www.okisoft.co.jp/esc/utf8-cygwin/ > > > > I did take a look at that. Unfortunately the filename buffers in cygwin > are too small for typical chinese/japanese/korean filenames. It may > work for short filenames but for a typical .mp3 filename like > > mp3folder/Band Name/Album Name/Track Name > > it will fail > > I tried recompiling that version of cygwin with larger filename > buffers but it was beyond the time I had. The maximum filename > size is not defined in one place. It could be that someone more > familar with the code could get that patch to work easily but I > couldn't. If?anyone does I'd love to hear about it. > I should add that if you manage to get the filename buffer size large enough to work with Japanese/Chinese/Korean you'll also have to re-compile ocaml so that it starts using larger buffers for filenames and then recompile unison to use that new ocaml and that will probably require recompiling every tool that ocaml needs to get built. From patrice.espie at art-de-france-export.com Tue Jun 17 09:19:47 2008 From: patrice.espie at art-de-france-export.com (=?UTF-8?Q?Patrice_Espi=C3=A9?=) Date: Tue, 17 Jun 2008 21:19:47 +0800 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: <783807.51467.qm@web45401.mail.sp1.yahoo.com> References: <783807.51467.qm@web45401.mail.sp1.yahoo.com> Message-ID: Hi all, I would like to tell the way I found to (continue to) use Unison with Linux and Windows, with "strange" characters in filenames. Not sure this is a good place to tell about it, but perhaps this solution should be added to the howtos of Unison. First of all, Linux handle characters correctly. So lets use Unison on Linux only ... To synchronize my Windows shares, I mount them in Linux. Big challenge here, because the mount process to obtain accents correctly is not easy (at least, not well documented on the net): //IP_ADDRESs/WINDOWS_SHARE_NAME /LOCAL_PATH_TO_MOUNT_TO cifs user,rw,uid=1000,gid=1000,umask=000,file_mode=0777,dir_mode=0777,iocharset=utf8,credentials=/root/.smbcredentials 0 0 with "/root/.smbcredentials" file contents: username=WINDOWS_USER_NAME password=WINDOWS_USER_PASSWORD Don't forget to add a blank line at the end of this file, it seems to be important for cifs. Then, everything is ok for using Unison from Linux. The only bad point is speed ... I hope this could help ! Patrice 2008/6/17 Gregg Tavares : > > > ----- Original Message ---- > > From: Gregg Tavares > > To: Unison hackers > > Sent: Monday, June 16, 2008 10:26:26 PM > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > ----- Original Message ---- > > > From: Ralph Lehmann > > > To: Unison hackers > > > Sent: Monday, June 16, 2008 2:53:09 PM > > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > > > Gregg Tavares schrieb: > > > >> From: Benjamin Pierce > > > >> To: Unison hackers > > > >> Sent: Sunday, June 15, 2008 8:48:53 AM > > > >> Subject: Re: [Unison-hackers] Unicode names on Windows > > > >> > > > >> > I know that this discussion about Unicode characters in file name > > > >> > is an old one, but I can't figure the problem is still alive ... > > > >> > So please, just tell me: Am I wrong with my usage of Unison > > > >> > (2.27.57) on my computers here ? (France / China, Ubuntu / > Windows > > > >> > XP, and of course files Chinese characters in files ...) > > > > No, unison does not work with unicode file names. It's not unison's > fault, > > > > it's that it only runs on Windows, AFAIK, through the unix emulation > > library, > > > > cygwin, and cygwin does not yet support unicode. > > > > > > Please take a look at this site: > > > http://www.okisoft.co.jp/esc/utf8-cygwin/ > > > > > > > I did take a look at that. Unfortunately the filename buffers in cygwin > > are too small for typical chinese/japanese/korean filenames. It may > > work for short filenames but for a typical .mp3 filename like > > > > mp3folder/Band Name/Album Name/Track Name > > > > it will fail > > > > I tried recompiling that version of cygwin with larger filename > > buffers but it was beyond the time I had. The maximum filename > > size is not defined in one place. It could be that someone more > > familar with the code could get that patch to work easily but I > > couldn't. If anyone does I'd love to hear about it. > > > > I should add that if you manage to get the filename buffer size large > enough to work with Japanese/Chinese/Korean you'll also have to > re-compile ocaml so that it starts using larger buffers for filenames > and then recompile unison to use that new ocaml and that will > probably require recompiling every tool that ocaml needs to get > built. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.seas.upenn.edu/pipermail/unison-hackers/attachments/20080617/770dad25/attachment.htm From bcpierce at cis.upenn.edu Tue Jun 17 17:03:47 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Tue, 17 Jun 2008 17:03:47 -0400 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: References: <783807.51467.qm@web45401.mail.sp1.yahoo.com> Message-ID: <676FAEC1-7CAD-4E4A-B5E9-AC8967866CA2@cis.upenn.edu> Thanks for posting that, Patrice. If you have a minute, perhaps it would be useful to add it to the Unison Wiki pages as well? - Benjamin On Jun 17, 2008, at 9:19 AM, Patrice Espi? wrote: > Hi all, > > I would like to tell the way I found to (continue to) use Unison > with Linux and Windows, with "strange" characters in filenames. Not > sure this is a good place to tell about it, but perhaps this > solution should be added to the howtos of Unison. > > First of all, Linux handle characters correctly. So lets use Unison > on Linux only ... > > To synchronize my Windows shares, I mount them in Linux. Big > challenge here, because the mount process to obtain accents > correctly is not easy (at least, not well documented on the net): > > //IP_ADDRESs/WINDOWS_SHARE_NAME /LOCAL_PATH_TO_MOUNT_TO > cifs > user > ,rw > ,uid > = > 1000 > ,gid > = > 1000 > ,umask=000,file_mode=0777,dir_mode=0777,iocharset=utf8,credentials=/ > root/.smbcredentials 0 0 > > with "/root/.smbcredentials" file contents: > > username=WINDOWS_USER_NAME > password=WINDOWS_USER_PASSWORD > > Don't forget to add a blank line at the end of this file, it seems > to be important for cifs. > > Then, everything is ok for using Unison from Linux. The only bad > point is speed ... > > I hope this could help ! > Patrice > > 2008/6/17 Gregg Tavares : > > > ----- Original Message ---- > > From: Gregg Tavares > > To: Unison hackers > > Sent: Monday, June 16, 2008 10:26:26 PM > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > ----- Original Message ---- > > > From: Ralph Lehmann > > > To: Unison hackers > > > Sent: Monday, June 16, 2008 2:53:09 PM > > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > > > Gregg Tavares schrieb: > > > >> From: Benjamin Pierce > > > >> To: Unison hackers > > > >> Sent: Sunday, June 15, 2008 8:48:53 AM > > > >> Subject: Re: [Unison-hackers] Unicode names on Windows > > > >> > > > >> > I know that this discussion about Unicode characters in > file name > > > >> > is an old one, but I can't figure the problem is still > alive ... > > > >> > So please, just tell me: Am I wrong with my usage of Unison > > > >> > (2.27.57) on my computers here ? (France / China, Ubuntu / > Windows > > > >> > XP, and of course files Chinese characters in files ...) > > > > No, unison does not work with unicode file names. It's not > unison's fault, > > > > it's that it only runs on Windows, AFAIK, through the unix > emulation > > library, > > > > cygwin, and cygwin does not yet support unicode. > > > > > > Please take a look at this site: > > > http://www.okisoft.co.jp/esc/utf8-cygwin/ > > > > > > > I did take a look at that. Unfortunately the filename buffers in > cygwin > > are too small for typical chinese/japanese/korean filenames. It may > > work for short filenames but for a typical .mp3 filename like > > > > mp3folder/Band Name/Album Name/Track Name > > > > it will fail > > > > I tried recompiling that version of cygwin with larger filename > > buffers but it was beyond the time I had. The maximum filename > > size is not defined in one place. It could be that someone more > > familar with the code could get that patch to work easily but I > > couldn't. If anyone does I'd love to hear about it. > > > > I should add that if you manage to get the filename buffer size large > enough to work with Japanese/Chinese/Korean you'll also have to > re-compile ocaml so that it starts using larger buffers for filenames > and then recompile unison to use that new ocaml and that will > probably require recompiling every tool that ocaml needs to get > built. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From patrice.espie at art-de-france-export.com Tue Jun 17 19:46:30 2008 From: patrice.espie at art-de-france-export.com (=?UTF-8?Q?Patrice_Espi=C3=A9?=) Date: Wed, 18 Jun 2008 07:46:30 +0800 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: <676FAEC1-7CAD-4E4A-B5E9-AC8967866CA2@cis.upenn.edu> References: <783807.51467.qm@web45401.mail.sp1.yahoo.com> <676FAEC1-7CAD-4E4A-B5E9-AC8967866CA2@cis.upenn.edu> Message-ID: Of course, I will do it, no pb. Is there a way to speed up Unison -- fastcheck seems to be inactive on sambas shares ... 2008/6/18 Benjamin Pierce : > Thanks for posting that, Patrice. If you have a minute, perhaps it > would be useful to add it to the Unison Wiki pages as well? > > - Benjamin > > > On Jun 17, 2008, at 9:19 AM, Patrice Espi? wrote: > > > Hi all, > > > > I would like to tell the way I found to (continue to) use Unison > > with Linux and Windows, with "strange" characters in filenames. Not > > sure this is a good place to tell about it, but perhaps this > > solution should be added to the howtos of Unison. > > > > First of all, Linux handle characters correctly. So lets use Unison > > on Linux only ... > > > > To synchronize my Windows shares, I mount them in Linux. Big > > challenge here, because the mount process to obtain accents > > correctly is not easy (at least, not well documented on the net): > > > > //IP_ADDRESs/WINDOWS_SHARE_NAME /LOCAL_PATH_TO_MOUNT_TO > > cifs > > user > > ,rw > > ,uid > > = > > 1000 > > ,gid > > = > > 1000 > > ,umask=000,file_mode=0777,dir_mode=0777,iocharset=utf8,credentials=/ > > root/.smbcredentials 0 0 > > > > with "/root/.smbcredentials" file contents: > > > > username=WINDOWS_USER_NAME > > password=WINDOWS_USER_PASSWORD > > > > Don't forget to add a blank line at the end of this file, it seems > > to be important for cifs. > > > > Then, everything is ok for using Unison from Linux. The only bad > > point is speed ... > > > > I hope this could help ! > > Patrice > > > > 2008/6/17 Gregg Tavares : > > > > > > ----- Original Message ---- > > > From: Gregg Tavares > > > To: Unison hackers > > > Sent: Monday, June 16, 2008 10:26:26 PM > > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > > > ----- Original Message ---- > > > > From: Ralph Lehmann > > > > To: Unison hackers > > > > Sent: Monday, June 16, 2008 2:53:09 PM > > > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > > > > > Gregg Tavares schrieb: > > > > >> From: Benjamin Pierce > > > > >> To: Unison hackers > > > > >> Sent: Sunday, June 15, 2008 8:48:53 AM > > > > >> Subject: Re: [Unison-hackers] Unicode names on Windows > > > > >> > > > > >> > I know that this discussion about Unicode characters in > > file name > > > > >> > is an old one, but I can't figure the problem is still > > alive ... > > > > >> > So please, just tell me: Am I wrong with my usage of Unison > > > > >> > (2.27.57) on my computers here ? (France / China, Ubuntu / > > Windows > > > > >> > XP, and of course files Chinese characters in files ...) > > > > > No, unison does not work with unicode file names. It's not > > unison's fault, > > > > > it's that it only runs on Windows, AFAIK, through the unix > > emulation > > > library, > > > > > cygwin, and cygwin does not yet support unicode. > > > > > > > > Please take a look at this site: > > > > http://www.okisoft.co.jp/esc/utf8-cygwin/ > > > > > > > > > > I did take a look at that. Unfortunately the filename buffers in > > cygwin > > > are too small for typical chinese/japanese/korean filenames. It may > > > work for short filenames but for a typical .mp3 filename like > > > > > > mp3folder/Band Name/Album Name/Track Name > > > > > > it will fail > > > > > > I tried recompiling that version of cygwin with larger filename > > > buffers but it was beyond the time I had. The maximum filename > > > size is not defined in one place. It could be that someone more > > > familar with the code could get that patch to work easily but I > > > couldn't. If anyone does I'd love to hear about it. > > > > > > > I should add that if you manage to get the filename buffer size large > > enough to work with Japanese/Chinese/Korean you'll also have to > > re-compile ocaml so that it starts using larger buffers for filenames > > and then recompile unison to use that new ocaml and that will > > probably require recompiling every tool that ocaml needs to get > > built. > > > > _______________________________________________ > > Unison-hackers mailing list > > Unison-hackers at lists.seas.upenn.edu > > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > > > _______________________________________________ > > Unison-hackers mailing list > > Unison-hackers at lists.seas.upenn.edu > > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > -- Patrice Espie Art de France Export ?? Head office France : 3, rue G. Rossini, 26000 Valence Tel: +33 4 75 02 27 70 - Mobile: +33 6 33 04 34 23 www.art-de-france-export.com Shanghai Office : Victoire - ??? The Bund Side - Room 3102 - Building N?7 288 Baidu road - Shanghai 200010, China Tel: +86 21 6332 0787 - Mobile: +86 139 1740 2646 www.victoire.cn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.seas.upenn.edu/pipermail/unison-hackers/attachments/20080617/ae72509f/attachment.htm From bcpierce at cis.upenn.edu Tue Jun 17 22:48:52 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Tue, 17 Jun 2008 22:48:52 -0400 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: References: <783807.51467.qm@web45401.mail.sp1.yahoo.com> <676FAEC1-7CAD-4E4A-B5E9-AC8967866CA2@cis.upenn.edu> Message-ID: > Is there a way to speed up Unison -- fastcheck seems to be inactive > on sambas shares ... I don't know why that would be, exactly, not being a samba user myself. But note that Unison does have to look at all the inodes in the entire replica, and this is already a lot of information to transfer over a slow link. - Benjamin > > > 2008/6/18 Benjamin Pierce : > Thanks for posting that, Patrice. If you have a minute, perhaps it > would be useful to add it to the Unison Wiki pages as well? > > - Benjamin > > > On Jun 17, 2008, at 9:19 AM, Patrice Espi? wrote: > > > Hi all, > > > > I would like to tell the way I found to (continue to) use Unison > > with Linux and Windows, with "strange" characters in filenames. Not > > sure this is a good place to tell about it, but perhaps this > > solution should be added to the howtos of Unison. > > > > First of all, Linux handle characters correctly. So lets use Unison > > on Linux only ... > > > > To synchronize my Windows shares, I mount them in Linux. Big > > challenge here, because the mount process to obtain accents > > correctly is not easy (at least, not well documented on the net): > > > > //IP_ADDRESs/WINDOWS_SHARE_NAME /LOCAL_PATH_TO_MOUNT_TO > > cifs > > user > > ,rw > > ,uid > > = > > 1000 > > ,gid > > = > > 1000 > > ,umask=000,file_mode=0777,dir_mode=0777,iocharset=utf8,credentials=/ > > root/.smbcredentials 0 0 > > > > with "/root/.smbcredentials" file contents: > > > > username=WINDOWS_USER_NAME > > password=WINDOWS_USER_PASSWORD > > > > Don't forget to add a blank line at the end of this file, it seems > > to be important for cifs. > > > > Then, everything is ok for using Unison from Linux. The only bad > > point is speed ... > > > > I hope this could help ! > > Patrice > > > > 2008/6/17 Gregg Tavares : > > > > > > ----- Original Message ---- > > > From: Gregg Tavares > > > To: Unison hackers > > > Sent: Monday, June 16, 2008 10:26:26 PM > > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > > > ----- Original Message ---- > > > > From: Ralph Lehmann > > > > To: Unison hackers > > > > Sent: Monday, June 16, 2008 2:53:09 PM > > > > Subject: Re: [Unison-hackers] Unicode names on Windows > > > > > > > > Gregg Tavares schrieb: > > > > >> From: Benjamin Pierce > > > > >> To: Unison hackers > > > > >> Sent: Sunday, June 15, 2008 8:48:53 AM > > > > >> Subject: Re: [Unison-hackers] Unicode names on Windows > > > > >> > > > > >> > I know that this discussion about Unicode characters in > > file name > > > > >> > is an old one, but I can't figure the problem is still > > alive ... > > > > >> > So please, just tell me: Am I wrong with my usage of Unison > > > > >> > (2.27.57) on my computers here ? (France / China, Ubuntu / > > Windows > > > > >> > XP, and of course files Chinese characters in files ...) > > > > > No, unison does not work with unicode file names. It's not > > unison's fault, > > > > > it's that it only runs on Windows, AFAIK, through the unix > > emulation > > > library, > > > > > cygwin, and cygwin does not yet support unicode. > > > > > > > > Please take a look at this site: > > > > http://www.okisoft.co.jp/esc/utf8-cygwin/ > > > > > > > > > > I did take a look at that. Unfortunately the filename buffers in > > cygwin > > > are too small for typical chinese/japanese/korean filenames. It > may > > > work for short filenames but for a typical .mp3 filename like > > > > > > mp3folder/Band Name/Album Name/Track Name > > > > > > it will fail > > > > > > I tried recompiling that version of cygwin with larger filename > > > buffers but it was beyond the time I had. The maximum filename > > > size is not defined in one place. It could be that someone more > > > familar with the code could get that patch to work easily but I > > > couldn't. If anyone does I'd love to hear about it. > > > > > > > I should add that if you manage to get the filename buffer size > large > > enough to work with Japanese/Chinese/Korean you'll also have to > > re-compile ocaml so that it starts using larger buffers for > filenames > > and then recompile unison to use that new ocaml and that will > > probably require recompiling every tool that ocaml needs to get > > built. > > > > _______________________________________________ > > Unison-hackers mailing list > > Unison-hackers at lists.seas.upenn.edu > > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > > > _______________________________________________ > > Unison-hackers mailing list > > Unison-hackers at lists.seas.upenn.edu > > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > > > -- > Patrice Espie > Art de France Export > ?? > > Head office France : > 3, rue G. Rossini, 26000 Valence > Tel: +33 4 75 02 27 70 - Mobile: +33 6 33 04 34 23 > www.art-de-france-export.com > > Shanghai Office : > Victoire - ??? > The Bund Side - Room 3102 - Building N?7 > 288 Baidu road - Shanghai 200010, China > Tel: +86 21 6332 0787 - Mobile: +86 139 1740 2646 > www.victoire.cn > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From andri at dot.ee Wed Jun 18 00:43:04 2008 From: andri at dot.ee (=?UTF-8?B?QW5kcmkgTcO2bGw=?=) Date: Wed, 18 Jun 2008 07:43:04 +0300 Subject: [Unison-hackers] Unicode names on Windows In-Reply-To: References: <783807.51467.qm@web45401.mail.sp1.yahoo.com> <676FAEC1-7CAD-4E4A-B5E9-AC8967866CA2@cis.upenn.edu> Message-ID: <48589258.40701@dot.ee> >> Is there a way to speed up Unison -- fastcheck seems to be inactive >> on sambas shares ... Setting both fastcheck and pretendwin to true might help. IIRC Samba's reported inode numbers change with every mount. Andri Benjamin Pierce wrote: >> Is there a way to speed up Unison -- fastcheck seems to be inactive >> on sambas shares ... > > I don't know why that would be, exactly, not being a samba user > myself. But note that Unison does have to look at all the inodes in > the entire replica, and this is already a lot of information to > transfer over a slow link. > > - Benjamin > >> >> 2008/6/18 Benjamin Pierce : >> Thanks for posting that, Patrice. If you have a minute, perhaps it >> would be useful to add it to the Unison Wiki pages as well? >> >> - Benjamin >> >> >> On Jun 17, 2008, at 9:19 AM, Patrice Espi? wrote: >> >>> Hi all, >>> >>> I would like to tell the way I found to (continue to) use Unison >>> with Linux and Windows, with "strange" characters in filenames. Not >>> sure this is a good place to tell about it, but perhaps this >>> solution should be added to the howtos of Unison. >>> >>> First of all, Linux handle characters correctly. So lets use Unison >>> on Linux only ... >>> >>> To synchronize my Windows shares, I mount them in Linux. Big >>> challenge here, because the mount process to obtain accents >>> correctly is not easy (at least, not well documented on the net): >>> >>> //IP_ADDRESs/WINDOWS_SHARE_NAME /LOCAL_PATH_TO_MOUNT_TO >>> cifs >>> user >>> ,rw >>> ,uid >>> = >>> 1000 >>> ,gid >>> = >>> 1000 >>> ,umask=000,file_mode=0777,dir_mode=0777,iocharset=utf8,credentials=/ >>> root/.smbcredentials 0 0 >>> >>> with "/root/.smbcredentials" file contents: >>> >>> username=WINDOWS_USER_NAME >>> password=WINDOWS_USER_PASSWORD >>> >>> Don't forget to add a blank line at the end of this file, it seems >>> to be important for cifs. >>> >>> Then, everything is ok for using Unison from Linux. The only bad >>> point is speed ... >>> >>> I hope this could help ! >>> Patrice >>> >>> 2008/6/17 Gregg Tavares : >>> >>> >>> ----- Original Message ---- >>>> From: Gregg Tavares >>>> To: Unison hackers >>>> Sent: Monday, June 16, 2008 10:26:26 PM >>>> Subject: Re: [Unison-hackers] Unicode names on Windows >>>> >>>> ----- Original Message ---- >>>>> From: Ralph Lehmann >>>>> To: Unison hackers >>>>> Sent: Monday, June 16, 2008 2:53:09 PM >>>>> Subject: Re: [Unison-hackers] Unicode names on Windows >>>>> >>>>> Gregg Tavares schrieb: >>>>>>> From: Benjamin Pierce >>>>>>> To: Unison hackers >>>>>>> Sent: Sunday, June 15, 2008 8:48:53 AM >>>>>>> Subject: Re: [Unison-hackers] Unicode names on Windows >>>>>>> >>>>>>>> I know that this discussion about Unicode characters in >>> file name >>>>>>>> is an old one, but I can't figure the problem is still >>> alive ... >>>>>>>> So please, just tell me: Am I wrong with my usage of Unison >>>>>>>> (2.27.57) on my computers here ? (France / China, Ubuntu / >>> Windows >>>>>>>> XP, and of course files Chinese characters in files ...) >>>>>> No, unison does not work with unicode file names. It's not >>> unison's fault, >>>>>> it's that it only runs on Windows, AFAIK, through the unix >>> emulation >>>> library, >>>>>> cygwin, and cygwin does not yet support unicode. >>>>> Please take a look at this site: >>>>> http://www.okisoft.co.jp/esc/utf8-cygwin/ >>>>> >>>> I did take a look at that. Unfortunately the filename buffers in >>> cygwin >>>> are too small for typical chinese/japanese/korean filenames. It >> may >>>> work for short filenames but for a typical .mp3 filename like >>>> >>>> mp3folder/Band Name/Album Name/Track Name >>>> >>>> it will fail >>>> >>>> I tried recompiling that version of cygwin with larger filename >>>> buffers but it was beyond the time I had. The maximum filename >>>> size is not defined in one place. It could be that someone more >>>> familar with the code could get that patch to work easily but I >>>> couldn't. If anyone does I'd love to hear about it. >>>> >>> I should add that if you manage to get the filename buffer size >> large >>> enough to work with Japanese/Chinese/Korean you'll also have to >>> re-compile ocaml so that it starts using larger buffers for >> filenames >>> and then recompile unison to use that new ocaml and that will >>> probably require recompiling every tool that ocaml needs to get >>> built. >>> >>> _______________________________________________ >>> Unison-hackers mailing list >>> Unison-hackers at lists.seas.upenn.edu >>> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers >>> >>> _______________________________________________ >>> Unison-hackers mailing list >>> Unison-hackers at lists.seas.upenn.edu >>> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at lists.seas.upenn.edu >> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers >> >> >> >> -- >> Patrice Espie >> Art de France Export >> ?? >> >> Head office France : >> 3, rue G. Rossini, 26000 Valence >> Tel: +33 4 75 02 27 70 - Mobile: +33 6 33 04 34 23 >> www.art-de-france-export.com >> >> Shanghai Office : >> Victoire - ??? >> The Bund Side - Room 3102 - Building N?7 >> 288 Baidu road - Shanghai 200010, China >> Tel: +86 21 6332 0787 - Mobile: +86 139 1740 2646 >> www.victoire.cn >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at lists.seas.upenn.edu >> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From bcpierce at seas.upenn.edu Sat Jun 21 11:18:01 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Sat, 21 Jun 2008 11:18:01 -0400 Subject: [Unison-hackers] [unison-svn] r285 - in trunk: . doc src src/lwt Message-ID: <200806211518.m5LFI1O7023298@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-21 11:17:48 -0400 (Sat, 21 Jun 2008) New Revision: 285 Removed: trunk/COPYING Modified: trunk/doc/unison-manual.tex trunk/src/Makefile trunk/src/RECENTNEWS trunk/src/common.ml trunk/src/copy.ml trunk/src/fileinfo.ml trunk/src/fileinfo.mli trunk/src/files.ml trunk/src/lwt/lwt_unix.ml trunk/src/mkProjectInfo.ml trunk/src/os.ml trunk/src/os.mli trunk/src/remote.ml Log: 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. Deleted: trunk/COPYING =================================================================== --- trunk/COPYING 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/COPYING 2008-06-21 15:17:48 UTC (rev 285) @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - 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 2 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - Modified: trunk/doc/unison-manual.tex =================================================================== --- trunk/doc/unison-manual.tex 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/doc/unison-manual.tex 2008-06-21 15:17:48 UTC (rev 285) @@ -2065,11 +2065,11 @@ To prevent accidents, Unison provides a preference called \verb|mountpoint|. Including a line like \begin{verbatim} - mountpoint = /mnt/foo + mountpoint = foo \end{verbatim} in your preference file will cause Unison to check, after it finishes detecting updates, that something actually exists at the path -\verb|/mnt/foo| on both replicas; if it does not, the Unison run will +\verb|foo| on both replicas; if it does not, the Unison run will abort. \SUBSECTION{Click-starting Unison}{click} Modified: trunk/src/Makefile =================================================================== --- trunk/src/Makefile 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/Makefile 2008-06-21 15:17:48 UTC (rev 285) @@ -363,6 +363,11 @@ checkin: $(MAKE) -C .. checkin +installremote: + $(MAKE) UISTYLE=text + -unison eniac -path current/unison/trunk/src -batch + ssh eniac.seas.upenn.edu make -C current/unison/trunk/src installtext + #################################################################### # Documentation strings Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/RECENTNEWS 2008-06-21 15:17:48 UTC (rev 285) @@ -1,3 +1,45 @@ +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 Modified: trunk/src/common.ml =================================================================== --- trunk/src/common.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/common.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -190,7 +190,7 @@ | _ -> false) | _ -> false -let rcType ((fi, _, _, _) as rc) = +let rcType (fi, _, _, _) = Fileinfo.type2string fi let riFileType ri = Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/copy.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -36,7 +36,8 @@ in Unix.out_channel_of_descr fd end - | `RESS len -> Osx.openRessOut fspath path len + | `RESS len -> + Osx.openRessOut fspath path len let protect f g = try @@ -60,9 +61,7 @@ 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 () -> @@ -136,8 +135,6 @@ let startReceivingFile fspath path realPath fileKind update srcFileSize id file_id = - debug (fun() -> - Util.msg "startReceivingFile: %s\n" (Fspath.concatToString fspath path)); (* 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 @@ -153,15 +150,14 @@ !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 -> + `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 () -> @@ -247,7 +243,6 @@ let compressRemotely = Remote.registerServerCmd "compress" compress - let receiveRemBiLocally _ (file_id, bi) = let bil = try @@ -281,7 +276,7 @@ (* We limit the size of the output buffers to about 512 KB (we cannot go above the limit below plus 64) *) -let transmitFileReg = Lwt_util.make_region 440 +let transferFileReg = Lwt_util.make_region 440 let bufferSize sz = min 64 ((truncate (Uutil.Filesize.toFloat sz) + 1023) / 1024) @@ -314,69 +309,77 @@ | None -> () end -let reallyTransmitFile +(* The ressOnly flag tells reallyTransferFile to skip transferring + the data fork (which has already been taken care of by some external + utility) and just transfer the resource fork (which external utilities + are not necessarily good at). *) +let reallyTransferFile connFrom fspathFrom pathFrom fspathTo pathTo realPathTo - update desc ressLength id = - debug (fun() -> Util.msg "getFile(%s,%s) -> (%s,%s,%s,%s)\n" + update desc ressLength ressOnly id = + debug (fun() -> Util.msg "reallyTransferFile(%s,%s) -> (%s,%s,%s,%s)\n" (Fspath.toString fspathFrom) (Path.toString pathFrom) (Fspath.toString fspathTo) (Path.toString pathTo) (Path.toString realPathTo) (Props.toString desc)); - let srcFileSize = Props.length desc in - debug (fun () -> - Util.msg "src file size = %s bytes\n" - (Uutil.Filesize.toString srcFileSize)); let file_id = Remote.newMsgId () in - (* Data fork *) - startReceivingFile - fspathTo pathTo realPathTo `DATA update srcFileSize id file_id - >>= (fun (outfd, infd, firstBi, remBi) -> - Lwt.catch (fun () -> - Uutil.showProgress id Uutil.Filesize.zero "f"; - sendRemBi connFrom file_id remBi >>= (fun () -> - compressRemotely connFrom - (firstBi, - fspathFrom, pathFrom, `DATA, srcFileSize, id, file_id) - >>= (fun () -> - decompressor := - Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) - close_all infd outfd; - Lwt.return ()))) - (fun e -> - decompressor := - Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) - close_all_no_error infd outfd; - Lwt.fail e) >>= (fun () -> - (* Ressource fork *) - if ressLength > Uutil.Filesize.zero then begin + + (if ressOnly then + (* Skip data fork *) + Lwt.return () + else + (* Data fork *) startReceivingFile - fspathTo pathTo realPathTo - (`RESS ressLength) update ressLength id file_id - >>= (fun (outfd, infd, firstBi, remBi) -> + fspathTo pathTo realPathTo `DATA update srcFileSize id file_id + >>= (fun (outfd, infd, firstBi, remBi) -> Lwt.catch (fun () -> Uutil.showProgress id Uutil.Filesize.zero "f"; sendRemBi connFrom file_id remBi >>= (fun () -> compressRemotely connFrom - (firstBi, fspathFrom, pathFrom, - `RESS ressLength, ressLength, id, file_id) - >>= (fun () -> + (firstBi, + fspathFrom, pathFrom, `DATA, srcFileSize, id, file_id) + >>= (fun () -> decompressor := Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) close_all infd outfd; Lwt.return ()))) - (fun e -> - decompressor := - Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) - close_all_no_error infd outfd; - Lwt.fail e)) - end else - Lwt.return ()) >>= (fun () -> - begin match update with - `Update _ -> Fileinfo.set fspathTo pathTo (`Copy realPathTo) desc - | `Copy -> Fileinfo.set fspathTo pathTo (`Set Props.fileDefault) desc - end; - Lwt.return ())) + (* catch handler *) + (fun e -> + decompressor := + Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) + close_all_no_error infd outfd; + Lwt.fail e) + )) >>= (fun () -> + (* Resource fork *) + (if ressLength > Uutil.Filesize.zero then begin + startReceivingFile + fspathTo pathTo realPathTo + (`RESS ressLength) update ressLength id file_id + >>= (fun (outfd, infd, firstBi, remBi) -> + Lwt.catch (fun () -> + Uutil.showProgress id Uutil.Filesize.zero "f"; + sendRemBi connFrom file_id remBi >>= (fun () -> + compressRemotely connFrom + (firstBi, fspathFrom, pathFrom, + `RESS ressLength, ressLength, id, file_id) + >>= (fun () -> + decompressor := + Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) + close_all infd outfd; + Lwt.return ()))) + (fun e -> + decompressor := + Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) + close_all_no_error infd outfd; + Lwt.fail e)) + end else + Lwt.return ()) >>= (fun () -> + begin match update with + `Update _ -> Fileinfo.set fspathTo pathTo (`Copy realPathTo) desc + | `Copy -> Fileinfo.set fspathTo pathTo (`Set Props.fileDefault) desc + end; + Lwt.return ())) + (****) let tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id = @@ -391,7 +394,8 @@ the problem has to do with the RPC mechanism, which was used here to make a call *back* from the server to the client inside Trace.log so that the log message would be appended to the log file on the client. *) - let loggit = if Prefs.read Globals.someHostIsRunningWindows then Util.msg "%s" else Trace.log in + let loggit = if Prefs.read Globals.someHostIsRunningWindows + then Util.msg "%s" else Trace.log in match Xferhint.lookup fp with None -> false @@ -432,7 +436,7 @@ (Path.toString candidatePath)); Xferhint.deleteEntry (candidateFspath, candidatePath); false - end + end with Util.Transient s -> debug (fun () -> @@ -445,40 +449,110 @@ false) end -let transmitFileLocal - connFrom - (fspathFrom, pathFrom, fspathTo, pathTo, realPathTo, - update, desc, fp, ress, id) = - if - tryCopyMovedFile - fspathTo pathTo realPathTo update desc fp ress id - then - Lwt.return () - else - reallyTransmitFile - connFrom fspathFrom pathFrom fspathTo pathTo realPathTo - update desc (Osx.ressLength ress) id +let transferFileLocal connFrom + (fspathFrom, pathFrom, fspathTo, pathTo, realPathTo, + update, desc, fp, ress, ressOnly, id) = + if (not ressOnly) + && tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id + then Lwt.return () + else reallyTransferFile + connFrom fspathFrom pathFrom fspathTo pathTo realPathTo + update desc (Osx.ressLength ress) ressOnly id -let transmitFileOnRoot = - Remote.registerRootCmdWithConnection "transmitFile" transmitFileLocal +let transferFileOnRoot = + Remote.registerRootCmdWithConnection "transferFile" transferFileLocal -let transmitFile +let transferFile rootFrom pathFrom rootTo fspathTo pathTo realPathTo - update desc fp ress id = + update desc fp ress ressOnly id = let bufSz = bufferSize (max (Props.length desc) (Osx.ressLength ress)) in (* This must be on the client: any lock on the server side may result in a deadlock under windows *) - Lwt_util.run_in_region transmitFileReg bufSz (fun () -> + Lwt_util.run_in_region transferFileReg bufSz (fun () -> Abort.check id; - transmitFileOnRoot rootTo rootFrom + transferFileOnRoot rootTo rootFrom (snd rootFrom, pathFrom, fspathTo, pathTo, realPathTo, - update, desc, fp, ress, id)) + update, desc, fp, ress, ressOnly, id)) (****) -let file - rootFrom pathFrom rootTo fspathTo pathTo realPathTo - update desc fp ress id = +let copyprog = + Prefs.createString "copyprog" "rsync --partial --inplace" + "External program for copying large files" + ("A string giving the name (and command-line switches, if needed) of an " + ^ "external program that can be used to copy large files efficiently.") + +let copythreshold = + Prefs.createInt "copythreshold" (-1) + "If nonnegative, use copyprog to transfer files larger than this" + ("A number indicating above what filesize (in megabytes) Unison should " + ^ "use the external " + ^ "copying utility specified by {\\tt copyprog}. Specifying 0 will cause " + ^ "{\\em all} copies to use the external program; " + ^ "a negative number will prevent any files from using it. (Default is -1.)") + +let tryCopyMovedFileLocal connFrom + (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) = + Lwt.return (tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id) + +let tryCopyMovedFileOnRoot = + Remote.registerRootCmdWithConnection "tryCopyMovedFile" tryCopyMovedFileLocal + +let setFileinfoLocal connFrom (fspathTo, pathTo, desc) = + Lwt.return (Fileinfo.set fspathTo pathTo (`Set Props.fileDefault) desc) + +let setFileinfoOnRoot = + Remote.registerRootCmdWithConnection "setFileinfo" setFileinfoLocal + +let targetExistsWithCorrectSize fspathTo pathTo desc = + Os.exists fspathTo pathTo + && Props.length (Fileinfo.get false fspathTo pathTo).Fileinfo.desc = Props.length desc + +let targetExistsWithCorrectSizeLocal connFrom (fspathTo, pathTo, desc) = + Lwt.return (targetExistsWithCorrectSize fspathTo pathTo desc) + +let targetExistsWithCorrectSizeOnRoot = + Remote.registerRootCmdWithConnection + "targetExistsWithCorrectSize" targetExistsWithCorrectSizeLocal + +let transferFileUsingExternalCopyprog + rootFrom pathFrom rootTo fspathTo pathTo realPathTo + update desc fp ress id = + tryCopyMovedFileOnRoot rootTo rootFrom + (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) + >>= (fun b -> + if b then Lwt.return () + else begin + Trace.log (Printf.sprintf "Using external program to copy %s\n" + (Path.toString pathTo)); + Uutil.showProgress id Uutil.Filesize.zero "ext"; + let fromSpec = + (match fst rootFrom with Common.Local -> "" | Common.Remote h -> h ^ ":") + ^ (Fspath.concatToString (snd rootFrom) pathFrom) in + let toSpec = + (match fst rootTo with Common.Local -> "" | Common.Remote h -> h ^ ":") + ^ (Fspath.concatToString fspathTo pathTo) in + let cmd = (Prefs.read copyprog) ^ " " + ^ (Os.quotes fromSpec) ^ " " + ^ (Os.quotes toSpec) in + Trace.log (Printf.sprintf "%s\n" cmd); + (* FIX: When possible, we should run this in a Lwt, not sequentially. *) + let _,log = Os.runExternalProgram cmd in + debug (fun() -> Util.msg + "transferFileUsingExternalCopyprog: returned\n------\n%s\n-----\n" + (Util.trimWhitespace log)); + targetExistsWithCorrectSizeOnRoot rootTo rootFrom (fspathTo, pathTo, desc) + >>= (fun b -> + if not b then + raise (Util.Transient (Printf.sprintf + "External copy program did not create target file (or bad length): %s" + (Path.toString pathTo))); + Uutil.showProgress id (Props.length desc) "ext"; + Lwt.return ()) + end) + +let file rootFrom pathFrom rootTo fspathTo pathTo realPathTo + update desc fp ress id = debug (fun() -> Util.msg "copyRegFile(%s,%s) -> (%s,%s,%s,%s,%s)\n" (Common.root2string rootFrom) (Path.toString pathFrom) (Common.root2string rootTo) (Path.toString realPathTo) @@ -492,10 +566,46 @@ update desc (Osx.ressLength ress) (Some id); Lwt.return () | _ -> - transmitFile - rootFrom pathFrom rootTo fspathTo pathTo realPathTo - update desc fp ress id - end >>= (fun () -> + (* Check whether we actually need to copy the file (or whether it + already exists from some interrupted previous transfer) *) + targetExistsWithCorrectSizeOnRoot + rootTo rootFrom (fspathTo, pathTo, desc) >>= (fun b -> + if b then begin + debug (fun () -> + Util.msg "Skipping transfer of %s/%s because it's already there\n" + (Fspath.toString fspathTo) (Path.toString pathTo)); + Lwt.return () + (* Check whether we should use an external program to copy the + file *) + end else if + Prefs.read copyprog <> "" + && Prefs.read copythreshold >= 0 + && Props.length desc >= Uutil.Filesize.ofInt64 (Int64.mul + (Int64.of_int 1000000) + (Int64.of_int (Prefs.read copythreshold))) + && update = `Copy + then begin + (* First use the external program to copy the data fork *) + transferFileUsingExternalCopyprog + rootFrom pathFrom rootTo fspathTo pathTo realPathTo + update desc fp ress id >>= (fun () -> + (* Now use the regular transport mechanism to copy the resource + fork *) + begin if (Osx.ressLength ress) > Uutil.Filesize.zero then + transferFile + rootFrom pathFrom rootTo fspathTo pathTo realPathTo + update desc fp ress true id + else Lwt.return () + end >>= (fun() -> + (* Finally, initialize the file info *) + setFileinfoOnRoot rootTo rootFrom (fspathTo, pathTo, desc))) + end else + (* Just transfer the file in the usual way with Unison's + built-in facilities *) + transferFile + rootFrom pathFrom rootTo fspathTo pathTo realPathTo + update desc fp ress false id + ) end >>= (fun () -> Trace.showTimer timer; Lwt.return ()) Modified: trunk/src/fileinfo.ml =================================================================== --- trunk/src/fileinfo.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/fileinfo.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -36,9 +36,9 @@ (fun () -> try let stats = statFn fromRoot fspath path in -debugV (fun () -> - Util.msg "%s: %b %f %f\n" (Fspath.concatToString fspath path) - fromRoot stats.Unix.LargeFile.st_ctime stats.Unix.LargeFile.st_mtime); + debugV (fun () -> + Util.msg "%s: %b %f %f\n" (Fspath.concatToString fspath path) + fromRoot stats.Unix.LargeFile.st_ctime stats.Unix.LargeFile.st_mtime); let typ = match stats.Unix.LargeFile.st_kind with Unix.S_REG -> `FILE Modified: trunk/src/fileinfo.mli =================================================================== --- trunk/src/fileinfo.mli 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/fileinfo.mli 2008-06-21 15:17:48 UTC (rev 285) @@ -8,10 +8,9 @@ desc : Props.t; osX : Osx.info} val get : bool -> Fspath.t -> Path.local -> t -val set : - Fspath.t -> Path.local -> - [`Set of Props.t | `Copy of Path.local | `Update of Props.t] -> - Props.t -> unit +val set : Fspath.t -> Path.local -> + [`Set of Props.t | `Copy of Path.local | `Update of Props.t] -> + Props.t -> unit (* IF THIS CHANGES, MAKE SURE TO INCREMENT THE ARCHIVE VERSION NUMBER! *) type stamp = Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/files.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -128,8 +128,15 @@ Remote.registerRootCmd "mkdir" (fun (fspath,(workingDir,path)) -> - Os.createDir workingDir path Props.dirDefault; - Lwt.return (Fileinfo.get false workingDir path).Fileinfo.desc) + let createIt() = Os.createDir workingDir path Props.dirDefault in + if Os.exists workingDir path then + if (Fileinfo.get false workingDir path).Fileinfo.typ <> `DIRECTORY then begin + Os.delete workingDir path; + createIt() + end else () + else + createIt(); + Lwt.return (Fileinfo.get false workingDir path).Fileinfo.desc) let mkdir onRoot workingDir path = mkdirRemote onRoot (workingDir,path) @@ -301,7 +308,7 @@ let setupTargetPathsLocal (fspath, path) = let localPath = Update.translatePathLocal fspath path in let (workingDir,realPath) = Fspath.findWorkingDir fspath localPath in - let tempPath = Os.tempPath workingDir realPath in + let tempPath = Os.tempPath ~fresh:false workingDir realPath in Lwt.return (workingDir, realPath, tempPath, localPath) let setupTargetPaths = @@ -413,185 +420,37 @@ | Update.NoArchive -> assert false in + (* BCP (6/08): We used to have an unwindProtect here that would *always* do the + final performDelete. This was removed so that failed partial transfers can + be restarted. *) + Update.transaction (fun id -> + (* Update the archive on the source replica (but don't commit + the changes yet) and return the part of the new archive + corresponding to this path *) + Update.updateArchive rootFrom pathFrom uiFrom id + >>= (fun (localPathFrom, archFrom) -> + let make_backup = + (* Perform (asynchronously) a backup of the destination files *) + Update.updateArchive rootTo pathTo uiTo id + in + copyRec localPathFrom tempPathTo realPathTo archFrom >>= (fun () -> + make_backup >>= (fun _ -> + (* BCP: We put the unwindProtect here instead, so that we clean everything + up if there is a failure during the paranoid checking phase. *) Remote.Thread.unwindProtect (fun () -> - Update.transaction (fun id -> - (* Update the archive on the source replica (but don't commit - the changes yet) and return the part of the new archive - corresponding to this path *) - Update.updateArchive rootFrom pathFrom uiFrom id - >>= (fun (localPathFrom, archFrom) -> - let make_backup = - (* Perform (asynchronously) a backup of the destination files *) - Update.updateArchive rootTo pathTo uiTo id - in - copyRec localPathFrom tempPathTo realPathTo archFrom >>= (fun () -> - make_backup >>= (fun _ -> - Update.replaceArchive - rootTo pathTo (Some (workingDir, tempPathTo)) - archFrom id true >>= (fun _ -> - rename rootTo pathTo localPathTo workingDir tempPathTo realPathTo uiTo )))))) + Update.replaceArchive + rootTo pathTo (Some (workingDir, tempPathTo)) + archFrom id true >>= (fun _ -> + rename rootTo pathTo localPathTo workingDir tempPathTo realPathTo uiTo)) (fun _ -> - performDelete rootTo (Some workingDir, tempPathTo))) + debug (fun() -> Util.msg "Removing temp files\n"); + performDelete rootTo (Some workingDir, tempPathTo) )))))) -(* A PARTIALLY COMPLETE HACKED VERSION THAT COPIES DIRECTORIES IN PLACE -- Jan 14, 2006 - -(This is left here in case Jerome gets a chance to finish it...) - -let copy - update - rootFrom pathFrom (* copy from here... *) - uiFrom (* (and then check that this updateItem still - describes the current state of the src replica) *) - rootTo pathTo (* ...to here *) - uiTo (* (but, before committing the copy, check that - this updateItem still describes the current - state of the target replica) *) - id = (* for progress display *) - debug (fun() -> - Util.msg - "copy %s %s ---> %s %s \n" - (root2string rootFrom) (Path.toString pathFrom) - (root2string rootTo) (Path.toString pathTo)); - (* Inner loop for recursive copy... *) - let rec copyRec pFrom (* Path to copy from *) - pTo (* (Temp) path to copy to *) - f = (* Source archive subtree for this path *) - debug (fun() -> - Util.msg "copyRec %s --> %s\n" - (Path.toString pFrom) (Path.toString pTo)); - (* Calculate target paths *) - setupTargetPaths rootTo pTo - >>= (fun (workingDir, realPathTo, tempPathTo, _) -> - match f with - Update.ArchiveFile (desc, dig, stamp, ress) -> - Lwt_util.run_in_region copyReg 1 (fun () -> - Abort.check id; - Copy.file - rootFrom pFrom rootTo workingDir tempPathTo realPathTo - update desc dig ress id - >>= (fun () -> - checkContentsChange rootFrom pFrom desc dig stamp ress)) - | Update.ArchiveSymlink l -> - Lwt_util.run_in_region copyReg 1 (fun () -> - debug (fun() -> Util.msg "Making symlink %s/%s -> %s\n" - (root2string rootTo) (Path.toString pTo) l); - Abort.check id; - makeSymlink rootTo (workingDir, tempPathTo, l)) - | Update.ArchiveDir (desc, children) -> - Lwt_util.run_in_region copyReg 1 (fun () -> - debug (fun() -> Util.msg "Creating directory %s/%s\n" - (root2string rootTo) (Path.toString pTo)); - mkdir rootTo workingDir realPathTo) >>= (fun initialDesc -> - Abort.check id; - let runningThreads = ref [] in - Lwt.catch - (fun () -> - Update.NameMap.iter - (fun name child -> - let thread = - copyRec (Path.child pFrom name) - (Path.child pTo name) - child - in - runningThreads := thread :: !runningThreads) - children; - Lwt_util.join !runningThreads) - (fun e -> - (* If one thread fails (in a non-fatal way), we wait for - all other threads to terminate before continuing *) - if not (Abort.testException e) then Abort.file id; - match e with - Util.Transient _ -> - let e = ref e in - Lwt_util.iter - (fun act -> - Lwt.catch - (fun () -> act) - (fun e' -> - match e' with - Util.Transient _ -> - if Abort.testException !e then e := e'; - Lwt.return () - | _ -> - Lwt.fail e')) - !runningThreads >>= (fun () -> - Lwt.fail !e) - | _ -> - Lwt.fail e) >>= (fun () -> - Lwt_util.run_in_region copyReg 1 (fun () -> - (* We use the actual file permissions so as to preserve - inherited bits *) - Abort.check id; - setPropRemote rootTo - (workingDir, realPathTo, `Set initialDesc, desc)))) - | Update.NoArchive -> - assert false) - in - Update.transaction (fun id -> - (* Update the archive on the source replica (but don't commit - the changes yet) and return the part of the new archive - corresponding to this path *) - Update.updateArchive rootFrom pathFrom uiFrom id - >>= (fun (localPathFrom, archFrom) -> - (* Perform (asynchronously) a backup of the destination files *) - Update.updateArchive rootTo pathTo uiTo id >>= (fun _ -> -(* - Remote.Thread.unwindProtect - (fun () -> -*) - copyRec localPathFrom pathTo archFrom >>= (fun () -> -(* - rename rootTo pathTo workingDir tempPathTo realPathTo uiTo )) - (fun _ -> - performDelete rootTo (Some workingDir, tempPathTo)) >>= (fun () -> -*) - Update.replaceArchive - rootTo pathTo (Some (workingDir, tempPathTo)) - archFrom id true)))) - -*) - - (* ------------------------------------------------------------ *) -let readChannelTillEof c = - let rec loop lines = - try let l = input_line c in - loop (l::lines) - with End_of_file -> lines in - String.concat "\n" (Safelist.rev (loop [])) - -let readChannelTillEof_lwt c = - let rec loop lines = - let lo = - try - Some(Lwt_unix.run (Lwt_unix.input_line c)) - with End_of_file -> None - in - match lo with - Some l -> loop (l :: lines) - | None -> lines - in - String.concat "\n" (Safelist.rev (loop [])) - let (>>=) = Lwt.bind -let readChannelsTillEof l = - let rec suckitdry lines c = - Lwt.catch - (fun() -> Lwt_unix.input_line c >>= (fun l -> return (Some l))) - (fun e -> match e with End_of_file -> return None | _ -> raise e) - >>= (fun lo -> - match lo with - None -> return lines - | Some l -> suckitdry (l :: lines) c) in - Lwt_util.map - (fun c -> - suckitdry [] c - >>= (fun res -> return (String.concat "\n" (Safelist.rev res)))) - l - let diffCmd = Prefs.createString "diff" "diff -u CURRENT2 CURRENT1" "*command for showing differences between files" @@ -603,16 +462,6 @@ ^ "diffed. If not, the two filenames will be appended to the command. In both " ^ "cases, the filenames are suitably quoted.") -(* Using single quotes is simpler under Unix but they are not accepted - by the Windows shell. Double quotes without further quoting is - sufficient with Windows as filenames are not allowed to contain - double quotes. *) -let quotes s = - if Util.osType = `Win32 && not Util.isCygwin then - "\"" ^ s ^ "\"" - else - "'" ^ Util.replacesubstring s "'" "'\''" ^ "'" - let tempName s = Os.tempFilePrefix ^ s let rec diff root1 path1 ui1 root2 path2 ui2 showDiff id = @@ -625,12 +474,12 @@ let cmd = if Util.findsubstring "CURRENT1" (Prefs.read diffCmd) = None then (Prefs.read diffCmd) - ^ " " ^ (quotes (Fspath.toString fspath1)) - ^ " " ^ (quotes (Fspath.toString fspath2)) + ^ " " ^ (Os.quotes (Fspath.toString fspath1)) + ^ " " ^ (Os.quotes (Fspath.toString fspath2)) else Util.replacesubstrings (Prefs.read diffCmd) - ["CURRENT1", quotes (Fspath.toString fspath1); - "CURRENT2", quotes (Fspath.toString fspath2)] in + ["CURRENT1", Os.quotes (Fspath.toString fspath1); + "CURRENT2", Os.quotes (Fspath.toString fspath2)] in (* Doesn't seem to work well on Windows! let c = Lwt_unix.run (Lwt_unix.open_process_in cmd) in *) let c = Unix.open_process_in @@ -640,7 +489,7 @@ "\"" ^ cmd ^ "\"" else cmd) in - showDiff cmd (readChannelTillEof c); + showDiff cmd (Os.readChannelTillEof c); ignore (Unix.close_process_in c) in let (desc1, fp1, ress1, desc2, fp2, ress2) = Common.fileInfos ui1 ui2 in match root1,root2 with @@ -887,47 +736,15 @@ let dig2 = Os.fingerprint workingDirForMerge working2 info2 in let cmd = formatMergeCmd path - (quotes (Fspath.concatToString workingDirForMerge working1)) - (quotes (Fspath.concatToString workingDirForMerge working2)) - (match arch with None -> None | Some f -> Some(quotes (Fspath.toString f))) - (quotes (Fspath.concatToString workingDirForMerge new1)) - (quotes (Fspath.concatToString workingDirForMerge new2)) - (quotes (Fspath.concatToString workingDirForMerge newarch)) in + (Os.quotes (Fspath.concatToString workingDirForMerge working1)) + (Os.quotes (Fspath.concatToString workingDirForMerge working2)) + (match arch with None -> None | Some f -> Some(Os.quotes (Fspath.toString f))) + (Os.quotes (Fspath.concatToString workingDirForMerge new1)) + (Os.quotes (Fspath.concatToString workingDirForMerge new2)) + (Os.quotes (Fspath.concatToString workingDirForMerge newarch)) in Trace.log (Printf.sprintf "Merge command: %s\n" cmd); - let returnValue, mergeResultLog = - if Util.osType = `Win32 && not Util.isCygwin then - let c = Unix.open_process_in ("\"" ^ cmd ^ "\"") in - let mergeLog = readChannelTillEof c in - let returnValue = Unix.close_process_in c in - - let mergeResultLog = - cmd ^ - (if mergeLog <> "" then "\n\n" ^ mergeLog else "") ^ - (if returnValue <> Unix.WEXITED 0 then - "\n\n" ^ Util.process_status_to_string returnValue - else - "") in - (returnValue,mergeResultLog) - else Lwt_unix.run ( - Lwt_unix.open_process_full cmd (Unix.environment ()) - >>= (fun (out, ipt, err) -> - readChannelsTillEof [out;err] - >>= (function [mergeLogOut;mergeLogErr] -> - Lwt_unix.close_process_full (out, ipt, err) - >>= (fun returnValue -> - return (returnValue, ( - cmd - ^ "\n\n" ^ - (if mergeLogOut = "" || mergeLogErr = "" - then mergeLogOut ^ mergeLogErr - else mergeLogOut ^ "\n\n" ^ ("Error Output:"^mergeLogErr)) - ^"\n\n" - ^ (if returnValue = Unix.WEXITED 0 - then "" - else Util.process_status_to_string returnValue)))) - (* Stop typechechecker from complaining about non-exhaustive pattern above *) - | _ -> assert false))) in + let returnValue, mergeResultLog = Os.runExternalProgram cmd in Trace.log (Printf.sprintf "Merge result (%s):\n%s\n" (showStatus returnValue) mergeResultLog); Modified: trunk/src/lwt/lwt_unix.ml =================================================================== --- trunk/src/lwt/lwt_unix.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/lwt/lwt_unix.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -406,7 +406,15 @@ Unix.close in_write; Lwt.return (inchan, outchan))) -let open_proc_full cmd env proc input output error toclose = +(* FIX: Subprocesses that use /dev/tty to print things on the terminal + will NOT have this output captured and returned to the caller of this + function. There's an argument that this is correct, but if we are + running from a GUI the user may not be looking at any terminal and it + will appear that the process is just hanging. This can be fixed, in + principle, by writing a little C code that opens /dev/tty and then uses + the TIOCNOTTY ioctl control to detach the terminal. *) + +let open_proc_full cmd env proc output input error toclose = match Unix.fork () with 0 -> Unix.dup2 input Unix.stdin; Unix.close input; Unix.dup2 output Unix.stdout; Unix.close output; @@ -420,15 +428,15 @@ Lwt.bind (pipe ()) (fun (in_read, in_write) -> Lwt.bind (pipe ()) (fun (out_read, out_write) -> Lwt.bind (pipe ()) (fun (err_read, err_write) -> - let inchan = Unix.in_channel_of_descr in_read in - let outchan = Unix.out_channel_of_descr out_write in + let inchan = Unix.out_channel_of_descr in_write in + let outchan = Unix.in_channel_of_descr out_read in let errchan = Unix.in_channel_of_descr err_read in - open_proc_full cmd env (Process_full(inchan, outchan, errchan)) - out_read in_write err_write [in_read; out_write; err_read]; - Unix.close out_read; - Unix.close in_write; + open_proc_full cmd env (Process_full(outchan, inchan, errchan)) + out_write in_read err_write [in_write; out_read; err_read]; + Unix.close out_write; + Unix.close in_read; Unix.close err_write; - Lwt.return (inchan, outchan, errchan)))) + Lwt.return (outchan, inchan, errchan)))) let find_proc_id fun_name proc = try @@ -453,9 +461,9 @@ close_in inchan; close_out outchan; Lwt.bind (waitpid [] pid) (fun (_, status) -> Lwt.return status) -let close_process_full (inchan, outchan, errchan) = +let close_process_full (outchan, inchan, errchan) = let pid = find_proc_id "close_process_full" - (Process_full(inchan, outchan, errchan)) in - close_in inchan; close_out outchan; close_in errchan; + (Process_full(outchan, inchan, errchan)) in + close_out inchan; close_in outchan; close_in errchan; Lwt.bind (waitpid [] pid) (fun (_, status) -> Lwt.return status) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/mkProjectInfo.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -5,8 +5,8 @@ let projectName = "unison" let majorVersion = 2 -let minorVersion = 28 -let pointVersionOrigin = 229 (* Revision that corresponds to point version 0 *) +let minorVersion = 29 +let pointVersionOrigin = 284 (* Revision that corresponds to point version 0 *) (* Documentation: This is a program to construct a version of the form Major.Minor.Point, @@ -70,3 +70,4 @@ + Modified: trunk/src/os.ml =================================================================== --- trunk/src/os.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/os.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -30,6 +30,20 @@ (*****************************************************************************) +(* ESCAPING SHELL PARAMETERS *) +(*****************************************************************************) + +(* Using single quotes is simpler under Unix but they are not accepted + by the Windows shell. Double quotes without further quoting is + sufficient with Windows as filenames are not allowed to contain + double quotes. *) +let quotes s = + if Util.osType = `Win32 && not Util.isCygwin then + "\"" ^ s ^ "\"" + else + "'" ^ Util.replacesubstring s "'" "'\''" ^ "'" + +(*****************************************************************************) (* QUERYING THE FILESYSTEM *) (*****************************************************************************) @@ -108,10 +122,18 @@ Util.startswith file tempFilePrefix then begin if Util.endswith file !tempFileSuffix then begin - let newPath = Path.child path filename in - debug (fun()-> Util.msg "deleting old temp file %s\n" - (Fspath.concatToString fspath newPath)); - delete fspath newPath + let p = Path.child path filename in + let i = Fileinfo.get false fspath p in + let secondsinaweek = 604800.0 in + if Props.time i.Fileinfo.desc +. secondsinaweek < Util.time() + then begin + debug (fun()-> Util.msg "deleting old temp file %s\n" + (Fspath.concatToString fspath p)); + delete fspath p + end else + debug (fun()-> Util.msg + "keeping temp file %s since it is less than a week old\n" + (Fspath.concatToString fspath p)); end; false end else @@ -289,7 +311,7 @@ (*****************************************************************************) (* Generates an unused fspath for a temporary file. *) -let freshPath fspath path prefix suffix = +let genTempPath fresh fspath path prefix suffix = let rec f i = let s = if i=0 then suffix @@ -299,11 +321,11 @@ (Path.addSuffixToFinalName path s) prefix in - if exists fspath tempPath then f (i + 1) else tempPath + if fresh && exists fspath tempPath then f (i + 1) else tempPath in f 0 -let tempPath fspath path = - freshPath fspath path tempFilePrefix !tempFileSuffix +let tempPath ?(fresh=true) fspath path = + genTempPath fresh fspath path tempFilePrefix !tempFileSuffix (*****************************************************************************) (* INTERRUPTED SYSTEM CALLS *) @@ -318,3 +340,81 @@ try Unix.accept fd with Unix.Unix_error(Unix.EINTR,_,_) -> loop() in loop() + + +(*****************************************************************************) +(* RUNNING EXTERNAL PROGRAMS *) +(*****************************************************************************) + +let (>>=) = Lwt.bind +open Lwt + +let readChannelTillEof c = + let rec loop lines = + try let l = input_line c in + loop (l::lines) + with End_of_file -> lines in + String.concat "\n" (Safelist.rev (loop [])) + +let readChannelTillEof_lwt c = + let rec loop lines = + let lo = + try + Some(Lwt_unix.run (Lwt_unix.input_line c)) + with End_of_file -> None + in + match lo with + Some l -> loop (l :: lines) + | None -> lines + in + String.concat "\n" (Safelist.rev (loop [])) + +let readChannelsTillEof l = + let rec suckitdry lines c = + Lwt.catch + (fun() -> Lwt_unix.input_line c >>= (fun l -> return (Some l))) + (fun e -> match e with End_of_file -> return None | _ -> raise e) + >>= (fun lo -> + match lo with + None -> return lines + | Some l -> suckitdry (l :: lines) c) in + Lwt_util.map + (fun c -> + suckitdry [] c + >>= (fun res -> return (String.concat "\n" (Safelist.rev res)))) + l + +let runExternalProgram cmd = + if Util.osType = `Win32 && not Util.isCygwin then begin + debug (fun()-> Util.msg "Executing external program windows-style\n"); + let c = Unix.open_process_in ("\"" ^ cmd ^ "\"") in + let mergeLog = readChannelTillEof c in + let returnValue = Unix.close_process_in c in + let mergeResultLog = + cmd ^ + (if mergeLog <> "" then "\n\n" ^ mergeLog else "") ^ + (if returnValue <> Unix.WEXITED 0 then + "\n\n" ^ Util.process_status_to_string returnValue + else + "") in + (returnValue,mergeResultLog) + end else Lwt_unix.run ( + debug (fun()-> Util.msg "Executing external program unix-style\n"); + Lwt_unix.open_process_full cmd (Unix.environment ()) + >>= (fun (out, ipt, err) -> + readChannelsTillEof [out;err] + >>= (function [mergeLogOut;mergeLogErr] -> + Lwt_unix.close_process_full (out, ipt, err) + >>= (fun returnValue -> + return (returnValue, ( + cmd + ^ "\n\n" ^ + (if mergeLogOut = "" || mergeLogErr = "" + then mergeLogOut ^ mergeLogErr + else mergeLogOut ^ "\n\n" ^ ("Error Output:"^mergeLogErr)) + ^"\n\n" + ^ (if returnValue = Unix.WEXITED 0 + then "" + else Util.process_status_to_string returnValue)))) + (* Stop typechechecker from complaining about non-exhaustive pattern above *) + | _ -> assert false))) Modified: trunk/src/os.mli =================================================================== --- trunk/src/os.mli 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/os.mli 2008-06-21 15:17:48 UTC (rev 285) @@ -3,7 +3,7 @@ val myCanonicalHostName : string -val tempPath : Fspath.t -> Path.local -> Path.local +val tempPath : ?fresh:bool -> Fspath.t -> Path.local -> Path.local val tempFilePrefix : string val includeInTempNames : string -> unit @@ -54,3 +54,6 @@ ((Fspath.t * Path.local) -> (Fspath.t * Path.local) -> unit) -> unit +val readChannelTillEof : in_channel -> string +val runExternalProgram : string -> Unix.process_status * string +val quotes : string -> string Modified: trunk/src/remote.ml =================================================================== --- trunk/src/remote.ml 2008-06-04 14:30:56 UTC (rev 284) +++ trunk/src/remote.ml 2008-06-21 15:17:48 UTC (rev 285) @@ -343,11 +343,22 @@ else String.sub s p len +(* An integer just a little smaller than the maximum representable in 30 bits *) +let hugeint = 1000000000 + let safeMarshal marshalPayload tag data rem = let (rem', length) = marshalPayload data rem in + if length > hugeint then begin + let start = first_chars (min length 10) rem' in + let start = if length > 10 then start ^ "..." else start in + let start = String.escaped start in + Util.msg "Fatal error in safeMarshal: sending too many (%d) bytes with tag %s and contents [%s]\n" length tag start; + raise (Util.Fatal ((Printf.sprintf + "Message payload too large (%d, %s, [%s]). \n" length tag start) + ^ "This is a bug in Unison; if it happens to you in a repeatable way, \n" + ^ "please post a report on the unison-users mailing list.")) + end; let l = String.length tag in - assert (length > 0); (* tracking down an assert failure in receivePacket... *) - assert (l > 0); debugE (fun() -> let start = first_chars (min length 10) rem' in let start = if length > 10 then start ^ "..." else start in @@ -585,7 +596,7 @@ type msgId = int module MsgIdMap = Map.Make (struct type t = msgId let compare = compare end) let ids = ref 1 -let newMsgId () = incr ids; if !ids = 1000000000 then ids := 2; !ids +let newMsgId () = incr ids; if !ids = hugeint then ids := 2; !ids (* Threads waiting for a response from the other side *) let receivers = ref MsgIdMap.empty From schmitta at seas.upenn.edu Sat Jun 21 11:20:43 2008 From: schmitta at seas.upenn.edu (ALAN SCHMITT) Date: Sat, 21 Jun 2008 11:20:43 -0400 Subject: [Unison-hackers] [unison-svn] r286 - trunk/src Message-ID: <200806211520.m5LFKhiZ023410@yaws.seas.upenn.edu> Author: schmitta Date: 2008-06-21 11:20:39 -0400 (Sat, 21 Jun 2008) New Revision: 286 Modified: trunk/src/RECENTNEWS trunk/src/files.mli trunk/src/mkProjectInfo.ml trunk/src/remote.mli trunk/src/transport.ml Log: Follow maxthreads preference when transferring directories. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-21 15:17:48 UTC (rev 285) +++ trunk/src/RECENTNEWS 2008-06-21 15:20:39 UTC (rev 286) @@ -1,3 +1,7 @@ +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 Modified: trunk/src/files.mli =================================================================== --- trunk/src/files.mli 2008-06-21 15:17:48 UTC (rev 285) +++ trunk/src/files.mli 2008-06-21 15:20:39 UTC (rev 286) @@ -13,6 +13,10 @@ -> Common.updateItem (* updates that will be discarded *) -> unit Lwt.t +(* Region used for the copying. Exported to be correctly set in transport.ml *) +(* to the maximum number of threads *) +val copyReg : Lwt_util.region + (* Copy a path in one replica to another path in a second replica. The copy *) (* is performed atomically (or as close to atomically as the os will *) (* support) using temporary files. *) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-21 15:17:48 UTC (rev 285) +++ trunk/src/mkProjectInfo.ml 2008-06-21 15:20:39 UTC (rev 286) @@ -71,3 +71,4 @@ + Modified: trunk/src/remote.mli =================================================================== --- trunk/src/remote.mli 2008-06-21 15:17:48 UTC (rev 285) +++ trunk/src/remote.mli 2008-06-21 15:20:39 UTC (rev 286) @@ -96,7 +96,7 @@ val registerRootCmdWithConnection : string (* command name *) -> (connection -> 'a -> 'b Lwt.t) (* local command *) - -> Common.root (* root on with the command is executed *) + -> Common.root (* root on which the command is executed *) -> Common.root (* other root *) -> 'a (* additional arguments *) -> 'b Lwt.t (* result *) Modified: trunk/src/transport.ml =================================================================== --- trunk/src/transport.ml 2008-06-21 15:17:48 UTC (rev 285) +++ trunk/src/transport.ml 2008-06-21 15:20:39 UTC (rev 286) @@ -72,6 +72,7 @@ let doAction (fromRoot,toRoot) path fromContents toContents id = Lwt_util.resize_region actionReg (Prefs.read maxthreads); + Lwt_util.resize_region Files.copyReg (Prefs.read maxthreads); Lwt_util.run_in_region actionReg 1 (fun () -> if not !Trace.sendLogMsgsToStderr then Trace.statusDetail (Path.toString path); From bcpierce at seas.upenn.edu Sat Jun 21 12:06:30 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Sat, 21 Jun 2008 12:06:30 -0400 Subject: [Unison-hackers] [unison-svn] r287 - trunk/src Message-ID: <200806211606.m5LG6UeT025042@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-21 12:06:27 -0400 (Sat, 21 Jun 2008) New Revision: 287 Modified: trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/globals.ml trunk/src/globals.mli trunk/src/mkProjectInfo.ml Log: * Automatically supply "user@" in argument to external copy program. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-21 15:20:39 UTC (rev 286) +++ trunk/src/RECENTNEWS 2008-06-21 16:06:27 UTC (rev 287) @@ -1,3 +1,9 @@ +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. Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-21 15:20:39 UTC (rev 286) +++ trunk/src/copy.ml 2008-06-21 16:06:27 UTC (rev 287) @@ -479,8 +479,13 @@ let copyprog = Prefs.createString "copyprog" "rsync --partial --inplace" "External program for copying large files" - ("A string giving the name (and command-line switches, if needed) of an " - ^ "external program that can be used to copy large files efficiently.") + ("A string giving the name of an " + ^ "external program that can be used to copy large files efficiently " + ^ "(plus command-line switches " + ^ "telling it to copy files in-place and to resume" + ^ "interrupted transfers). " + ^ "The default setting invokes {\\tt rsync} with appropriate " + ^ "options---most users should not need to change it.") let copythreshold = Prefs.createInt "copythreshold" (-1) @@ -515,6 +520,25 @@ Remote.registerRootCmdWithConnection "targetExistsWithCorrectSize" targetExistsWithCorrectSizeLocal +let formatConnectionInfo root = + match root with + Common.Local, _ -> "" + | Common.Remote h, _ -> + (* Find the (unique) nonlocal root *) + match + Safelist.find (function Clroot.ConnectLocal _ -> false | _ -> true) + (Safelist.map Clroot.parseRoot (Globals.rawRoots())) + with + Clroot.ConnectByShell (_,h',uo,_,_) -> + (match uo with None -> "" | Some u -> u ^ "@") + ^ h ^ ":" + (* Note that we don't do anything with the port -- hopefully + this will not affect many people. If we did want to include it, + we'd have to fiddle with the rsync parameters in a deeper way. *) + | Clroot.ConnectBySocket (h',_,_) -> + h ^ ":" + | Clroot.ConnectLocal _ -> assert false + let transferFileUsingExternalCopyprog rootFrom pathFrom rootTo fspathTo pathTo realPathTo update desc fp ress id = @@ -527,10 +551,10 @@ (Path.toString pathTo)); Uutil.showProgress id Uutil.Filesize.zero "ext"; let fromSpec = - (match fst rootFrom with Common.Local -> "" | Common.Remote h -> h ^ ":") + (formatConnectionInfo rootFrom) ^ (Fspath.concatToString (snd rootFrom) pathFrom) in let toSpec = - (match fst rootTo with Common.Local -> "" | Common.Remote h -> h ^ ":") + (formatConnectionInfo rootTo) ^ (Fspath.concatToString fspathTo pathTo) in let cmd = (Prefs.read copyprog) ^ " " ^ (Os.quotes fromSpec) ^ " " Modified: trunk/src/globals.ml =================================================================== --- trunk/src/globals.ml 2008-06-21 15:20:39 UTC (rev 286) +++ trunk/src/globals.ml 2008-06-21 16:06:27 UTC (rev 287) @@ -42,7 +42,7 @@ let roots = rawRoots () in if Safelist.length roots <> 2 then raise (Util.Fatal (Printf.sprintf - "Wrong number of roots: 2 expected, but %d provided (%s)\n(Maybe you gave roots both on the command line and in the profile?)" + "Wrong number of roots: 2 expected, but %d provided (%s)\n(Maybe you specified roots both on the command line and in the profile?)" (Safelist.length roots) (String.concat ", " roots) )); Safelist.fold_right Modified: trunk/src/globals.mli =================================================================== --- trunk/src/globals.mli 2008-06-21 15:20:39 UTC (rev 286) +++ trunk/src/globals.mli 2008-06-21 16:06:27 UTC (rev 287) @@ -12,6 +12,7 @@ (* Parse and canonize roots from their raw names *) val installRoots : (string -> string -> string) option -> unit Lwt.t +(* An alternate method (under development?) *) val installRoots2 : unit -> unit (* The roots of the synchronization (with names canonized, but in the same *) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-21 15:20:39 UTC (rev 286) +++ trunk/src/mkProjectInfo.ml 2008-06-21 16:06:27 UTC (rev 287) @@ -72,3 +72,4 @@ + From bcpierce at seas.upenn.edu Sun Jun 22 08:49:23 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Sun, 22 Jun 2008 08:49:23 -0400 Subject: [Unison-hackers] [unison-svn] r288 - in trunk: doc src Message-ID: <200806221249.m5MCnNpc003792@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-22 08:49:20 -0400 (Sun, 22 Jun 2008) New Revision: 288 Modified: trunk/doc/contactsbody.tex trunk/doc/unison-manual.tex trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/mkProjectInfo.ml Log: * Updated documentation to describe new features * Changed units of copythreshold to kilobytes * Added -z to flags for external rsync program Modified: trunk/doc/contactsbody.tex =================================================================== --- trunk/doc/contactsbody.tex 2008-06-21 16:06:27 UTC (rev 287) +++ trunk/doc/contactsbody.tex 2008-06-22 12:49:20 UTC (rev 288) @@ -3,7 +3,10 @@ Moderated mailing lists are available for bug reporting, announcements of new versions, discussions among users, and discussions among developers. See -\ONEURL{http://www.cis.upenn.edu/\home{bcpierce}/unison/lists.html} for more +\begin{quote} +\ONEURL{http://www.cis.upenn.edu/\home{bcpierce}/unison/lists.html} +\end{quote} +for more information. \endinput Modified: trunk/doc/unison-manual.tex =================================================================== --- trunk/doc/unison-manual.tex 2008-06-21 16:06:27 UTC (rev 287) +++ trunk/doc/unison-manual.tex 2008-06-22 12:49:20 UTC (rev 288) @@ -49,7 +49,7 @@ \huge {\ifhevea\black\else\bf \fi User Manual and Reference Guide}% \ifhevea \\ \else \\[6ex] \fi% \LARGE% - Version \unisonversion \\ % + Version \unisonversion \\[4ex] % % \today % \large Copyright 1998-2008, Benjamin C. Pierce \end{center}% @@ -2022,6 +2022,39 @@ rshargs = -C}'' to your profile. +\SUBSECTION{Making Unison Faster on Large Files}{speeding} + +Unison's built-in implementation of the rsync algorithm makes transferring +updates to existing files pretty fast. However, for whole-file copies, the +built-in transfer method is not highly optimized. Also, if Unison is +interrupted in the middle of transferring a large file, it will attempt to +retransfer the whole thing on the next run. + +These shortcomings can be addressed by telling Unison to use an external +file copying utility for whole-file transfers. The recommended one is the +standalone {\tt rsync} tool, which is available by default on most Unix +systems and can easily be installed on Windows systems using Cygwin. + +If you have {\tt rsync} installed on both hosts, you can make Unison use it +simply by setting the {\tt copythreshold} flag to something non-negative. +If you set it to 0, Unison will use the external copy utility for {\em all} +whole-file transfers. (This is probably slower than letting Unison copy +small files by itself, but can be useful for testing.) If you set it to a +larger value, Unison will use the external utility for all files larger than +this size (which is given in kilobytes, so setting it to 1000 will cause the +external tool to be used for all transfers larger than a megabyte). + +If you want to use a different external copy utility, set the {\tt copyprog} +preference. + +If a {\em directory} transfer is interrupted, the next run of Unison will +skip any files that were completely transferred before the interruption. +Note, though, that the new directory will not appear in the destination +filesystem until everything has been transferred---partially transferred +directories are kept in a temporary location (with names like {\tt + .unison.DIRNAME....}) until the transfer is complete. + + \SUBSECTION{Fast Update Detection}{fastcheck} If your replicas are large and at least one of them is on a Windows Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-21 16:06:27 UTC (rev 287) +++ trunk/src/RECENTNEWS 2008-06-22 12:49:20 UTC (rev 288) @@ -1,3 +1,11 @@ +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. Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-21 16:06:27 UTC (rev 287) +++ trunk/src/copy.ml 2008-06-22 12:49:20 UTC (rev 288) @@ -477,7 +477,7 @@ (****) let copyprog = - Prefs.createString "copyprog" "rsync --partial --inplace" + Prefs.createString "copyprog" "rsync --partial --inplace --compress" "External program for copying large files" ("A string giving the name of an " ^ "external program that can be used to copy large files efficiently " @@ -490,11 +490,13 @@ let copythreshold = Prefs.createInt "copythreshold" (-1) "If nonnegative, use copyprog to transfer files larger than this" - ("A number indicating above what filesize (in megabytes) Unison should " + ("A number indicating above what filesize (in kilobytes) Unison should " ^ "use the external " ^ "copying utility specified by {\\tt copyprog}. Specifying 0 will cause " ^ "{\\em all} copies to use the external program; " - ^ "a negative number will prevent any files from using it. (Default is -1.)") + ^ "a negative number will prevent any files from using it. " + ^ "The default is -1. " + ^ "\\sectionref{speeding}{Making Unison Faster on Large Files}") let tryCopyMovedFileLocal connFrom (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) = @@ -605,7 +607,7 @@ Prefs.read copyprog <> "" && Prefs.read copythreshold >= 0 && Props.length desc >= Uutil.Filesize.ofInt64 (Int64.mul - (Int64.of_int 1000000) + (Int64.of_int 1000) (Int64.of_int (Prefs.read copythreshold))) && update = `Copy then begin Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-21 16:06:27 UTC (rev 287) +++ trunk/src/mkProjectInfo.ml 2008-06-22 12:49:20 UTC (rev 288) @@ -73,3 +73,4 @@ + From bcpierce at seas.upenn.edu Mon Jun 23 18:06:46 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Mon, 23 Jun 2008 18:06:46 -0400 Subject: [Unison-hackers] [unison-svn] r289 - in trunk: doc src src/lwt src/ubase src/uimacnew Message-ID: <200806232206.m5NM6kbN010761@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-23 18:05:17 -0400 (Mon, 23 Jun 2008) New Revision: 289 Modified: trunk/doc/unison-manual.tex trunk/src/RECENTNEWS 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/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/osxsupport.c 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/ProgressCell.m 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: * 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. :-) Modified: trunk/doc/unison-manual.tex =================================================================== --- trunk/doc/unison-manual.tex 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/doc/unison-manual.tex 2008-06-23 22:05:17 UTC (rev 289) @@ -2042,7 +2042,7 @@ small files by itself, but can be useful for testing.) If you set it to a larger value, Unison will use the external utility for all files larger than this size (which is given in kilobytes, so setting it to 1000 will cause the -external tool to be used for all transfers larger than a megabyte). +external tool to be used for all transfers larger than a megabyte). If you want to use a different external copy utility, set the {\tt copyprog} preference. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/RECENTNEWS 2008-06-23 22:05:17 UTC (rev 289) @@ -1,3 +1,16 @@ +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 Modified: trunk/src/abort.ml =================================================================== --- trunk/src/abort.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/abort.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/abort.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let debug = Trace.debug "abort" Modified: trunk/src/case.ml =================================================================== --- trunk/src/case.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/case.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/case.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* 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 *) Modified: trunk/src/case.mli =================================================================== --- trunk/src/case.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/case.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/case.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) val insensitive : unit -> bool Modified: trunk/src/checksum.ml =================================================================== --- trunk/src/checksum.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/checksum.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/checksum.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* 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 *) Modified: trunk/src/checksum.mli =================================================================== --- trunk/src/checksum.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/checksum.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/checksum.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type t = int type u = int array Modified: trunk/src/clroot.ml =================================================================== --- trunk/src/clroot.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/clroot.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/clroot.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* This file parses the unison command-line arguments that Modified: trunk/src/clroot.mli =================================================================== --- trunk/src/clroot.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/clroot.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/clroot.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Command-line roots *) type clroot = Modified: trunk/src/common.ml =================================================================== --- trunk/src/common.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/common.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/common.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type hostname = string Modified: trunk/src/common.mli =================================================================== --- trunk/src/common.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/common.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/common.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (***************************************************************************) (* COMMON TYPES USED BY ALL MODULES *) Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/copy.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/copy.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let (>>=) = Lwt.bind @@ -326,8 +326,13 @@ (if ressOnly then (* Skip data fork *) Lwt.return () - else + else begin (* Data fork *) + if Os.exists fspathTo pathTo then begin + debug (fun() -> Util.msg "Removing old temp file %s / %s\n" + (Fspath.toString fspathTo) (Path.toString pathTo)); + Os.delete fspathTo pathTo + end; startReceivingFile fspathTo pathTo realPathTo `DATA update srcFileSize id file_id >>= (fun (outfd, infd, firstBi, remBi) -> @@ -348,7 +353,7 @@ Remote.MsgIdMap.remove file_id !decompressor; (* For GC *) close_all_no_error infd outfd; Lwt.fail e) - )) >>= (fun () -> + )end) >>= (fun () -> (* Resource fork *) (if ressLength > Uutil.Filesize.zero then begin Modified: trunk/src/fileinfo.ml =================================================================== --- trunk/src/fileinfo.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fileinfo.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileinfo.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let debugV = Util.debug "fileinfo+" Modified: trunk/src/fileinfo.mli =================================================================== --- trunk/src/fileinfo.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fileinfo.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileinfo.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type typ = [`ABSENT | `FILE | `DIRECTORY | `SYMLINK] val type2string : typ -> string Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/files.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/files.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common open Lwt @@ -884,6 +884,7 @@ (Path.toString path)); if not (Stasher.shouldBackupCurrent path) then Util.msg "Warning: 'backupcurrent' is not set for path %s\n" (Path.toString path); + Stasher.stashCurrentVersion workingDirForMerge localPath1 (Some workingarch); let infoarch = Fileinfo.get false workingDirForMerge workingarch in let dig = Os.fingerprint arch_fspath Path.empty infoarch in debug (fun () -> Util.msg "New digest is %s\n" (Os.fullfingerprint_to_string dig)); Modified: trunk/src/files.mli =================================================================== --- trunk/src/files.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/files.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/files.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fileutil.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileutil.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Convert backslashes in a string to forward slashes. Useful in Windows. *) let backslashes2forwardslashes s0 = Modified: trunk/src/fileutil.mli =================================================================== --- trunk/src/fileutil.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fileutil.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileutil.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fingerprint.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fingerprint.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* NOTE: IF YOU CHANGE TYPE "FINGERPRINT", THE ARCHIVE FORMAT CHANGES; *) (* INCREMENT "UPDATE.ARCHIVEFORMAT" *) Modified: trunk/src/fingerprint.mli =================================================================== --- trunk/src/fingerprint.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fingerprint.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fingerprint.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type t Modified: trunk/src/fspath.ml =================================================================== --- trunk/src/fspath.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fspath.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fspath.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Defines an abstract type of absolute filenames (fspaths). Keeping the *) (* type abstract lets us enforce some invariants which are important for *) Modified: trunk/src/fspath.mli =================================================================== --- trunk/src/fspath.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/fspath.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fspath.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Defines an abstract type of absolute filenames (fspaths) *) Modified: trunk/src/globals.ml =================================================================== --- trunk/src/globals.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/globals.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/globals.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common Modified: trunk/src/globals.mli =================================================================== --- trunk/src/globals.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/globals.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/globals.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/linkgtk.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/linkgtk.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module TopLevel = Main.Body(Uigtk.Body) Modified: trunk/src/linkgtk2.ml =================================================================== --- trunk/src/linkgtk2.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/linkgtk2.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/linkgtk2.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module TopLevel = Main.Body(Uigtk2.Body) Modified: trunk/src/linktext.ml =================================================================== --- trunk/src/linktext.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/linktext.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/linktext.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module TopLevel = Main.Body(Uitext.Body) Modified: trunk/src/linktk.ml =================================================================== --- trunk/src/linktk.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/linktk.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/linktk.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module TopLevel = Main.Body(Uitk.Body) Modified: trunk/src/lock.ml =================================================================== --- trunk/src/lock.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/lock.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lock.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let rename oldFile newFile = begin try Unix.link oldFile newFile with Unix.Unix_error _ -> () end; Modified: trunk/src/lock.mli =================================================================== --- trunk/src/lock.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/lock.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lock.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/lwt/pqueue.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lwt/pqueue.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module type OrderedType = sig Modified: trunk/src/lwt/pqueue.mli =================================================================== --- trunk/src/lwt/pqueue.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/lwt/pqueue.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lwt/pqueue.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module type OrderedType = sig Modified: trunk/src/main.ml =================================================================== --- trunk/src/main.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/main.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/main.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* ---------------------------------------------------------------------- *) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/mkProjectInfo.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -74,3 +74,4 @@ + Modified: trunk/src/name.ml =================================================================== --- trunk/src/name.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/name.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/name.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* NOTE: IF YOU CHANGE TYPE "NAME", THE ARCHIVE FORMAT CHANGES; INCREMENT "UPDATE.ARCHIVEFORMAT" *) Modified: trunk/src/name.mli =================================================================== --- trunk/src/name.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/name.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/name.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type t Modified: trunk/src/os.ml =================================================================== --- trunk/src/os.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/os.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/os.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* This file attempts to isolate operating system specific details from the *) (* rest of the program. *) @@ -388,11 +388,11 @@ if Util.osType = `Win32 && not Util.isCygwin then begin debug (fun()-> Util.msg "Executing external program windows-style\n"); let c = Unix.open_process_in ("\"" ^ cmd ^ "\"") in - let mergeLog = readChannelTillEof c in + let log = readChannelTillEof c in let returnValue = Unix.close_process_in c in let mergeResultLog = cmd ^ - (if mergeLog <> "" then "\n\n" ^ mergeLog else "") ^ + (if log <> "" then "\n\n" ^ log else "") ^ (if returnValue <> Unix.WEXITED 0 then "\n\n" ^ Util.process_status_to_string returnValue else @@ -403,18 +403,19 @@ Lwt_unix.open_process_full cmd (Unix.environment ()) >>= (fun (out, ipt, err) -> readChannelsTillEof [out;err] - >>= (function [mergeLogOut;mergeLogErr] -> + >>= (function [logOut;logErr] -> Lwt_unix.close_process_full (out, ipt, err) >>= (fun returnValue -> + let logOut = Util.trimWhitespace logOut in + let logErr = Util.trimWhitespace logErr in return (returnValue, ( - cmd - ^ "\n\n" ^ - (if mergeLogOut = "" || mergeLogErr = "" - then mergeLogOut ^ mergeLogErr - else mergeLogOut ^ "\n\n" ^ ("Error Output:"^mergeLogErr)) - ^"\n\n" + (* cmd + ^ "\n\n" ^ *) + (if logOut = "" || logErr = "" + then logOut ^ logErr + else logOut ^ "\n\n" ^ ("Error Output:" ^ logErr)) ^ (if returnValue = Unix.WEXITED 0 then "" - else Util.process_status_to_string returnValue)))) + else "\n\n" ^ Util.process_status_to_string returnValue)))) (* Stop typechechecker from complaining about non-exhaustive pattern above *) | _ -> assert false))) Modified: trunk/src/os.mli =================================================================== --- trunk/src/os.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/os.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/os.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) val myCanonicalHostName : string Modified: trunk/src/osx.ml =================================================================== --- trunk/src/osx.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/osx.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/osx.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) external isMacOSXPred : unit -> bool = "isMacOSX" Modified: trunk/src/osx.mli =================================================================== --- trunk/src/osx.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/osx.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/osx.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) val init : bool -> unit val isMacOSX : bool Modified: trunk/src/osxsupport.c =================================================================== --- trunk/src/osxsupport.c 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/osxsupport.c 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ /* Unison file synchronizer: src/osxsupport.c */ -/* Copyright 1999-2007 (see COPYING for details) */ +/* Copyright 1999-2008 (see COPYING for details) */ #include #include Modified: trunk/src/path.ml =================================================================== --- trunk/src/path.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/path.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/path.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Defines an abstract type of relative pathnames *) Modified: trunk/src/path.mli =================================================================== --- trunk/src/path.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/path.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/path.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Abstract type of relative pathnames *) type 'a path Modified: trunk/src/pixmaps.ml =================================================================== --- trunk/src/pixmaps.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/pixmaps.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pixmaps.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let copyAB color = [| (* width height num_colors chars_per_pixel *) Modified: trunk/src/pred.ml =================================================================== --- trunk/src/pred.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/pred.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pred.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let debug = Util.debug "pred" Modified: trunk/src/pred.mli =================================================================== --- trunk/src/pred.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/pred.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pred.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Predicates over paths. Modified: trunk/src/props.ml =================================================================== --- trunk/src/props.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/props.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/props.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let debug = Util.debug "props" Modified: trunk/src/props.mli =================================================================== --- trunk/src/props.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/props.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/props.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* File properties: time, permission, length, etc. *) Modified: trunk/src/recon.ml =================================================================== --- trunk/src/recon.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/recon.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/recon.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common Modified: trunk/src/recon.mli =================================================================== --- trunk/src/recon.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/recon.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/recon.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) val reconcileAll : Common.updateItem list Common.oneperpath Modified: trunk/src/remote.ml =================================================================== --- trunk/src/remote.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/remote.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/remote.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* XXX Modified: trunk/src/remote.mli =================================================================== --- trunk/src/remote.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/remote.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/remote.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/sortri.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/sortri.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common Modified: trunk/src/sortri.mli =================================================================== --- trunk/src/sortri.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/sortri.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/sortri.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/stasher.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,6 +1,6 @@ (* Unison file synchronizer: src/stasher.ml *) (* $I2: Last modified by lescuyer *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (*------------------------------------------------------------------------------------*) (* Preferences for backing up and stashing *) Modified: trunk/src/strings.mli =================================================================== --- trunk/src/strings.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/strings.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/strings.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) val docs : (string * (string * string)) list Modified: trunk/src/test.ml =================================================================== --- trunk/src/test.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/test.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/test.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let (>>=) = Lwt.(>>=) Modified: trunk/src/test.mli =================================================================== --- trunk/src/test.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/test.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/test.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Internal self-tests *) Modified: trunk/src/transfer.ml =================================================================== --- trunk/src/transfer.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/transfer.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transfer.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* rsync compression algorithm Modified: trunk/src/transfer.mli =================================================================== --- trunk/src/transfer.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/transfer.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transfer.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Rsync : general algorithm description Modified: trunk/src/transport.ml =================================================================== --- trunk/src/transport.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/transport.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transport.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common open Lwt Modified: trunk/src/transport.mli =================================================================== --- trunk/src/transport.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/transport.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transport.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Executes the actions implied by the reconItem list. *) val transportItem : Modified: trunk/src/tree.ml =================================================================== --- trunk/src/tree.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/tree.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/tree.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type ('a, 'b) t = Node of ('a * ('a, 'b) t) list * 'b option Modified: trunk/src/tree.mli =================================================================== --- trunk/src/tree.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/tree.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/tree.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/rx.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/rx.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* 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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/rx.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/rx.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) type t Modified: trunk/src/ubase/safelist.ml =================================================================== --- trunk/src/ubase/safelist.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/safelist.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/safelist.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let filterBoth f l = let rec loop r1 r2 = function Modified: trunk/src/ubase/safelist.mli =================================================================== --- trunk/src/ubase/safelist.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/safelist.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/safelist.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/trace.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/trace.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* ---------------------------------------------------------------------- *) (* Choosing where messages go *) Modified: trunk/src/ubase/trace.mli =================================================================== --- trunk/src/ubase/trace.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/trace.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/trace.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* ---------------------------------------------------------------------- *) (* Debugging support *) Modified: trunk/src/ubase/uarg.ml =================================================================== --- trunk/src/ubase/uarg.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/uarg.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/uarg.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/util.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/util.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (*****************************************************************************) (* CASE INSENSITIVE COMPARISON *) Modified: trunk/src/ubase/util.mli =================================================================== --- trunk/src/ubase/util.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ubase/util.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/util.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Miscellaneous utility functions and datatypes *) Modified: trunk/src/ui.mli =================================================================== --- trunk/src/ui.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/ui.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ui.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uicommon.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uicommon.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common open Lwt Modified: trunk/src/uicommon.mli =================================================================== --- trunk/src/uicommon.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uicommon.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uicommon.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (* Kinds of UI *) type interface = Modified: trunk/src/uigtk2.ml =================================================================== --- trunk/src/uigtk2.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uigtk2.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uigtk2.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common open Lwt Modified: trunk/src/uigtk2.mli =================================================================== --- trunk/src/uigtk2.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uigtk2.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/uigtk2.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module Body : Uicommon.UI Modified: trunk/src/uimacnew/ProgressCell.m =================================================================== --- trunk/src/uimacnew/ProgressCell.m 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uimacnew/ProgressCell.m 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright 2007 (see file COPYING for more information) + * Copyright 2008 (see file COPYING for more information) * * Loosely based on TorrentCell from Transmission (.png files are from * the original). Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uitext.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uitext.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common open Lwt Modified: trunk/src/uitext.mli =================================================================== --- trunk/src/uitext.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uitext.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/uitext.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module Body : Uicommon.UI Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/update.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/update.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) open Common let (>>=) = Lwt.(>>=) @@ -1668,7 +1668,7 @@ let (localPath, subArch) = getPathInArchive archive Path.empty path in let newArch = updateArchiveRec ui (stripArchive path subArch) in let commit () = - let _ = Stasher.stashCurrentVersion fspath localPath in + let _ = Stasher.stashCurrentVersion fspath localPath None in let archive = getArchive root in let archive, () = updatePathInArchive archive fspath Path.empty path Modified: trunk/src/update.mli =================================================================== --- trunk/src/update.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/update.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/update.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) module NameMap : Map.S with type key = Name.t Modified: trunk/src/uutil.ml =================================================================== --- trunk/src/uutil.ml 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uutil.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uutil.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) (*****************************************************************************) (* Unison name and version *) Modified: trunk/src/uutil.mli =================================================================== --- trunk/src/uutil.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/uutil.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uutil.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/xferhint.ml 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/xferhint.ml *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (see COPYING for details) *) let debug = Trace.debug "xferhint" Modified: trunk/src/xferhint.mli =================================================================== --- trunk/src/xferhint.mli 2008-06-22 12:49:20 UTC (rev 288) +++ trunk/src/xferhint.mli 2008-06-23 22:05:17 UTC (rev 289) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/xferhint.mli *) -(* Copyright 1999-2007 (see COPYING for details) *) +(* Copyright 1999-2008 (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 Mon Jun 23 22:45:31 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Mon, 23 Jun 2008 22:45:31 -0400 Subject: [Unison-hackers] [unison-svn] r290 - in trunk: . doc src src/ubase Message-ID: <200806240245.m5O2jVEA020795@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-23 22:45:20 -0400 (Mon, 23 Jun 2008) New Revision: 290 Modified: trunk/Makefile trunk/doc/unison-manual.tex trunk/src/NEWS trunk/src/RECENTNEWS trunk/src/case.ml trunk/src/copy.ml trunk/src/fileinfo.ml trunk/src/files.ml trunk/src/globals.ml trunk/src/main.ml trunk/src/mkProjectInfo.ml trunk/src/osx.ml trunk/src/pred.ml trunk/src/pred.mli trunk/src/props.ml trunk/src/recon.ml trunk/src/remote.ml trunk/src/sortri.ml trunk/src/stasher.ml trunk/src/strings.ml trunk/src/transport.ml trunk/src/ubase/prefs.ml trunk/src/ubase/trace.ml trunk/src/ubase/uarg.ml trunk/src/ubase/uarg.mli trunk/src/uicommon.ml trunk/src/uitext.ml trunk/src/update.ml trunk/src/xferhint.ml Log: * 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.) Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/Makefile 2008-06-24 02:45:20 UTC (rev 290) @@ -138,7 +138,7 @@ @echo Creating DOWNLOADDIR = $(DOWNLOADDIR) @echo -mkdir -p $(DOWNLOADDIR) - #touch $(DOWNLOADDIR)/THIS-IS-UNISON-$(VERSION) +# touch $(DOWNLOADDIR)/THIS-IS-UNISON-$(VERSION) exportsources: $(RM) -r $(TMP)/$(EXPORTNAME) Modified: trunk/doc/unison-manual.tex =================================================================== --- trunk/doc/unison-manual.tex 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/doc/unison-manual.tex 2008-06-24 02:45:20 UTC (rev 290) @@ -1310,8 +1310,8 @@ \begin{quote} \verbatiminput{prefs.tmp} \end{quote} -Here, in more detail, are what they do. Many are discussed in even greater -detail in other sections of the manual. +Here, in more detail, is what they do. Many are discussed in greater detail +in other sections of the manual. % \input{prefsdocs.tmp} Modified: trunk/src/NEWS =================================================================== --- trunk/src/NEWS 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/NEWS 2008-06-24 02:45:20 UTC (rev 290) @@ -1,16 +1,150 @@ -Changes in Version 2.14.0 +Changes in Version 2.29.5 + Changes since 2.17: + * Major rewrite and cleanup of the whole Mac OS X graphical user + interface by Craig Federighi. Thanks, Craig!!! + * Small fix to ctime (non-)handling in update detection under + windows with fastcheck. + + Changes since 2.17: + * Several small fixes to the GTK2 UI to make it work better under + Windows [thanks to Karl M for these]. + * 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. + * 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 Unison + home page (http://www.cis.upenn.edu/ bcpierce/unison/lists.html). + * Some important safety improvements: + + Added a new 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. + + The confirmation of "big deletes" is now controlled by a + boolean preference confirmbigdeletes. Default is true, which + gives the same behavior as previously. (This functionality is + at least partly superceded by the mountpoint preference, but + it has been left in place in case it is useful to some + people.) + + 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!). + * Smaller changes: + + Added forcepartial and preferpartial preferences, which + behave like force and prefer but can be specified on a + per-path basis. [Thanks to Alan Schmitt for this.] + + 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). + + 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. + + Removed mergebatch preference. (It never seemed very useful, + and its semantics were confusing.) + + Rewrote some of the merging functionality, for better + cooperation with external Harmony instances. + + Changed the temp file prefix from .# to .unison. + + Compressed the output from the text user interface + (particularly when run with the -terse flag) to make it + easier to interpret the results when Unison is run several + times in succession from a script. + + Diff and merge functions now work under Windows. + + Changed the order of arguments to the default diff command + (so that the + and - annotations in diff's output are + reversed). + + Added .mpp files to the "never fastcheck" list (like .xls + files). + * Many small bugfixes, including: + + 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.) + + Fixed a bug that would occasionally cause the archives to be + left in non-identical states on the two hosts after + synchronization. + + Fixed a bug that prevented Unison from communicating + correctly between 32- and 64-bit architectures. + + 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!) + + Set read-only file to R/W on OSX before attempting to change + other attributes. + + Fixed bug resulting in spurious "Aborted" errors during + transport (thanks to Jerome Vouillon) + + Enable diff if file contents have changed in one replica, but + only properties in the other. + + Removed misleading documentation for 'repeat' preference. + + Fixed a bug in merging code where Unison could sometimes + deadlock with the external merge program, if the latter + produced large amounts of output. + + Workaround for a bug compiling gtk2 user interface against + current versions of gtk2+ libraries. + + Added a better error message for "ambiguous paths". + + Squashed a longstanding bug that would cause file transfer to + fail with the message "Failed: Error in readWrite: Is a + directory." + + 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. + + 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 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. + + Changes since 2.13.0: + * 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 backupXXX preferences) for details. + * 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.) + * OSX interface: + + Incorporated Ben Willmore's cool new icon for the Mac UI. + * Small fixes: + + Fixed off by one error in month numbers (in printed dates) + reported by Bob Burger + Changes since 2.12.0: * New convention for release numbering: Releases will continue to be given numbers of the form X.Y.Z, but, from now on, just the major version number (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. + "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 + "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 @@ -88,7 +222,7 @@ Subversion. One nice side-effect is that anonymous checkout is now possible, like this: svn co https://cvs.cis.upenn.edu:3690/svnroot/unison/ - We will also continue to export a ``developer tarball'' of the + 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 unison-hackers list @@ -168,10 +302,6 @@ override left-over archive locks. (Setting this preference is dangerous! Use it only if you are positive you know what you are doing.) - + Running with the -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.) + Added a new preference assumeContentsAreImmutable. If a directory matches one of the patterns set in this preference, then update detection is skipped for files in this directory. @@ -228,7 +358,7 @@ + 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). + "Recheck unsynchronized items" command). + Several small improvements to the text user interface, including a progress display. * Bug fixes (too numerous to count, actually, but here are some): @@ -289,13 +419,13 @@ + Makefile.OCaml now sets UISTYLE=text or UISTYLE=gtk automatically, depending on whether it finds lablgtk installed - + Unison should now compile ``out of the box'' under OSX + + Unison should now compile "out of the box" under OSX Changes since 2.8.1: * Changing profile works again under Windows * 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''. + a boolean option "xferbycopying". * Network statistics window (transfer rate, amount of data transferred). [NB: not available in Windows-Cygwin version.] * symlinks work under the cygwin version (which is dynamically @@ -318,7 +448,7 @@ the basic utility modules so that the non-unison-specific stuff can be made available for other projects.) + several Makefile and docs changes (for release); - + further comments in ``update.ml''; + + further comments in "update.ml"; + connection information is not stored in global variables anymore. @@ -332,9 +462,9 @@ are now both accessible). * User manual revised. * Added some new preferences: - + ``sshcmd'' and ``rshcmd'' for specifying paths to ssh and rsh + + "sshcmd" and "rshcmd" for specifying paths to ssh and rsh programs. - + ``contactquietly'' for suppressing the ``contacting server'' + + "contactquietly" for suppressing the "contacting server" message during Unison startup (under the graphical UI). * Bug fixes: + Fixed small bug in UI that neglected to change the displayed @@ -344,8 +474,8 @@ if it encountered a conflict when run in batch mode. + 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 + (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.) + `-prefer/-force newer' works properly now. (The bug was @@ -380,7 +510,8 @@ 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 - .#..unison.tmp. + .#..unison.tmp. [N.b. This was later + changed to .unison...unison.tmp.] * Added a new command to the GTK user interface: pressing 'f' causes Unison to start a new update detection phase, using as paths just those paths that have been detected as changed and not yet marked @@ -402,8 +533,8 @@ + Error reporting for preference files now provides file name and line number. + 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.'' + the same files: "Nothing to do: replicas have been changed + only in identical ways since last sync." + Files with prefix '.#' excluded when scanning for preference files. + Rsync instructions are send directly instead of first @@ -431,7 +562,7 @@ added to. * 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 + 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.) @@ -439,7 +570,7 @@ Changes since 2.6.59: * Changed fastcheck from a boolean to a string preference. Its legal values are yes (for a fast check), no (for a safe check), or - default (for a fast check---which also happens to be safe---when + 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 default. * Several preferences have been renamed for consistency. All @@ -494,7 +625,7 @@ o 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 + usual sense and as the "common version" when invoking external merge programs. o The backed up files are stored in a directory /.unison/backup on each host. (The name of this @@ -575,7 +706,7 @@ conflicts. The value of the editor preference controls what editor is invoked by Unison. The default is emacs. o Please send us suggestions for other useful values of - the merge2 and merge preferences -- we'd like to give + the merge2 and merge preferences - we'd like to give several examples in the manual. * Smaller changes: + When one preference file includes another, unison no longer @@ -636,10 +767,10 @@ also set. The graphical user interface provides access to these facilities on a one-off basis via the Actions menu. - * Names of roots can now be ``aliased'' to allow replicas to be + * 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 + experts only. See the "Archive Files" section of the manual for more information.) * Graphical user-interface: + A new command is provided in the Synchronization menu for @@ -773,9 +904,9 @@ 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). - + File owner and group are now displayed in the ``detail - window'' at the bottom of the screen, when unison is - configured to synchronize them. + + File owner and group are now displayed in the "detail window" + at the bottom of the screen, when unison is configured to + synchronize them. * For hackers: + Updated to Jacques Garrigue's new version of lablgtk, which means we can throw away our local patched version. @@ -966,8 +1097,8 @@ 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 - after the canonization step -- i.e., the one that is listed first - in the user interface -- not the one listed first on the command + 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.) Changes since 2.1: @@ -975,16 +1106,16 @@ Gommier and Norman Ramsey of Tridgell and Mackerras's 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 + 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 -rsync option (or put rsync=true in your preferences file) to turn it on. - * ``Progress bars'' are now diplayed during remote file transfers, + * "Progress bars" are now diplayed during remote file transfers, showing what percentage of each file has been transferred so far. * 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.'' + component is the "patch level." * Miscellaneous improvements to the GTK-based user interface. * The manual is now available in PDF format. * We are experimenting with using a multi-threaded transport @@ -1074,7 +1205,7 @@ better. * Some minor improvements to the text UI (e.g. a command for going back to previous items) - * The organization of the export directory has changed --- should be + * The organization of the export directory has changed -- should be easier to find / download things now. Changes since 1.200: @@ -1131,8 +1262,7 @@ matches any path in which one component matches , while ignore = Path matches exactly the path . - Standard ``globbing'' conventions can be used in and - : + Standard "globbing" conventions can be used in and : + a ? matches any single character except / + a * matches any sequence of characters not including / + [xyz] matches any character from the set {x, y, z } @@ -1149,7 +1279,7 @@ Changes since 1.142: * Major internal tidying and many small bugfixes. * Major additions to the user manual. - * Unison can now be started with no arguments -- it will prompt + * 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. @@ -1171,8 +1301,8 @@ Changes since 1.111: * INCOMPATIBLE CHANGE: The names and formats of the preference files in the .unison directory have changed. In particular: - + the file ``prefs'' should be renamed to default.prf - + the contents of the file ``ignore'' should be merged into + + the file "prefs" should be renamed to default.prf + + the contents of the file "ignore" should be merged into default.prf. Each line of the form REGEXP in ignore should become a line of the form ignore = REGEXP in default.prf. * Unison now handles permission bits and symbolic links. See the @@ -1180,7 +1310,7 @@ * You can now have different preference files in your .unison directory. If you start unison like this unison profilename - (i.e. with just one ``anonymous'' command-line argument), then the + (i.e. with just one "anonymous" command-line argument), then the file ~/.unison/profilename.prf will be loaded instead of default.prf. * Some improvements to terminal handling in the text user interface Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/RECENTNEWS 2008-06-24 02:45:20 UTC (rev 290) @@ -1,3 +1,13 @@ +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 Modified: trunk/src/case.ml =================================================================== --- trunk/src/case.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/case.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -7,7 +7,7 @@ (* the hosts is case insensitive. *) let caseInsensitiveMode = Prefs.createString "ignorecase" "default" - "ignore upper/lowercase in filenames (`true', `false', or `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' " Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/copy.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -113,7 +113,7 @@ let rsyncActivated = Prefs.createBool "rsync" true - "activate the rsync transfer mode" + "!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, " @@ -483,7 +483,7 @@ let copyprog = Prefs.createString "copyprog" "rsync --partial --inplace --compress" - "External program for copying large files" + "!external program for copying large files" ("A string giving the name of an " ^ "external program that can be used to copy large files efficiently " ^ "(plus command-line switches " @@ -494,14 +494,15 @@ let copythreshold = Prefs.createInt "copythreshold" (-1) - "If nonnegative, use copyprog to transfer files larger than this" + "!use external copyprog on files this big (if >=0, in Kb)" ("A number indicating above what filesize (in kilobytes) Unison should " ^ "use the external " ^ "copying utility specified by {\\tt copyprog}. Specifying 0 will cause " ^ "{\\em all} copies to use the external program; " ^ "a negative number will prevent any files from using it. " ^ "The default is -1. " - ^ "\\sectionref{speeding}{Making Unison Faster on Large Files}") + ^ "See \\sectionref{speeding}{Making Unison Faster on Large Files} " + ^ "for more information.") let tryCopyMovedFileLocal connFrom (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) = Modified: trunk/src/fileinfo.ml =================================================================== --- trunk/src/fileinfo.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/fileinfo.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -101,7 +101,7 @@ let pretendLocalOSIsWin32 = Prefs.createBool "pretendwin" false - "Use creation times for detecting updates" + "!Use creation times for detecting updates" ("When set to true, this preference makes Unison use Windows-style " ^ "fast update detection (using file creation times as " ^ "``pseudo-inode-numbers''), even when running on a Unix system. This " Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/files.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -453,7 +453,7 @@ let diffCmd = Prefs.createString "diff" "diff -u CURRENT2 CURRENT1" - "*command for showing differences between files" + "!command for showing differences between files" ("This preference can be used to control the name and command-line " ^ "arguments of the system " ^ "utility used to generate displays of file differences. The default " Modified: trunk/src/globals.ml =================================================================== --- trunk/src/globals.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/globals.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -11,7 +11,7 @@ let rawroots = Prefs.createStringList "root" - "root of a replica" + "root of a replica (should be used exactly twice)" ("Each use of this preference names the root of one of the replicas " ^ "for Unison to synchronize. Exactly two roots are needed, so normal " ^ "modes of usage are either to give two values for \\verb|root| in the " @@ -203,13 +203,16 @@ ^ "will be propagated; conflicts will be skipped.") let confirmBigDeletes = - Prefs.createBool "confirmbigdeletes" true "request confirmation for whole-replica deletes" - ("When this is set to {\\tt true}, Unison will request an extra confirmation if it appears " + Prefs.createBool "confirmbigdel" true + "!ask about whole-replica (or path) deletes" + ("!When this is set to {\\tt true}, Unison will request an extra confirmation if it appears " ^ "that the entire replica has been deleted, before propagating the change. If the {\\tt batch} " ^ "flag is also set, synchronization will be aborted. When the {\\tt path} preference is used, " ^ "the same confirmation will be requested for top-level paths. (At the moment, this flag only " ^ "affects the text user interface.) See also the {\\tt mountpoint} preference.") +let () = Prefs.alias confirmBigDeletes "confirmbigdeletes" + let ignore = Pred.create "ignore" ("Including the preference \\texttt{-ignore \\ARG{pathspec}} causes Unison to " @@ -250,7 +253,7 @@ Pred.intern ignore newRE let merge = - Pred.create "merge" + Pred.create "merge" ~advanced:true ("This preference can be used to run a merge program which will create " ^ "a new version for each of the files and the backup, " ^ "with the last backup and the both replicas. Setting the {\\tt merge} " Modified: trunk/src/main.ml =================================================================== --- trunk/src/main.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/main.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -70,7 +70,8 @@ let socketPrefName = "socket" let socket = - Prefs.create socketPrefName None "act as a server on a socket" "" + Prefs.create socketPrefName None + "!act as a server on a socket" "" (fun _ -> fun i -> (try Some(int_of_string i) @@ -81,13 +82,13 @@ let serverHostName = "host" let serverHost = Prefs.createString serverHostName "" - "bind the socket to this host name in server socket mode" "" + "!bind the socket to this host name in server socket mode" "" (* User preference for which UI to use if there is a choice *) let uiPrefName = "ui" let interface = Prefs.create uiPrefName Uicommon.Graphic - "select user interface ('text' or 'graphic'); command-line only" + "!select UI ('text' or 'graphic'); command-line only" ("This preference selects either the graphical or the textual user " ^ "interface. Legal values are \\verb|graphic| or \\verb|text|. " ^ "\n\nBecause this option is processed specially during Unison's " Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/mkProjectInfo.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -75,3 +75,4 @@ + Modified: trunk/src/osx.ml =================================================================== --- trunk/src/osx.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/osx.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -9,8 +9,7 @@ let rsrcSync = Prefs.createString "rsrc" "default" - "synchronize resource forks and HFS meta-data \ - (`true', `false', or `default')" + "!synchronize resource forks (true/false/default)" "When set to {\\tt true}, this flag causes Unison to synchronize \ resource forks and HFS meta-data. On filesystems that do not \ natively support resource forks, this data is stored in \ Modified: trunk/src/pred.ml =================================================================== --- trunk/src/pred.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/pred.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -71,9 +71,12 @@ end in (compiled, v) -let create name fulldoc = +let create name ?(advanced=false) fulldoc = let pref = - Prefs.create name [] ("add a pattern to the " ^ name ^ " list") fulldoc + Prefs.create name [] + ((if advanced then "!" else "") + ^ "add a pattern to the " ^ name ^ " list") + fulldoc (fun oldList string -> ignore (compile_pattern string); (* Check well-formedness *) string :: oldList) Modified: trunk/src/pred.mli =================================================================== --- trunk/src/pred.mli 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/pred.mli 2008-06-24 02:45:20 UTC (rev 290) @@ -30,7 +30,7 @@ (* Create a new predicate and register it with the preference module. The first arg is the name of the predicate; the second is full (latex) documentation. *) -val create : string -> string -> t +val create : string -> ?advanced:bool -> string -> t (* Check whether a given path matches one of the default or current patterns *) val test : t -> string -> bool Modified: trunk/src/props.ml =================================================================== --- trunk/src/props.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/props.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -212,8 +212,8 @@ (* ------------------------------------------------------------------------- *) let numericIds = - Prefs.createBool "numericids" - false "don't map uid/gid values by user/group names" + Prefs.createBool "numericids" false + "!don't map uid/gid values by user/group names" "When this flag is set to \\verb|true|, groups and users are \ synchronized numerically, rather than by name. \n\ \n\ @@ -343,7 +343,7 @@ let sync = Prefs.createBool "group" - false "synchronize group" + false "synchronize group attributes" ("When this flag is set to \\verb|true|, the group attributes " ^ "of the files are synchronized. " ^ "Whether the group names or the group identifiers are synchronized" Modified: trunk/src/recon.ml =================================================================== --- trunk/src/recon.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/recon.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -84,7 +84,7 @@ ^ "know what you are doing!") let forceRootPartial: Pred.t = - Pred.create "forcepartial" + Pred.create "forcepartial" ~advanced:true ("Including the preference \\texttt{forcepartial \\ARG{PATHSPEC} -> \\ARG{root}} causes Unison to " ^ "resolve all differences (even non-conflicting changes) in favor of " ^ "\\ARG{root} for the files in \\ARG{PATHSPEC} (see \\sectionref{pathspec}{Path Specification} " @@ -112,7 +112,7 @@ ^ "know what you are doing!") let preferRootPartial: Pred.t = - Pred.create "preferpartial" + Pred.create "preferpartial" ~advanced:true ("Including the preference \\texttt{preferpartial \\ARG{PATHSPEC} -> \\ARG{root}} " ^ "causes Unison always to " ^ "resolve conflicts in favor of \\ARG{root}, rather than asking for " Modified: trunk/src/remote.ml =================================================================== --- trunk/src/remote.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/remote.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -412,7 +412,7 @@ these be part of it too? *) let sshCmd = Prefs.createString "sshcmd" "ssh" - ("path to the ssh executable") + ("!path to the ssh executable") ("This preference can be used to explicitly set the name of the " ^ "ssh executable (e.g., giving a full path name), if necessary.") @@ -433,7 +433,7 @@ let sshargs = Prefs.createString "sshargs" "" - "other arguments (if any) for remote shell command" + "!other arguments (if any) for remote shell command" ("The string value of this preference will be passed as additional " ^ "arguments (besides the host name and the name of the Unison " ^ "executable on the remote system) to the \\verb|ssh| " @@ -442,14 +442,14 @@ let serverCmd = Prefs.createString "servercmd" "" - ("name of " ^ Uutil.myName ^ " executable on remote server") + ("!name of " ^ Uutil.myName ^ " executable on remote server") ("This preference can be used to explicitly set the name of the " ^ "Unison executable on the remote server (e.g., giving a full " ^ "path name), if necessary.") let addversionno = Prefs.createBool "addversionno" false - ("add version number to name of " ^ Uutil.myName ^ " executable on server") + ("!add version number to name of " ^ Uutil.myName ^ " on server") ("When this flag is set to {\\tt true}, Unison " ^ "will use \\texttt{unison-\\ARG{currentversionnumber}} instead of " ^ "just \\verb|unison| as the remote server command. This allows " @@ -1120,7 +1120,7 @@ let killServer = Prefs.createBool "killserver" false - "kill server when done (even when using sockets)" + "!kill server when done (even when using sockets)" ("When set to \\verb|true|, this flag causes Unison to kill the remote " ^ "server process when the synchronization is finished. This behavior " ^ "is the default for \\verb|ssh| connections, so this preference is not " Modified: trunk/src/sortri.ml =================================================================== --- trunk/src/sortri.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/sortri.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -9,7 +9,7 @@ let bysize = Prefs.createBool "sortbysize" false - "list changed files by size, not name" + "!list changed files by size, not name" ("When this flag is set, the user interface will list changed files " ^ "by size (smallest first) rather than by name. This is useful, for " ^ "example, for synchronizing over slow links, since it puts very " @@ -22,13 +22,13 @@ let newfirst = Prefs.createBool "sortnewfirst" false - "list new before changed files" + "!list new before changed files" ("When this flag is set, the user interface will list newly created " ^ "files before all others. This is useful, for example, for checking " ^ "that newly created files are not `junk', i.e., ones that should be " ^ "ignored or deleted rather than synchronized.") -let sortfirst = Pred.create "sortfirst" +let sortfirst = Pred.create "sortfirst" ~advanced:true ("Each argument to \\texttt{sortfirst} is a pattern \\ARG{pathspec}, " ^ "which describes a set of paths. " ^ "Files matching any of these patterns will be listed first in the " @@ -36,7 +36,7 @@ ^ "The syntax of \\ARG{pathspec} is " ^ "described in \\sectionref{pathspec}{Path Specification}.") -let sortlast = Pred.create "sortlast" +let sortlast = Pred.create "sortlast" ~advanced:true ("Similar to \\verb|sortfirst|, except that files matching one of these " ^ "patterns will be listed at the very end.") Modified: trunk/src/stasher.ml =================================================================== --- trunk/src/stasher.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/stasher.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -9,8 +9,8 @@ let verbose = Util.debug "stasher+" let backuplocation = - Prefs.createString "backuplocation" "central" - "where backups are stored ('local' or 'central')" + Prefs.createString "backuploc" "central" + "!where backups are stored ('local' or 'central')" ("This preference determines whether backups should be kept locally, near the " ^ "original files, or" ^" in a central directory specified by the \\texttt{backupdir} " @@ -18,8 +18,10 @@ ^"the same directory as the original files, and if set to \\verb|central|," ^" \\texttt{backupdir} will be used instead.") +let _ = Prefs.alias backuplocation "backuplocation" + let backup = - Pred.create "backup" + Pred.create "backup" ~advanced:true ("Including the preference \\texttt{-backup \\ARG{pathspec}} " ^ "causes Unison to keep backup files for each path that matches " ^ "\\ARG{pathspec}. These backup files are kept in the " @@ -33,7 +35,7 @@ let _ = Pred.alias backup "mirror" let backupnot = - Pred.create "backupnot" + Pred.create "backupnot" ~advanced:true ("The values of this preference specify paths or individual files or" ^ " regular expressions that should {\\em not} " ^ "be backed up, even if the {\\tt backup} preference selects " @@ -49,7 +51,7 @@ let backupprefix = Prefs.createString "backupprefix" ".bak.$VERSION." - "prefix for the names of backup files" + "!prefix for the names of backup files" ("When a backup for a file \\verb|NAME| is created, it is stored " ^ "in a directory specified by \\texttt{backuplocation}, in a file called " ^ "\\texttt{backupprefix}\\verb|NAME|\\texttt{backupsuffix}." @@ -65,12 +67,12 @@ let backupsuffix = Prefs.createString "backupsuffix" "" - "a suffix to be added to names of backup files" + "!a suffix to be added to names of backup files" ("See \\texttt{backupprefix} for full documentation.") let backups = Prefs.createBool "backups" false - "keep backup copies of all files (see also 'backup')" + "!keep backup copies of all files (see also 'backup')" ("Setting this flag to true is equivalent to " ^" setting \\texttt{backuplocation} to \\texttt{local}" ^" and \\texttt{backup} to \\verb|Name *|.") @@ -91,7 +93,7 @@ let maxbackups = Prefs.createInt "maxbackups" 2 - "number of backed up versions of a file" + "!number of backed up versions of a file" ("This preference specifies the number of backup versions that will " ^ "be kept by unison, for each path that matches the predicate " ^ "\\verb|backup|. The default is 2.") @@ -101,7 +103,7 @@ let backupdir = Prefs.createString "backupdir" "" - "Directory for storing centralized backups" + "!directory for storing centralized backups" ("If this preference is set, Unison will use it as the name of the " ^ "directory used to store backup files specified by " ^ "the {\\tt backup} preference, when {\\tt backuplocation} is set" @@ -119,8 +121,8 @@ else Os.fileInUnisonDir "backup") let backupcurrent = - Pred.create "backupcurrent" - ("Including the preference \\texttt{-backupcurrent \\ARG{pathspec}} " + Pred.create "backupcurr" ~advanced:true + ("Including the preference \\texttt{-backupcurr \\ARG{pathspec}} " ^" causes Unison to keep a backup of the {\\em current} version of every file " ^ "matching \\ARG{pathspec}. " ^" This file will be saved as a backup with version number 000. Such" @@ -131,8 +133,8 @@ ^ "\\sectionref{pathspec}{Path Specification}.") let backupcurrentnot = - Pred.create "backupcurrentnot" - "Exceptions to \\verb|backupcurrent|, like the \\verb|ignorenot| preference." + Pred.create "backupcurrnot" ~advanced:true + "Exceptions to \\verb|backupcurr|, like the \\verb|ignorenot| preference." let shouldBackupCurrent p = (* BCP: removed next line [Apr 2007]: causes ALL mergeable files to be backed @@ -142,6 +144,9 @@ (let s = Path.toString p in Pred.test backupcurrent s && not (Pred.test backupcurrentnot s)) +let _ = Pred.alias backupcurrent "backupcurrent" +let _ = Pred.alias backupcurrentnot "backupcurrentnot" + (*------------------------------------------------------------------------------------*) (* NB: We use Str.regexp here because we need group matching to retrieve Modified: trunk/src/strings.ml =================================================================== --- trunk/src/strings.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/strings.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -4,8 +4,13 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.26.12\n\ + Version 2.29.5\n\ \n\ + ")) +:: + ("", ("Overview", + "Overview\n\ + \n\ \032 Unison is a file-synchronization tool for Unix and Windows. It allows\n\ \032 two replicas of a collection of files and directories to be stored on\n\ \032 different hosts (or different disks on the same host), modified\n\ @@ -61,7 +66,7 @@ \032 Trevor Jim (http://www.research.att.com/~trevor/), Benjamin Pierce\n\ \032 (http://www.cis.upenn.edu/~bcpierce/), and J\233r\244me Vouillon\n\ \032 (http://www.pps.jussieu.fr/~vouillon/), with Alan Schmitt\n\ - \032 (http://www.inrialpes.fr/~aschmitt/), Malo Denielou, Zhe Yang\n\ + \032 (http://alan.petitepomme.net/), Malo Denielou, Zhe Yang\n\ \032 (http://www.brics.dk/~zheyang/), Sylvain Gommier, and Matthieu Goulay.\n\ \032 The Mac user interface was started by Trevor Jim and enormously\n\ \032 improved by Ben Willmore. Our implementation of the rsync\n\ @@ -91,7 +96,10 @@ \n\ \032 Moderated mailing lists are available for bug reporting, announcements\n\ \032 of new versions, discussions among users, and discussions among\n\ - \032 developers. See http://www.cis.upenn.edu/~bcpierce/unison/lists.html\n\ + \032 developers. See\n\ + \n\ + \032 http://www.cis.upenn.edu/~bcpierce/unison/lists.html\n\ + \n\ \032 for more information.\n\ \n\ ")) @@ -121,23 +129,35 @@ \032 unison-users at yahoogroups.com (mailto:unison-users at yahoogroups.com).\n\ \n\ \032 Patches are even more welcome. They should be sent to\n\ - \032 unison-hackers at yahoogroups.com\n\ - \032 (mailto:unison-hackers at yahoogroups.com). (Since safety and robustness\n\ - \032 are Unison's most important properties, patches will be held to high\n\ - \032 standards of clear design and clean coding.) If you want to contribute\n\ - \032 to Unison, start by downloading the developer tarball from the\n\ - \032 download page. For some details on how the code is organized, etc.,\n\ - \032 see the file CONTRIB.\n\ + \032 unison-hackers at lists.seas.upenn.edu\n\ + \032 (mailto:unison-hackers at lists.seas.upenn.edu). (Since safety and\n\ + \032 robustness are Unison's most important properties, patches will be\n\ + \032 held to high standards of clear design and clean coding.) If you want\n\ + \032 to contribute to Unison, start by downloading the developer tarball\n\ + \032 from the download page. For some details on how the code is organized,\n\ + \032 etc., see the file CONTRIB.\n\ \n\ ")) :: ("copying", ("Copying", "Copying\n\ \n\ - \032 Unison is free software. You are free to change and redistribute it\n\ - \032 under the terms of the GNU General Public License. Please see the file\n\ - \032 COPYING in the Unison distribution for more information.\n\ + \032 This file is part of Unison.\n\ \n\ + \032 Unison is free software: you can redistribute it and/or modify it\n\ + \032 under the terms of the GNU General Public License as published by the\n\ + \032 Free Software Foundation, either version 3 of the License, or (at your\n\ + \032 option) any later version.\n\ + \n\ + \032 Unison is distributed in the hope that it will be useful, but WITHOUT\n\ + \032 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\ + \032 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n\ + \032 for more details.\n\ + \n\ + \032 The GNU Public License can be found at http://www.gnu.org/licenses. A\n\ + \032 copy is also included in the Unison source distribution in the file\n\ + \032 COPYING.\n\ + \n\ ")) :: ("ack", ("Acknowledgements", @@ -1108,6 +1128,9 @@ \032 -confirmbigdeletes request confirmation for whole-replica deletes\n\ \032 -confirmmerge ask for confirmation before commiting results of a merge\n\ \032 -contactquietly Suppress the 'contacting server' message during startup\n\ + \032 -copyprog xxx External program for copying large files\n\ + \032 -copythreshold n If nonnegative, use copyprog to transfer files larger tha\n\ + n this\n\ \032 -debug xxx debug module xxx ('all' -> everything, 'verbose' -> more)\n\ \032 -doc xxx show documentation ('-doc topics' lists topics)\n\ \032 -dumbtty do not try to change terminal settings in text UI\n\ @@ -1169,8 +1192,8 @@ \032 -version print version and exit\n\ \032 -xferbycopying optimize transfers using local copies, if possible\n\ \n\ - \032 Here, in more detail, are what they do. Many are discussed in even\n\ - \032 greater detail in other sections of the manual.\n\ + \032 Here, in more detail, is what they do. Many are discussed in greater\n\ + \032 detail in other sections of the manual.\n\ \032 addprefsto xxx\n\ \032 By default, new preferences added by Unison (e.g., new ignore\n\ \032 clauses) will be appended to whatever preference file Unison\n\ @@ -1269,8 +1292,22 @@ \032 effect.\n\ \032 contactquietly \n\ \032 If this flag is set, Unison will skip displaying the\n\ - \032 `Contacting server' window (which some users find annoying)\n\ + \032 `Contacting server' message (which some users find annoying)\n\ \032 during startup.\n\ + \032 copyprog xxx\n\ + \032 A string giving the name of an external program that can be\n\ + \032 used to copy large files efficiently (plus command-line\n\ + \032 switches telling it to copy files in-place and to\n\ + \032 resumeinterrupted transfers). The default setting invokes rsync\n\ + \032 with appropriate options--most users should not need to change\n\ + \032 it.\n\ + \032 copythreshold n \n\ + \032 A number indicating above what filesize (in kilobytes) Unison\n\ + \032 should use the external copying utility specified by copyprog.\n\ + \032 Specifying 0 will cause all copies to use the external program;\n\ + \032 a negative number will prevent any files from using it. The\n\ + \032 default is -1. the section \"Making Unison Faster on Large\n\ + \032 Files\"\n\ \032 debug xxx\n\ \032 This preference is used to make Unison print various sorts of\n\ \032 information about what it is doing internally on the standard\n\ @@ -1316,24 +1353,24 @@ \032 unison.dump on each host, containing a text summary of the\n\ \032 archive, immediately after loading it.\n\ \032 fastcheck xxx\n\ - \032 When this preference is set to true, Unison will use file\n\ - \032 creation times as `pseudo inode numbers' when scanning replicas\n\ - \032 for updates, instead of reading the full contents of every\n\ - \032 file. Under Windows, this may cause Unison to miss propagating\n\ - \032 an update if the create time, modification time, and length of\n\ - \032 the file are all unchanged by the update (this is not easy to\n\ - \032 achieve, but it can be done). However, Unison will never\n\ - \032 overwrite such an update with a change from the other replica,\n\ - \032 since it always does a safe check for updates just before\n\ - \032 propagating a change. Thus, it is reasonable to use this switch\n\ - \032 under Windows most of the time and occasionally run Unison once\n\ - \032 with fastcheck set to false, if you are worried that Unison may\n\ - \032 have overlooked an update. The default value of the preference\n\ - \032 is auto, which causes Unison to use fast checking on Unix\n\ - \032 replicas (where it is safe) and slow checking on Windows\n\ - \032 replicas. For backward compatibility, yes, no, and default can\n\ - \032 be used in place of true, false, and auto. See the section\n\ - \032 \"Fast Checking\" for more information.\n\ + \032 When this preference is set to true, Unison will use the\n\ + \032 modification time and length of a file as a `pseudo inode\n\ + \032 number' when scanning replicas for updates, instead of reading\n\ + \032 the full contents of every file. Under Windows, this may cause\n\ + \032 Unison to miss propagating an update if the modification time\n\ + \032 and length of the file are both unchanged by the update.\n\ + \032 However, Unison will never overwrite such an update with a\n\ + \032 change from the other replica, since it always does a safe\n\ + \032 check for updates just before propagating a change. Thus, it is\n\ + \032 reasonable to use this switch under Windows most of the time\n\ + \032 and occasionally run Unison once with fastcheck set to false,\n\ + \032 if you are worried that Unison may have overlooked an update.\n\ + \032 The default value of the preference is auto, which causes\n\ + \032 Unison to use fast checking on Unix replicas (where it is safe)\n\ + \032 and slow checking on Windows replicas. For backward\n\ + \032 compatibility, yes, no, and default can be used in place of\n\ + \032 true, false, and auto. See the section \"Fast Checking\" for more\n\ + \032 information.\n\ \032 follow xxx\n\ \032 Including the preference -follow pathspec causes Unison to\n\ \032 treat symbolic links matching pathspec as `invisible' and\n\ @@ -1385,7 +1422,7 @@ \032 differ in (upper- and lower-case) `spelling' are treated as the\n\ \032 same file. When the flag is set to false, Unison will treat all\n\ \032 filenames as case sensitive. Ordinarily, when the flag is set\n\ - \032 to t default, filenames are automatically taken to be\n\ + \032 to default, filenames are automatically taken to be\n\ \032 case-insensitive if either host is running Windows or OSX. In\n\ \032 rare circumstances it is useful to set the flag manually (e.g.\n\ \032 when running Unison on a Unix system with a FAT [Windows]\n\ @@ -1421,12 +1458,12 @@ \032 should use the path preference to choose particular paths to\n\ \032 synchronize.\n\ \032 immutable xxx\n\ - \032 This preference specifies paths for directories whose children\n\ - \032 are all immutable files -- i.e., once a file has been created,\n\ - \032 its contents never changes. When scanning for updates, Unison\n\ - \032 does not check whether these files have been modified; this can\n\ - \032 speed update detection significantly (in particular, for mail\n\ - \032 directories).\n\ + \032 This preference specifies paths for directories whose immediate\n\ + \032 children are all immutable files -- i.e., once a file has been\n\ + \032 created, its contents never changes. When scanning for updates,\n\ + \032 Unison does not check whether these files have been modified;\n\ + \032 this can speed update detection significantly (in particular,\n\ + \032 for mail directories).\n\ \032 immutablenot xxx\n\ \032 This preference overrides immutable.\n\ \032 key xxx\n\ @@ -1810,7 +1847,7 @@ \032 # file 'common' rathen than in the top-level preference file\n\ \032 addprefsto = common\n\ \n\ - \032 # regexps specifying names and paths to ignore\n\ + \032 # Names and paths to ignore:\n\ \032 ignore = Name temp.*\n\ \032 ignore = Name *~\n\ \032 ignore = Name .*~\n\ @@ -1889,16 +1926,16 @@ \032 neither of these are set, then the directory .unison/backup in the\n\ \032 user's home directory is used.\n\ \n\ - \032 The preference backupversions controls how many previous versions of\n\ - \032 each file are kept. The default is 2.\n\ + \032 The preference maxbackups controls how many previous versions of each\n\ + \032 file are kept (including the current version).\n\ \n\ - \032 By default, backup files are named .unison.FILENAME.VERSION.bak, where\n\ - \032 FILENAME is the original filename and version is the backup number\n\ - \032 (001 for the most recent, 002 for the next most recent, etc.). This\n\ - \032 can be changed by setting the preferences backupprefix and/or\n\ - \032 backupsuffix. If desired, backupprefix may include a directory prefix;\n\ - \032 this can be used with backuplocation = local to put all backup files\n\ - \032 for each directory into a single subdirectory. For example, setting\n\ + \032 By default, backup files are named .bak.VERSION.FILENAME, where\n\ + \032 FILENAME is the original filename and VERSION is the backup number (1\n\ + \032 for the most recent, 2 for the next most recent, etc.). This can be\n\ + \032 changed by setting the preferences backupprefix and/or backupsuffix.\n\ + \032 If desired, backupprefix may include a directory prefix; this can be\n\ + \032 used with backuplocation = local to put all backup files for each\n\ + \032 directory into a single subdirectory. For example, setting\n\ \032 backuplocation = local\n\ \032 backupprefix = .unison/$VERSION.\n\ \032 backupsuffix =\n\ @@ -2019,7 +2056,8 @@ \n\ \032 A large number of external merging programs are available. For\n\ \032 example, on Unix systems setting the merge preference to\n\ - \032 merge = Name *.txt -> diff3 CURRENT1 CURRENTARCH CURRENT2 -m > NEW\n\ + \032 merge = Name *.txt -> diff3 -m CURRENT1 CURRENTARCH CURRENT2\n\ + \032 > NEW || echo \"differences detected\"\n\ \n\ \032 will tell Unison to use the external diff3 program for merging.\n\ \032 Alternatively, users of emacs may find the following settings\n\ @@ -2029,8 +2067,14 @@ \n\ \032 (These commands are displayed here on two lines to avoid running off\n\ \032 the edge of the page. In your preference file, each command should be\n\ - \032 written on a single line.) Users running Mac OS X (you may need the\n\ - \032 Developer Tools installed to get the opendiff utility) may prefer\n\ + \032 written on a single line.)\n\ + \n\ + \032 Users running emacs under windows may find something like this useful:\n\ + \032 merge = Name * -> C:\\Progra~1\\Emacs\\emacs\\bin\\emacs.exe -q --eval\n\ + \032 \"(ediff-files \"\"\"CURRENT1\"\"\" \"\"\"CURRENT2\"\"\")\"\n\ + \n\ + \032 Users running Mac OS X (you may need the Developer Tools installed to\n\ + \032 get the opendiff utility) may prefer\n\ \032 merge = Name *.txt -> opendiff CURRENT1 CURRENT2 -ancestor CURRENTARCH -mer\n\ ge NEW\n\ \n\ @@ -2284,6 +2328,42 @@ \032 by enabling ssh's compression feature. Do this by adding the option\n\ \032 \"-rshargs -C\" to the command line or \"rshargs = -C\" to your profile.\n\ \n\ + Making Unison Faster on Large Files\n\ + \n\ + \032 Unison's built-in implementation of the rsync algorithm makes\n\ + \032 transferring updates to existing files pretty fast. However, for\n\ + \032 whole-file copies, the built-in transfer method is not highly\n\ + \032 optimized. Also, if Unison is interrupted in the middle of\n\ + \032 transferring a large file, it will attempt to retransfer the whole\n\ + \032 thing on the next run.\n\ + \n\ + \032 These shortcomings can be addressed by telling Unison to use an\n\ + \032 external file copying utility for whole-file transfers. The\n\ + \032 recommended one is the standalone rsync tool, which is available by\n\ + \032 default on most Unix systems and can easily be installed on Windows\n\ + \032 systems using Cygwin.\n\ + \n\ + \032 If you have rsync installed on both hosts, you can make Unison use it\n\ + \032 simply by setting the copythreshold flag to something non-negative. If\n\ + \032 you set it to 0, Unison will use the external copy utility for all\n\ + \032 whole-file transfers. (This is probably slower than letting Unison\n\ + \032 copy small files by itself, but can be useful for testing.) If you set\n\ + \032 it to a larger value, Unison will use the external utility for all\n\ + \032 files larger than this size (which is given in kilobytes, so setting\n\ + \032 it to 1000 will cause the external tool to be used for all transfers\n\ + \032 larger than a megabyte).\n\ + \n\ + \032 If you want to use a different external copy utility, set the copyprog\n\ + \032 preference.\n\ + \n\ + \032 If a directory transfer is interrupted, the next run of Unison will\n\ + \032 skip any files that were completely transferred before the\n\ + \032 interruption. Note, though, that the new directory will not appear in\n\ + \032 the destination filesystem until everything has been\n\ + \032 transferred--partially transferred directories are kept in a temporary\n\ + \032 location (with names like .unison.DIRNAME....) until the transfer is\n\ + \032 complete.\n\ + \n\ Fast Update Detection\n\ \n\ \032 If your replicas are large and at least one of them is on a Windows\n\ @@ -2291,7 +2371,7 @@ \032 changes (which involves scanning the full contents of every file on\n\ \032 every sync--the only completely safe way to do it under Windows) is\n\ \032 too slow. Unison provides a preference fastcheck that, when set to\n\ - \032 yes, causes it to use file creation times as 'pseudo inode numbers'\n\ + \032 true, causes it to use file creation times as 'pseudo inode numbers'\n\ \032 when scanning replicas for updates, instead of reading the full\n\ \032 contents of every file.\n\ \n\ @@ -2302,9 +2382,8 @@ \032 Unix replicas and slow checks on Windows replicas.\n\ \n\ \032 This strategy may cause Unison to miss propagating an update if the\n\ - \032 create time, modification time, and length of the file are all\n\ - \032 unchanged by the update (this is not easy to achieve, but it can be\n\ - \032 done). However, Unison will never overwrite such an update with a\n\ + \032 modification time and length of the file are both unchanged by the\n\ + \032 update. However, Unison will never overwrite such an update with a\n\ \032 change from the other replica, since it always does a safe check for\n\ \032 updates just before propagating a change. Thus, it is reasonable to\n\ \032 use this switch most of the time and occasionally run Unison once with\n\ @@ -2327,11 +2406,11 @@ \n\ \032 To prevent accidents, Unison provides a preference called mountpoint.\n\ \032 Including a line like\n\ - \032 mountpoint = /mnt/foo\n\ + \032 mountpoint = foo\n\ \n\ \032 in your preference file will cause Unison to check, after it finishes\n\ - \032 detecting updates, that something actually exists at the path /mnt/foo\n\ - \032 on both replicas; if it does not, the Unison run will abort.\n\ + \032 detecting updates, that something actually exists at the path foo on\n\ + \032 both replicas; if it does not, the Unison run will abort.\n\ \n\ Click-starting Unison\n\ \n\ @@ -2359,6 +2438,11 @@ ("ssh", ("Installing Ssh", "Installing Ssh\n\ \n\ + \032 Warning: These instructions may be out of date. More current\n\ + \032 information can be found the Unison Wiki\n\ + \032 (http://alliance.seas.upenn.edu/ bcpierce/wiki/index.php?n=Main.Unison\n\ + \032 FAQOSSpecific).\n\ + \n\ \032 Your local host will need just an ssh client; the remote host needs an\n\ \032 ssh server (or daemon), which is available on Unix systems. Unison is\n\ \032 known to work with ssh version 1.2.27 (Unix) and version 1.2.14\n\ @@ -2373,7 +2457,7 @@ \032 Many Windows implementations of ssh only provide graphical interfaces,\n\ \032 but Unison requires an ssh client that it can invoke with a\n\ \032 command-line interface. A suitable version of ssh can be installed as\n\ - \032 follows. (Warning: These instructions may be out of date.)\n\ + \032 follows.\n\ \032 1. Download an ssh executable.\n\ \032 Warning: there are many implementations and ports of ssh for\n\ \032 Windows, and not all of them will work with Unison. We have gotten\n\ @@ -2455,25 +2539,24 @@ \n\ ")) :: - ("news", ("Changes in Version 2.26.12", - "Changes in Version 2.26.12\n\ + ("news", ("Changes in Version 2.29.5", + "Changes in Version 2.29.5\n\ \n\ \032 Changes since 2.17:\n\ - \032 * The Unison project now accepts donations via PayPal. If you'd like\n\ - \032 to donate, you can find a link to the donation page on the Unison\n\ - \032 home page (http://www.cis.upenn.edu/ bcpierce/unison/lists.html).\n\ - \032 * The native OS X user interface has been enormously improved by Ben\n\ - \032 Willmore and Trevor Jim. (We have observed intermittent crashes of\n\ - \032 this UI when used for large synchronizations. This problem has\n\ - \032 hopefully been fixed by a recent improvement in locking when\n\ - \032 communicating between Objective C and OCaml; if any further\n\ - \032 crashes are observed, we would appreciate hearing about them,\n\ - \032 especially if they are repeatable.)\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\ \032 external interface has not changed, but numerous bugs, irregular\n\ \032 behaviors, and cross-platform inconsistencies have been corrected.\n\ + \032 * The Unison project now accepts donations via PayPal. If you'd like\n\ + \032 to donate, you can find a link to the donation page on the Unison\n\ + \032 home page (http://www.cis.upenn.edu/ bcpierce/unison/lists.html).\n\ \032 * Some important safety improvements:\n\ \032 + Added a new mountpoint preference, which can be used to\n\ \032 specify a path that must exist in both replicas at the end of\n\ @@ -2527,6 +2610,23 @@ \032 + Added .mpp files to the \"never fastcheck\" list (like .xls\n\ \032 files).\n\ \032 * Many small bugfixes, including:\n\ + \032 + Fixed a longstanding bug regarding fastcheck and daylight\n\ + \032 saving time under Windows when Unison is set up to\n\ + \032 synchronize modification times. (Modification times cannot be\n\ + \032 updated in the archive in this case, so we have to ignore one\n\ + \032 hour differences.)\n\ + \032 + Fixed a bug that would occasionally cause the archives to be\n\ + \032 left in non-identical states on the two hosts after\n\ + \032 synchronization.\n\ + \032 + Fixed a bug that prevented Unison from communicating\n\ + \032 correctly between 32- and 64-bit architectures.\n\ + \032 + On windows, file creation times are no longer used as a proxy\n\ + \032 for inode numbers. (This is unfortunate, as it makes\n\ + \032 fastcheck a little less safe. But it turns out that file\n\ + \032 creation times are not reliable under Windows: if a file is\n\ + \032 removed and a new file is created in its place, the new one\n\ + \032 will sometimes be given the same creation date as the old\n\ + \032 one!)\n\ \032 + Set read-only file to R/W on OSX before attempting to change\n\ \032 other attributes.\n\ \032 + Fixed bug resulting in spurious \"Aborted\" errors during\n\ @@ -2743,10 +2843,6 @@ \032 override left-over archive locks. (Setting this preference is\n\ \032 dangerous! Use it only if you are positive you know what you\n\ \032 are doing.)\n\ - \032 + Running with the -timers flag set to true will now show the\n\ - \032 total time taken to check for updates on each directory.\n\ - \032 (This can be helpful for tidying directories to improve\n\ - \032 update detection times.)\n\ \032 + Added a new preference assumeContentsAreImmutable. If a\n\ \032 directory matches one of the patterns set in this preference,\n\ \032 then update detection is skipped for files in this directory.\n\ @@ -3780,7 +3876,7 @@ "Junk\n\ \032 _________________________________________________________________\n\ \n\ - \032 This document was translated from LAT[E]X by [2]HEVEA.\n\ + \032 This document was translated from L^AT[E]X by [2]H^EV^EA.\n\ \n\ References\n\ \n\ Modified: trunk/src/transport.ml =================================================================== --- trunk/src/transport.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/transport.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -22,7 +22,7 @@ let maxthreads = Prefs.createInt "maxthreads" 20 - "maximum number of simultaneous file transfers" + "!maximum number of simultaneous file transfers" ("This preference controls how much concurrency is allowed during" ^ " the transport phase. Normally, it should be set reasonably high " ^ "(default is 20) to maximize performance, but when Unison is used " Modified: trunk/src/ubase/prefs.ml =================================================================== --- trunk/src/ubase/prefs.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/ubase/prefs.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -81,6 +81,7 @@ d end +(* For debugging *) let dumpPrefsToStderr() = Printf.eprintf "Preferences:\n"; Safelist.iter @@ -130,6 +131,7 @@ (fun cell -> Uarg.String (fun s -> set cell (intern (fst !cell) s))) let createBool name default doc fulldoc = + let doc = if default then doc ^ " (default true)" else doc in createPrefInternal name default doc fulldoc (fun v -> [if v then "true" else "false"]) (fun cell -> Uarg.Bool (fun b -> set cell b)) @@ -154,32 +156,52 @@ (*****************************************************************************) let prefArg = function - Uarg.Bool(_) -> " " - | Uarg.Int(_) -> "n " + Uarg.Bool(_) -> "" + | Uarg.Int(_) -> "n" | Uarg.String(_) -> "xxx" | _ -> assert false let argspecs hook = Util.StringMap.fold (fun name (doc, pspec, _) l -> - let desc = - if String.length doc > 0 && doc.[0] = '*' then doc else - let arg = prefArg pspec in - let spaces = - String.make (max 2 (18 - String.length (name ^ arg))) ' ' in - arg ^ spaces ^ doc - in - ("-" ^ name, hook name pspec, desc)::l) + ("-" ^ name, hook name pspec, "")::l) !prefs [] -let printUsage usage = Uarg.usage (argspecs (fun _ s -> s)) usage +let oneLineDocs u = + let formatOne name pspec doc p = + if not p then "" else + let doc = if doc.[0] = '!' + then String.sub doc 1 ((String.length doc) - 1) + else doc in + let arg = prefArg pspec in + let arg = if arg = "" then "" else " " ^ arg in + let spaces = + String.make (max 1 (18 - String.length (name ^ arg))) ' ' in + " -" ^ name ^ arg ^ spaces ^ doc ^ "\n" in + let formatAll p = + String.concat "" + (Safelist.rev + (Util.StringMap.fold + (fun name (doc, pspec, _) l -> + (formatOne name pspec doc + (String.length doc > 0 && doc.[0] <> '*' && p doc)) :: l) + !prefs [])) + in + u ^ "\n" + ^ "Basic options: \n" + ^ formatAll (fun doc -> doc.[0] <> '!') + ^ "\nAdvanced options: \n" + ^ formatAll (fun doc -> doc.[0] = '!') +let printUsage usage = Uarg.usage (argspecs (fun _ s -> s)) + (oneLineDocs usage) + let processCmdLine usage hook = Uarg.current := 0; let argspecs = argspecs hook in let defaultanonfun _ = print_string "Anonymous arguments not allowed\n"; - Uarg.usage argspecs usage; + Uarg.usage argspecs (oneLineDocs usage); exit 2 in let anonfun = @@ -192,9 +214,9 @@ Not_found -> defaultanonfun in try - Uarg.parse argspecs anonfun usage + Uarg.parse argspecs anonfun (oneLineDocs usage) with IllegalValue str -> - raise(Util.Fatal(Printf.sprintf "%s \n%s\n" usage str)) + raise(Util.Fatal(Printf.sprintf "%s \n%s\n" (oneLineDocs usage) str)) let parseCmdLine usage = processCmdLine usage (fun _ sp -> sp) @@ -335,7 +357,7 @@ (*****************************************************************************) let addprefsto = createString "addprefsto" "" - "file to add new prefs to" + "!file to add new prefs to" "By default, new preferences added by Unison (e.g., new \\verb|ignore| \ clauses) will be appended to whatever preference file Unison was told \ to load at the beginning of the run. Setting the preference \ Modified: trunk/src/ubase/trace.ml =================================================================== --- trunk/src/ubase/trace.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/ubase/trace.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -15,7 +15,7 @@ let debugmods = Prefs.createStringList "debug" - "debug module xxx ('all' -> everything, 'verbose' -> more)" + "!debug module xxx ('all' -> everything, 'verbose' -> more)" ("This preference is used to make Unison print various sorts of " ^ "information about what it is doing internally on the standard " ^ "error stream. It can be used many times, each time with the name " @@ -92,14 +92,14 @@ let logging = Prefs.createBool "log" true - "record actions in file specified by logfile preference" + "!record actions in logfile" "When this flag is set, Unison will log all changes to the filesystems on a file." let logfile = Prefs.createString "logfile" (Util.fileInHomeDir "unison.log") - "Log file name" + "!logfile name" "By default, logging messages will be appended to the file \\verb|unison.log| in your HOME directory. Set this preference if you prefer another file." Modified: trunk/src/ubase/uarg.ml =================================================================== --- trunk/src/ubase/uarg.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/ubase/uarg.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -34,10 +34,11 @@ let usage speclist errmsg = printf "%s\n" errmsg; - Safelist.iter (function (key, _, doc) -> - if String.length doc > 0 && doc.[0] <> '*' - then printf " %s %s\n" key doc) - (Safelist.rev speclist) + Safelist.iter + (function (key, _, doc) -> + if String.length doc > 0 && doc.[0] <> '*' + then printf " %s %s\n" key doc) + (Safelist.rev speclist) ;; let current = ref 0;; Modified: trunk/src/ubase/uarg.mli =================================================================== --- trunk/src/ubase/uarg.mli 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/ubase/uarg.mli 2008-06-24 02:45:20 UTC (rev 290) @@ -8,7 +8,7 @@ (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) -(* Slightly modified version by BCP for Unixon, July 1999 *) +(* Slightly modified version by BCP for Unison in 1999 and 2008 *) (* Module [Uarg]: parsing of command line arguments *) Modified: trunk/src/uicommon.ml =================================================================== --- trunk/src/uicommon.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/uicommon.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -24,7 +24,7 @@ **********************************************************************) let auto = - Prefs.createBool "auto" false "automatically accept default actions" + Prefs.createBool "auto" false "automatically accept default (nonconflicting) actions" ("When set to {\\tt true}, this flag causes the user " ^ "interface to skip asking for confirmations on " ^ "non-conflicting changes. (More precisely, when the user interface " @@ -36,7 +36,7 @@ gets sent to the server at startup *) let mainWindowHeight = Prefs.createInt "height" 20 - "height (in lines) of main window in graphical interface" + "!height (in lines) of main window in graphical interface" ("Used to set the height (in lines) of the main window in the graphical " ^ "user interface.") @@ -58,7 +58,7 @@ let profileLabel = Prefs.createString "label" "" - "provide a descriptive string label for this profile" + "!provide a descriptive string label for this profile" ("Used in a profile to provide a descriptive string documenting its " ^ "settings. (This is useful for users that switch between several " ^ "profiles, especially using the `fast switch' feature of the " @@ -66,7 +66,7 @@ let profileKey = Prefs.createString "key" "" - "define a keyboard shortcut for this profile (in some UIs)" + "!define a keyboard shortcut for this profile (in some UIs)" ("Used in a profile to define a numeric key (0-9) that can be used in " ^ "the graphical user interface to switch immediately to this profile.") (* This preference is not actually referred to in the code anywhere, since @@ -76,7 +76,7 @@ let contactquietly = Prefs.createBool "contactquietly" false - "Suppress the 'contacting server' message during startup" + "!suppress the 'contacting server' message during startup" ("If this flag is set, Unison will skip displaying the " ^ "`Contacting server' message (which some users find annoying) " ^ "during startup.") @@ -86,7 +86,7 @@ let repeat = Prefs.createString "repeat" "" - "synchronize repeatedly (text interface only)" + "!synchronize repeatedly (text interface only)" ("Setting this preference causes the text-mode interface to synchronize " ^ "repeatedly, rather than doing it just once and stopping. If the " ^ "argument is a number, Unison will pause for that many seconds before " @@ -108,7 +108,7 @@ let retry = Prefs.createInt "retry" 0 - "re-try failed synchronizations N times (text interface only)" + "!re-try failed synchronizations N times (text ui only)" ("Setting this preference causes the text-mode interface to try again " ^ "to synchronize " ^ "updated paths where synchronization fails. Each such path will be " @@ -117,17 +117,18 @@ let confirmmerge = Prefs.createBool "confirmmerge" false - "ask for confirmation before commiting results of a merge" + "!ask for confirmation before commiting results of a merge" ("Setting this preference causes both the text and graphical interfaces" ^ " to ask the user if the results of a merge command may be commited " ^ " to the replica or not. Since the merge command works on temporary files," ^ " the user can then cancel all the effects of applying the merge if it" ^ " turns out that the result is not satisfactory. In " - ^ " batch-mode, this preference has no effect.") + ^ " batch-mode, this preference has no effect. Default is false.") let runTestsPrefName = "selftest" let runtests = - Prefs.createBool runTestsPrefName false "run internal tests and exit" + Prefs.createBool runTestsPrefName false + "!run internal tests and exit" ("Run internal tests and exit. This option is mostly for developers and must be used " ^ "carefully: in particular, " ^ "it will delete the contents of both roots, so that it can install its own files " @@ -323,13 +324,13 @@ if dangerousPaths = [Path.empty] then "The root of one of the replicas has been completely emptied.\n\ Unison may delete everything in the other replica. (Set the \n\ - 'confirmbigdelete' preference to false to disable this check.)" + 'confirmbigdel' preference to false to disable this check.)" else Printf.sprintf "The following paths have been completely emptied in one replica:\n \ %s\n\ Unison may delete everything below these paths in the other replica.\n - (Set the 'confirmbigdelete' preference to false to disable this check.)" + (Set the 'confirmbigdel' preference to false to disable this check.)" (String.concat "\n " (Safelist.map (fun p -> "'" ^ (Path.toString p) ^ "'") dangerousPaths)) @@ -401,7 +402,7 @@ ^ " -doc tutorial\".\n" ^ "For other documentation, type \"" ^ Uutil.myName ^ " -doc topics\".\n" -let usageMsg = coreUsageMsg ^ "\nOptions: " +let usageMsg = coreUsageMsg let debug = Trace.debug "startup" Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/uitext.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -16,7 +16,7 @@ Not_found -> false) | _ -> true) - "do not try to change terminal settings in text UI" + "!do not change terminal settings in text UI" ("When set to \\verb|true|, this flag makes the text mode user " ^ "interface avoid trying to change any of the terminal settings. " ^ "(Normally, Unison puts the terminal in `raw mode', so that it can " @@ -31,7 +31,7 @@ ^ "interface.") let silent = - Prefs.createBool "silent" false "print nothing (except error messages)" + Prefs.createBool "silent" false "print nothing except error messages" ("When this preference is set to {\\tt true}, the textual user " ^ "interface will print nothing at all, except in the case of errors. " ^ "Setting \\texttt{silent} to true automatically sets the " Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/update.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -86,7 +86,7 @@ let rootAliases : string list Prefs.t = Prefs.createStringList "rootalias" - "Register alias for canonical root names" + "!register alias for canonical root names" ("When calculating the name of the archive files for a given pair of roots," ^ " Unison replaces any roots matching the left-hand side of any rootalias" ^ " rule by the corresponding right-hand side.") @@ -144,7 +144,7 @@ let showArchiveName = Prefs.createBool "showarchive" false - "show name of archive and 'true names' (for rootalias) of roots" + "!show 'true names' (for rootalias) of roots and archive" ("When this preference is set, Unison will print out the 'true names'" ^ "of the roots, in the same form as is expected by the {\\tt rootalias}" ^ "preference.") @@ -643,7 +643,7 @@ let ignorelocks = Prefs.createBool "ignorelocks" false - "ignore locks left over from previous run (dangerous!)" + "!ignore locks left over from previous run (dangerous!)" ("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, " @@ -915,7 +915,7 @@ let mountpoints = Prefs.createStringList "mountpoint" - "abort if this path does not exist" + "!abort if this path does not exist" ("Including the preference \\texttt{-mountpoint PATH} causes Unison to " ^ "double-check, at the end of update detection, that \\texttt{PATH} exists " ^ "and abort if it does not. This is useful when Unison is used to synchronize " @@ -942,7 +942,7 @@ let fastcheck = Prefs.createString "fastcheck" "default" - "do fast update detection (`true', `false', or `default')" + "!do fast update detection (true/false/default)" ( "When this preference is set to \\verb|true|, \ Unison will use the modification time and length of a file as a `pseudo inode number' \ @@ -971,7 +971,7 @@ || (Prefs.read fastcheck = "default" && Util.osType = `Unix) || (Prefs.read fastcheck = "auto" && Util.osType = `Unix) -let immutable = Pred.create "immutable" +let immutable = Pred.create "immutable" ~advanced:true ("This preference specifies paths for directories whose \ immediate children are all immutable files --- i.e., once a file has been \ created, its contents never changes. When scanning for updates, \ @@ -979,7 +979,7 @@ this can speed update detection significantly (in particular, for mail \ directories).") -let immutablenot = Pred.create "immutablenot" +let immutablenot = Pred.create "immutablenot" ~advanced:true ("This preference overrides {\\tt immutable}.") let bigFileLength = 10 * 1024 Modified: trunk/src/xferhint.ml =================================================================== --- trunk/src/xferhint.ml 2008-06-23 22:05:17 UTC (rev 289) +++ trunk/src/xferhint.ml 2008-06-24 02:45:20 UTC (rev 290) @@ -5,7 +5,7 @@ let xferbycopying = Prefs.createBool "xferbycopying" true - "optimize transfers using local copies, if possible" + "!optimize transfers using local copies" ("When this preference is set, Unison will try to avoid transferring " ^ "file contents across the network by recognizing when a file with the " ^ "required contents already exists in the target replica. This usually " From bcpierce at seas.upenn.edu Tue Jun 24 10:55:55 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Tue, 24 Jun 2008 10:55:55 -0400 Subject: [Unison-hackers] [unison-svn] r291 - trunk/src Message-ID: <200806241455.m5OEttY5014262@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-24 10:55:54 -0400 (Tue, 24 Jun 2008) New Revision: 291 Modified: trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/mkProjectInfo.ml Log: * Fix a small bug in the external copyprog setup. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-24 02:45:20 UTC (rev 290) +++ trunk/src/RECENTNEWS 2008-06-24 14:55:54 UTC (rev 291) @@ -1,3 +1,9 @@ +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 Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-24 02:45:20 UTC (rev 290) +++ trunk/src/copy.ml 2008-06-24 14:55:54 UTC (rev 291) @@ -537,9 +537,9 @@ Safelist.find (function Clroot.ConnectLocal _ -> false | _ -> true) (Safelist.map Clroot.parseRoot (Globals.rawRoots())) with - Clroot.ConnectByShell (_,h',uo,_,_) -> + Clroot.ConnectByShell (_,rawhost,uo,_,_) -> (match uo with None -> "" | Some u -> u ^ "@") - ^ h ^ ":" + ^ rawhost ^ ":" (* Note that we don't do anything with the port -- hopefully this will not affect many people. If we did want to include it, we'd have to fiddle with the rsync parameters in a deeper way. *) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-24 02:45:20 UTC (rev 290) +++ trunk/src/mkProjectInfo.ml 2008-06-24 14:55:54 UTC (rev 291) @@ -76,3 +76,4 @@ + From bcpierce at seas.upenn.edu Tue Jun 24 21:43:41 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Tue, 24 Jun 2008 21:43:41 -0400 Subject: [Unison-hackers] [unison-svn] r292 - trunk/src Message-ID: <200806250143.m5P1hfCx004774@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-24 21:42:46 -0400 (Tue, 24 Jun 2008) New Revision: 292 Modified: trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/files.ml trunk/src/mkProjectInfo.ml Log: * 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.) Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-24 14:55:54 UTC (rev 291) +++ trunk/src/RECENTNEWS 2008-06-25 01:42:46 UTC (rev 292) @@ -1,3 +1,41 @@ +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. Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-24 14:55:54 UTC (rev 291) +++ trunk/src/copy.ml 2008-06-25 01:42:46 UTC (rev 292) @@ -482,19 +482,28 @@ (****) let copyprog = - Prefs.createString "copyprog" "rsync --partial --inplace --compress" + Prefs.createString "copyprog" "rsync --inplace --compress" "!external program for copying large files" ("A string giving the name of an " ^ "external program that can be used to copy large files efficiently " - ^ "(plus command-line switches " - ^ "telling it to copy files in-place and to resume" - ^ "interrupted transfers). " + ^ "(plus command-line switches telling it to copy files in-place). " ^ "The default setting invokes {\\tt rsync} with appropriate " ^ "options---most users should not need to change it.") +let copyprogrest = + Prefs.createString "copyprogrest" "rsync --partial --inplace --compress" + "!variant of copyprog for resuming partial transfers" + ("A variant of {\\tt copyprog} that names an external program " + ^ "that should be used to continue the transfer of a large file " + ^ "that has already been partially transferred. Typically, " + ^ "{\\tt copyprogrest} will just be {\\tt copyprog} " + ^ "with one extra option (e.g., {\\tt --partial}, for rsync). " + ^ "The default setting invokes {\\tt rsync} with appropriate " + ^ "options---most users should not need to change it.") + let copythreshold = Prefs.createInt "copythreshold" (-1) - "!use external copyprog on files this big (if >=0, in Kb)" + "!use copyprog on files bigger than this (if >=0, in Kb)" ("A number indicating above what filesize (in kilobytes) Unison should " ^ "use the external " ^ "copying utility specified by {\\tt copyprog}. Specifying 0 will cause " @@ -507,26 +516,37 @@ let tryCopyMovedFileLocal connFrom (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) = Lwt.return (tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id) - let tryCopyMovedFileOnRoot = Remote.registerRootCmdWithConnection "tryCopyMovedFile" tryCopyMovedFileLocal let setFileinfoLocal connFrom (fspathTo, pathTo, desc) = Lwt.return (Fileinfo.set fspathTo pathTo (`Set Props.fileDefault) desc) - let setFileinfoOnRoot = Remote.registerRootCmdWithConnection "setFileinfo" setFileinfoLocal -let targetExistsWithCorrectSize fspathTo pathTo desc = +let targetExists checkSize fspathTo pathTo = Os.exists fspathTo pathTo - && Props.length (Fileinfo.get false fspathTo pathTo).Fileinfo.desc = Props.length desc + && (match checkSize with + `CheckNonemptyAndMakeWriteable -> + let r = + Props.length (Fileinfo.get false fspathTo pathTo).Fileinfo.desc + > Uutil.Filesize.zero in + if r then begin + let n = Fspath.concatToString fspathTo pathTo in + let perms = (Unix.stat n).Unix.st_perm in + let perms' = perms lor 0o600 in + Unix.chmod n perms' + end; + r + | `CheckSize desc -> + Props.length (Fileinfo.get false fspathTo pathTo).Fileinfo.desc + = Props.length desc) -let targetExistsWithCorrectSizeLocal connFrom (fspathTo, pathTo, desc) = - Lwt.return (targetExistsWithCorrectSize fspathTo pathTo desc) - -let targetExistsWithCorrectSizeOnRoot = +let targetExistsLocal connFrom (checkSize, fspathTo, pathTo) = + Lwt.return (targetExists checkSize fspathTo pathTo) +let targetExistsOnRoot = Remote.registerRootCmdWithConnection - "targetExistsWithCorrectSize" targetExistsWithCorrectSizeLocal + "targetExists" targetExistsLocal let formatConnectionInfo root = match root with @@ -542,7 +562,8 @@ ^ rawhost ^ ":" (* Note that we don't do anything with the port -- hopefully this will not affect many people. If we did want to include it, - we'd have to fiddle with the rsync parameters in a deeper way. *) + we'd have to fiddle with the rsync parameters in a slightly + deeper way. *) | Clroot.ConnectBySocket (h',_,_) -> h ^ ":" | Clroot.ConnectLocal _ -> assert false @@ -555,8 +576,6 @@ >>= (fun b -> if b then Lwt.return () else begin - Trace.log (Printf.sprintf "Using external program to copy %s\n" - (Path.toString pathTo)); Uutil.showProgress id Uutil.Filesize.zero "ext"; let fromSpec = (formatConnectionInfo rootFrom) @@ -564,23 +583,29 @@ let toSpec = (formatConnectionInfo rootTo) ^ (Fspath.concatToString fspathTo pathTo) in - let cmd = (Prefs.read copyprog) ^ " " + targetExistsOnRoot + rootTo rootFrom (`CheckNonemptyAndMakeWriteable, fspathTo, pathTo) >>= (fun b -> + let prog = + if b + then Prefs.read copyprogrest + else Prefs.read copyprog in + let cmd = prog ^ " " ^ (Os.quotes fromSpec) ^ " " ^ (Os.quotes toSpec) in Trace.log (Printf.sprintf "%s\n" cmd); - (* FIX: When possible, we should run this in a Lwt, not sequentially. *) let _,log = Os.runExternalProgram cmd in debug (fun() -> Util.msg "transferFileUsingExternalCopyprog: returned\n------\n%s\n-----\n" (Util.trimWhitespace log)); - targetExistsWithCorrectSizeOnRoot rootTo rootFrom (fspathTo, pathTo, desc) + targetExistsOnRoot + rootTo rootFrom (`CheckSize desc, fspathTo, pathTo) >>= (fun b -> if not b then raise (Util.Transient (Printf.sprintf "External copy program did not create target file (or bad length): %s" (Path.toString pathTo))); Uutil.showProgress id (Props.length desc) "ext"; - Lwt.return ()) + Lwt.return ())) end) let file rootFrom pathFrom rootTo fspathTo pathTo realPathTo @@ -600,12 +625,11 @@ | _ -> (* Check whether we actually need to copy the file (or whether it already exists from some interrupted previous transfer) *) - targetExistsWithCorrectSizeOnRoot - rootTo rootFrom (fspathTo, pathTo, desc) >>= (fun b -> + targetExistsOnRoot + rootTo rootFrom (`CheckSize desc, fspathTo, pathTo) >>= (fun b -> if b then begin - debug (fun () -> - Util.msg "Skipping transfer of %s/%s because it's already there\n" - (Fspath.toString fspathTo) (Path.toString pathTo)); + Util.msg "%s/%s already exists\n" + (Fspath.toString fspathTo) (Path.toString pathTo); Lwt.return () (* Check whether we should use an external program to copy the file *) @@ -640,4 +664,3 @@ ) end >>= (fun () -> Trace.showTimer timer; Lwt.return ()) - Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2008-06-24 14:55:54 UTC (rev 291) +++ trunk/src/files.ml 2008-06-25 01:42:46 UTC (rev 292) @@ -320,6 +320,8 @@ Remote.registerRootCmd "makeSymlink" (fun (fspath, (workingDir, path, l)) -> + if Os.exists workingDir path then + Os.delete workingDir path; Os.symlink workingDir path l; Lwt.return ()) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-24 14:55:54 UTC (rev 291) +++ trunk/src/mkProjectInfo.ml 2008-06-25 01:42:46 UTC (rev 292) @@ -77,3 +77,5 @@ + + From bcpierce at seas.upenn.edu Tue Jun 24 21:53:38 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Tue, 24 Jun 2008 21:53:38 -0400 Subject: [Unison-hackers] [unison-svn] r293 - trunk/src Message-ID: <200806250153.m5P1rcjj005121@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-24 21:52:23 -0400 (Tue, 24 Jun 2008) New Revision: 293 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/strings.ml Log: * 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. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-25 01:42:46 UTC (rev 292) +++ trunk/src/RECENTNEWS 2008-06-25 01:52:23 UTC (rev 293) @@ -1,3 +1,13 @@ +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 Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-25 01:42:46 UTC (rev 292) +++ trunk/src/mkProjectInfo.ml 2008-06-25 01:52:23 UTC (rev 293) @@ -79,3 +79,4 @@ + Modified: trunk/src/strings.ml =================================================================== --- trunk/src/strings.ml 2008-06-25 01:42:46 UTC (rev 292) +++ trunk/src/strings.ml 2008-06-25 01:52:23 UTC (rev 293) @@ -4,7 +4,7 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.29.5\n\ + Version 2.29.8\n\ \n\ ")) :: @@ -1111,87 +1111,85 @@ \032 or unison root1 root2 [options]\n\ \032 or unison profilename [options]\n\ \n\ - Options:\n\ - \032 -addprefsto xxx file to add new prefs to\n\ - \032 -addversionno add version number to name of unison executable on server\n\ - \032 -auto automatically accept default actions\n\ - \032 -backup xxx add a pattern to the backup list\n\ - \032 -backupcurrent xxx add a pattern to the backupcurrent list\n\ - \032 -backupcurrentnot xxx add a pattern to the backupcurrentnot list\n\ - \032 -backupdir xxx Directory for storing centralized backups\n\ - \032 -backuplocation xxx where backups are stored ('local' or 'central')\n\ - \032 -backupnot xxx add a pattern to the backupnot list\n\ - \032 -backupprefix xxx prefix for the names of backup files\n\ - \032 -backups keep backup copies of all files (see also 'backup')\n\ - \032 -backupsuffix xxx a suffix to be added to names of backup files\n\ - \032 -batch batch mode: ask no questions at all\n\ - \032 -confirmbigdeletes request confirmation for whole-replica deletes\n\ - \032 -confirmmerge ask for confirmation before commiting results of a merge\n\ - \032 -contactquietly Suppress the 'contacting server' message during startup\n\ - \032 -copyprog xxx External program for copying large files\n\ - \032 -copythreshold n If nonnegative, use copyprog to transfer files larger tha\n\ - n this\n\ - \032 -debug xxx debug module xxx ('all' -> everything, 'verbose' -> more)\n\ - \032 -doc xxx show documentation ('-doc topics' lists topics)\n\ - \032 -dumbtty do not try to change terminal settings in text UI\n\ - \032 -fastcheck xxx do fast update detection (`true', `false', or `default')\n\ - \032 -follow xxx add a pattern to the follow list\n\ - \032 -force xxx force changes from this replica to the other\n\ - \032 -forcepartial xxx add a pattern to the forcepartial list\n\ - \032 -group synchronize group\n\ - \032 -height n height (in lines) of main window in graphical interface\n\ - \032 -host xxx bind the socket to this host name in server socket mode\n\ - \032 -ignore xxx add a pattern to the ignore list\n\ - \032 -ignorecase xxx ignore upper/lowercase in filenames (`true', `false', or\n\ - `default')\n\ - \032 -ignorelocks ignore locks left over from previous run (dangerous!)\n\ - \032 -ignorenot xxx add a pattern to the ignorenot list\n\ - \032 -immutable xxx add a pattern to the immutable list\n\ - \032 -immutablenot xxx add a pattern to the immutablenot list\n\ - \032 -key xxx define a keyboard shortcut for this profile (in some UIs)\n\ - \032 -killserver kill server when done (even when using sockets)\n\ - \032 -label xxx provide a descriptive string label for this profile\n\ - \032 -log record actions in file specified by logfile preference\n\ - \032 -logfile xxx Log file name\n\ - \032 -maxbackups n number of backed up versions of a file\n\ - \032 -maxthreads n maximum number of simultaneous file transfers\n\ - \032 -merge xxx add a pattern to the merge list\n\ - \032 -mountpoint xxx abort if this path does not exist\n\ - \032 -numericids don't map uid/gid values by user/group names\n\ - \032 -owner synchronize owner\n\ - \032 -path xxx path to synchronize\n\ - \032 -perms n part of the permissions which is synchronized\n\ - \032 -prefer xxx choose this replica's version for conflicting changes\n\ - \032 -preferpartial xxx add a pattern to the preferpartial list\n\ - \032 -pretendwin Use creation times for detecting updates\n\ - \032 -repeat xxx synchronize repeatedly (text interface only)\n\ - \032 -retry n re-try failed synchronizations N times (text interface on\n\ - ly)\n\ - \032 -root xxx root of a replica\n\ - \032 -rootalias xxx Register alias for canonical root names\n\ - \032 -rsrc xxx synchronize resource forks and HFS meta-data (`true', `fa\n\ - lse', or `default')\n\ - \032 -rsync activate the rsync transfer mode\n\ - \032 -selftest run internal tests and exit\n\ - \032 -servercmd xxx name of unison executable on remote server\n\ - \032 -showarchive show name of archive and 'true names' (for rootalias) of\n\ - roots\n\ - \032 -silent print nothing (except error messages)\n\ - \032 -socket xxx act as a server on a socket\n\ - \032 -sortbysize list changed files by size, not name\n\ - \032 -sortfirst xxx add a pattern to the sortfirst list\n\ - \032 -sortlast xxx add a pattern to the sortlast list\n\ - \032 -sortnewfirst list new before changed files\n\ - \032 -sshargs xxx other arguments (if any) for remote shell command\n\ - \032 -sshcmd xxx path to the ssh executable\n\ - \032 -terse suppress status messages\n\ - \032 -testserver exit immediately after the connection to the server\n\ - \032 -times synchronize modification times\n\ - \032 -ui xxx select user interface ('text' or 'graphic'); command-line\n\ - \032only\n\ - \032 -version print version and exit\n\ - \032 -xferbycopying optimize transfers using local copies, if possible\n\ + Basic options:\n\ + \032-auto automatically accept default (nonconflicting) actions\n\ + \032-batch batch mode: ask no questions at all\n\ + \032-doc xxx show documentation ('-doc topics' lists topics)\n\ + \032-follow xxx add a pattern to the follow list\n\ + \032-force xxx force changes from this replica to the other\n\ + \032-group synchronize group attributes\n\ + \032-ignore xxx add a pattern to the ignore list\n\ + \032-ignorenot xxx add a pattern to the ignorenot list\n\ + \032-owner synchronize owner\n\ + \032-path xxx path to synchronize\n\ + \032-perms n part of the permissions which is synchronized\n\ + \032-prefer xxx choose this replica's version for conflicting changes\n\ + \032-root xxx root of a replica (should be used exactly twice)\n\ + \032-silent print nothing except error messages\n\ + \032-terse suppress status messages\n\ + \032-testserver exit immediately after the connection to the server\n\ + \032-times synchronize modification times\n\ + \032-version print version and exit\n\ \n\ + Advanced options:\n\ + \032-addprefsto xxx file to add new prefs to\n\ + \032-addversionno add version number to name of unison on server\n\ + \032-backup xxx add a pattern to the backup list\n\ + \032-backupcurr xxx add a pattern to the backupcurr list\n\ + \032-backupcurrnot xxx add a pattern to the backupcurrnot list\n\ + \032-backupdir xxx directory for storing centralized backups\n\ + \032-backuploc xxx where backups are stored ('local' or 'central')\n\ + \032-backupnot xxx add a pattern to the backupnot list\n\ + \032-backupprefix xxx prefix for the names of backup files\n\ + \032-backups keep backup copies of all files (see also 'backup')\n\ + \032-backupsuffix xxx a suffix to be added to names of backup files\n\ + \032-confirmbigdel ask about whole-replica (or path) deletes (default true)\n\ + \032-confirmmerge ask for confirmation before commiting results of a merge\n\ + \032-contactquietly suppress the 'contacting server' message during startup\n\ + \032-copyprog xxx external program for copying large files\n\ + \032-copyprogrest xxx variant of copyprog for resuming partial transfers\n\ + \032-copythreshold n use copyprog on files bigger than this (if >=0, in Kb)\n\ + \032-debug xxx debug module xxx ('all' -> everything, 'verbose' -> more)\n\ + \032-diff xxx command for showing differences between files\n\ + \032-dumbtty do not change terminal settings in text UI (default true)\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\ + \032-host xxx bind the socket to this host name in server socket mode\n\ + \032-ignorecase xxx identify upper/lowercase filenames (true/false/default)\n\ + \032-ignorelocks ignore locks left over from previous run (dangerous!)\n\ + \032-immutable xxx add a pattern to the immutable list\n\ + \032-immutablenot xxx add a pattern to the immutablenot list\n\ + \032-key xxx define a keyboard shortcut for this profile (in some UIs)\n\ + \032-killserver kill server when done (even when using sockets)\n\ + \032-label xxx provide a descriptive string label for this profile\n\ + \032-log record actions in logfile (default true)\n\ + \032-logfile xxx logfile name\n\ + \032-maxbackups n number of backed up versions of a file\n\ + \032-maxthreads n maximum number of simultaneous file transfers\n\ + \032-merge xxx add a pattern to the merge list\n\ + \032-mountpoint xxx abort if this path does not exist\n\ + \032-numericids don't map uid/gid values by user/group names\n\ + \032-preferpartial xxx add a pattern to the preferpartial list\n\ + \032-pretendwin Use creation times for detecting updates\n\ + \032-repeat xxx synchronize repeatedly (text interface only)\n\ + \032-retry n re-try failed synchronizations N times (text ui only)\n\ + \032-rootalias xxx register alias for canonical root names\n\ + \032-rsrc xxx synchronize resource forks (true/false/default)\n\ + \032-rsync activate the rsync transfer mode (default true)\n\ + \032-selftest run internal tests and exit\n\ + \032-servercmd xxx name of unison executable on remote server\n\ + \032-showarchive show 'true names' (for rootalias) of roots and archive\n\ + \032-socket xxx act as a server on a socket\n\ + \032-sortbysize list changed files by size, not name\n\ + \032-sortfirst xxx add a pattern to the sortfirst list\n\ + \032-sortlast xxx add a pattern to the sortlast list\n\ + \032-sortnewfirst list new before changed files\n\ + \032-sshargs xxx other arguments (if any) for remote shell command\n\ + \032-sshcmd xxx path to the ssh executable\n\ + \032-ui xxx select UI ('text' or 'graphic'); command-line only\n\ + \032-xferbycopying optimize transfers using local copies (default true)\n\ + \n\ \032 Here, in more detail, is what they do. Many are discussed in greater\n\ \032 detail in other sections of the manual.\n\ \032 addprefsto xxx\n\ @@ -1223,9 +1221,9 @@ \032 kept is determined by the maxbackups preference.\n\ \032 The syntax of pathspec is described in the section \"Path\n\ \032 Specification\" .\n\ - \032 backupcurrent xxx\n\ - \032 Including the preference -backupcurrent pathspec causes Unison\n\ - \032 to keep a backup of the current version of every file matching\n\ + \032 backupcurr xxx\n\ + \032 Including the preference -backupcurr pathspec causes Unison to\n\ + \032 keep a backup of the current version of every file matching\n\ \032 pathspec. This file will be saved as a backup with version\n\ \032 number 000. Such backups can be used as inputs to external\n\ \032 merging programs, for instance. See the documentatation for the\n\ @@ -1233,14 +1231,14 @@ \032 Conflicting Versions\" .\n\ \032 The syntax of pathspec is described in the section \"Path\n\ \032 Specification\" .\n\ - \032 backupcurrentnot xxx\n\ - \032 Exceptions to backupcurrent, like the ignorenot preference.\n\ + \032 backupcurrnot xxx\n\ + \032 Exceptions to backupcurr, like the ignorenot preference.\n\ \032 backupdir xxx\n\ \032 If this preference is set, Unison will use it as the name of\n\ \032 the directory used to store backup files specified by the\n\ \032 backup preference, when backuplocation is set to central. It is\n\ \032 checked after the UNISONBACKUPDIR environment variable.\n\ - \032 backuplocation xxx\n\ + \032 backuploc xxx\n\ \032 This preference determines whether backups should be kept\n\ \032 locally, near the original files, or in a central directory\n\ \032 specified by the backupdir preference. If set to local, backups\n\ @@ -1274,8 +1272,8 @@ \032 When this is set to true, the user interface will ask no\n\ \032 questions at all. Non-conflicting changes will be propagated;\n\ \032 conflicts will be skipped.\n\ - \032 confirmbigdeletes \n\ - \032 When this is set to true, Unison will request an extra\n\ + \032 confirmbigdel \n\ + \032 !When this is set to true, Unison will request an extra\n\ \032 confirmation if it appears that the entire replica has been\n\ \032 deleted, before propagating the change. If the batch flag is\n\ \032 also set, synchronization will be aborted. When the path\n\ @@ -1289,7 +1287,7 @@ \032 works on temporary files, the user can then cancel all the\n\ \032 effects of applying the merge if it turns out that the result\n\ \032 is not satisfactory. In batch-mode, this preference has no\n\ - \032 effect.\n\ + \032 effect. Default is false.\n\ \032 contactquietly \n\ \032 If this flag is set, Unison will skip displaying the\n\ \032 `Contacting server' message (which some users find annoying)\n\ @@ -1297,17 +1295,23 @@ \032 copyprog xxx\n\ \032 A string giving the name of an external program that can be\n\ \032 used to copy large files efficiently (plus command-line\n\ - \032 switches telling it to copy files in-place and to\n\ - \032 resumeinterrupted transfers). The default setting invokes rsync\n\ - \032 with appropriate options--most users should not need to change\n\ - \032 it.\n\ - \032 copythreshold n \n\ + \032 switches telling it to copy files in-place). The default\n\ + \032 setting invokes rsync with appropriate options--most users\n\ + \032 should not need to change it.\n\ + \032 copyprogrest xxx\n\ + \032 A variant of copyprog that names an external program that\n\ + \032 should be used to continue the transfer of a large file that\n\ + \032 has already been partially transferred. Typically, copyprogrest\n\ + \032 will just be copyprog with one extra option (e.g., -partial,\n\ + \032 for rsync). The default setting invokes rsync with appropriate\n\ + \032 options--most users should not need to change it.\n\ + \032 copythreshold n\n\ \032 A number indicating above what filesize (in kilobytes) Unison\n\ \032 should use the external copying utility specified by copyprog.\n\ \032 Specifying 0 will cause all copies to use the external program;\n\ \032 a negative number will prevent any files from using it. The\n\ - \032 default is -1. the section \"Making Unison Faster on Large\n\ - \032 Files\"\n\ + \032 default is -1. See the section \"Making Unison Faster on Large\n\ + \032 Files\" for more information.\n\ \032 debug xxx\n\ \032 This preference is used to make Unison print various sorts of\n\ \032 information about what it is doing internally on the standard\n\ @@ -1406,7 +1410,7 @@ \032 When this flag is set to true, the group attributes of the\n\ \032 files are synchronized. Whether the group names or the group\n\ \032 identifiers are synchronizeddepends on the preference numerids.\n\ - \032 height n \n\ + \032 height n\n\ \032 Used to set the height (in lines) of the main window in the\n\ \032 graphical user interface.\n\ \032 ignore xxx\n\ @@ -1491,11 +1495,11 @@ \032 By default, logging messages will be appended to the file\n\ \032 unison.log in your HOME directory. Set this preference if you\n\ \032 prefer another file.\n\ - \032 maxbackups n \n\ + \032 maxbackups n\n\ \032 This preference specifies the number of backup versions that\n\ \032 will be kept by unison, for each path that matches the\n\ \032 predicate backup. The default is 2.\n\ - \032 maxthreads n \n\ + \032 maxthreads n\n\ \032 This preference controls how much concurrency is allowed during\n\ \032 the transport phase. Normally, it should be set reasonably high\n\ \032 (default is 20) to maximize performance, but when Unison is\n\ @@ -1534,7 +1538,7 @@ \032 (This is useful for doing a fast sync of just one directory,\n\ \032 for example.) Note that path preferences are intepreted\n\ \032 literally--they are not regular expressions.\n\ - \032 perms n \n\ + \032 perms n\n\ \032 The integer value of this preference is a mask indicating which\n\ \032 permission bits should be synchronized. It is set by default to\n\ \032 0o1777: all bits but the set-uid and set-gid bits are\n\ @@ -1572,7 +1576,7 @@ \032 synchronize repeatedly, rather than doing it just once and\n\ \032 stopping. If the argument is a number, Unison will pause for\n\ \032 that many seconds before beginning again.\n\ - \032 retry n \n\ + \032 retry n\n\ \032 Setting this preference causes the text-mode interface to try\n\ \032 again to synchronize updated paths where synchronization fails.\n\ \032 Each such path will be tried N times.\n\ @@ -2539,8 +2543,8 @@ \n\ ")) :: - ("news", ("Changes in Version 2.29.5", - "Changes in Version 2.29.5\n\ + ("news", ("Changes in Version 2.29.8", + "Changes in Version 2.29.8\n\ \n\ \032 Changes since 2.17:\n\ \032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\ From Jerome.Vouillon at pps.jussieu.fr Wed Jun 25 04:52:26 2008 From: Jerome.Vouillon at pps.jussieu.fr (vouillon) Date: Wed, 25 Jun 2008 10:52:26 +0200 Subject: [Unison-hackers] [unison-svn] r285 - in trunk: . doc src src/lwt In-Reply-To: <200806211518.m5LFI1O7023298@yaws.seas.upenn.edu> References: <200806211518.m5LFI1O7023298@yaws.seas.upenn.edu> Message-ID: <20080625085226.GA16994@pps.jussieu.fr> Hi Benjamin, > * 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 I suspect this has something to do with the hack in function Copy.tryCopyMovedFile. At least, someone synchronizing with a Windows machine reported that the assertion failure happened to him only when xferbycopying was set to true. I suspect that some Windows ssh servers merges stderr and stdout. As under Windows some information gets written on stderr when xferbycopying is true, the client receive a corrupted stream of data. Does this fit the other bug reports? -- Jerome From bcpierce at cis.upenn.edu Wed Jun 25 09:08:35 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Wed, 25 Jun 2008 09:08:35 -0400 Subject: [Unison-hackers] [unison-svn] r285 - in trunk: . doc src src/lwt In-Reply-To: <20080625085226.GA16994@pps.jussieu.fr> References: <200806211518.m5LFI1O7023298@yaws.seas.upenn.edu> <20080625085226.GA16994@pps.jussieu.fr> Message-ID: <53DDEB52-39E2-4D7C-A636-C5052F66B3C4@cis.upenn.edu> Hi Jerome! >> * 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 > > I suspect this has something to do with the hack in function > Copy.tryCopyMovedFile. At least, someone synchronizing with > a Windows machine reported that the assertion failure happened > to him only when xferbycopying was set to true. I suspect that > some Windows ssh servers merges stderr and stdout. As under > Windows some information gets written on stderr when xferbycopying > is true, the client receive a corrupted stream of data. > > Does this fit the other bug reports? I've forgotten the details of the reports we've received about this, except for one more that also supports your hypothesis: This assertion failure seems to have appeared sometime after version 2.13. Assuming this is really the problem, I guess the best fix is just to turn off these messages completely when some host is running Windows. Users may be a little confused if they also sometimes use Unison to sync non-Windows boxes, but this seems minor. Thanks for the help!! - Benjamin From bcpierce at seas.upenn.edu Wed Jun 25 09:25:47 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Wed, 25 Jun 2008 09:25:47 -0400 Subject: [Unison-hackers] [unison-svn] r294 - trunk/src Message-ID: <200806251325.m5PDPl9X029472@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-25 09:25:42 -0400 (Wed, 25 Jun 2008) New Revision: 294 Modified: trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/mkProjectInfo.ml Log: * Trying a possible fix for the "assert failure in remote.ml" bug (thanks Jerome!) Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-25 01:52:23 UTC (rev 293) +++ trunk/src/RECENTNEWS 2008-06-25 13:25:42 UTC (rev 294) @@ -1,3 +1,10 @@ +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. Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-25 01:52:23 UTC (rev 293) +++ trunk/src/copy.ml 2008-06-25 13:25:42 UTC (rev 294) @@ -387,6 +387,22 @@ (****) +(* BCP '06: This is a hack to work around a bug on the Windows platform + that causes lightweight threads on the server to hang. I conjecture that + the problem has to do with the RPC mechanism, which was used here to + make a call *back* from the server to the client inside Trace.log so that + the log message would be appended to the log file on the client. *) +(* BCP '08: Jerome thinks that printing these messages using Util.msg + may be causing the dreaded "assertion failure in remote.ml," which + happens only on windows and seems correlated with the xferbycopying + switch. The conjecture is that some windows ssh servers may combine + the stdout and stderr streams, which would result in these messages + getting interleaved with Unison's RPC protocol stream. *) +let loggit s = + if Prefs.read Globals.someHostIsRunningWindows + then () (* Util.msg "%s" *) + else Trace.log s + let tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id = Prefs.read Xferhint.xferbycopying && @@ -394,13 +410,6 @@ Util.convertUnixErrorsToTransient "tryCopyMovedFile" (fun() -> debug (fun () -> Util.msg "tryCopyMovedFile: -> %s /%s/\n" (Path.toString pathTo) (Os.fullfingerprint_to_string fp)); - (* BCP '06: This is a hack to work around a bug on the Windows platform - that causes lightweight threads on the server to hang. I conjecture that - the problem has to do with the RPC mechanism, which was used here to - make a call *back* from the server to the client inside Trace.log so that - the log message would be appended to the log file on the client. *) - let loggit = if Prefs.read Globals.someHostIsRunningWindows - then Util.msg "%s" else Trace.log in match Xferhint.lookup fp with None -> false @@ -592,7 +601,7 @@ let cmd = prog ^ " " ^ (Os.quotes fromSpec) ^ " " ^ (Os.quotes toSpec) in - Trace.log (Printf.sprintf "%s\n" cmd); + loggit (Printf.sprintf "%s\n" cmd); let _,log = Os.runExternalProgram cmd in debug (fun() -> Util.msg "transferFileUsingExternalCopyprog: returned\n------\n%s\n-----\n" Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-25 01:52:23 UTC (rev 293) +++ trunk/src/mkProjectInfo.ml 2008-06-25 13:25:42 UTC (rev 294) @@ -80,3 +80,4 @@ + From bcpierce at cis.upenn.edu Wed Jun 25 09:47:07 2008 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Wed, 25 Jun 2008 09:47:07 -0400 Subject: [Unison-hackers] Call for alpha-testers Message-ID: <518B6BA6-127B-4907-A392-8207D9BA02D1@cis.upenn.edu> All, As you'll have noticed from the commit logs, Alan and I have been doing quite a bit of hacking the past week, trying to improve Unison's ability to deal with large files and directories. This has required some major internal changes, which will take a little time to fully stabilize, but we *believe* that we've left all of Unison's paranoid double-checking mechanisms in place, so the new functionality should at least be fail-safe. We'd love to have a few other people using it at this point, to help us shake out the last remaining bugs. We've done two main things: * Added support for resuming directory transfers if Unison is interrupted in the middle. This functionality is always on, now. * Added support for using an external utility for single-file transfers. (Unison's built-in transport mechanism is not very fast for this case, so an external program like rsync can substantially improve performance.) If the external program is able to resume interrupted transfers, this will make things even faster. This functionality is enabled by setting the flag "copythreshhold" to something non-negative. Setting it to zero will use the external program for all whole-file transfers (i.e., where the file has been created on one host). Setting it to something positive will use the external program for transferring files larger than this value (in KB). The external utility is rsync by default. If you want to use a different one, set the "copyprog" and "copyprogrest" preferences. (They are documented in copy.ml.) Please post a note here with any experiences, positive or negative. Thanks! - Benjamin P.S. Since things are changing fast, I have not packaged the new version as an explicit "release" -- better that alpha-testers just grab the current svn sources. From bcpierce at seas.upenn.edu Fri Jun 27 09:03:47 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Fri, 27 Jun 2008 09:03:47 -0400 Subject: [Unison-hackers] [unison-svn] r295 - trunk/src Message-ID: <200806271303.m5RD3lfl002881@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-27 09:03:38 -0400 (Fri, 27 Jun 2008) New Revision: 295 Modified: trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/files.ml trunk/src/mkProjectInfo.ml trunk/src/update.ml trunk/src/update.mli Log: * A better fix for the "single file transfer failed in large directory" issue. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-25 13:25:42 UTC (rev 294) +++ trunk/src/RECENTNEWS 2008-06-27 13:03:38 UTC (rev 295) @@ -1,3 +1,9 @@ +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 Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-25 13:25:42 UTC (rev 294) +++ trunk/src/copy.ml 2008-06-27 13:03:38 UTC (rev 295) @@ -637,7 +637,7 @@ targetExistsOnRoot rootTo rootFrom (`CheckSize desc, fspathTo, pathTo) >>= (fun b -> if b then begin - Util.msg "%s/%s already exists\n" + Util.msg "%s/%s has already been transferred\n" (Fspath.toString fspathTo) (Path.toString pathTo); Lwt.return () (* Check whether we should use an external program to copy the Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2008-06-25 13:25:42 UTC (rev 294) +++ trunk/src/files.ml 2008-06-27 13:03:38 UTC (rev 295) @@ -75,13 +75,14 @@ (* FIX: maybe we should rename the destination before making any check ? *) let delete rootFrom pathFrom rootTo pathTo ui = Update.transaction (fun id -> - Update.replaceArchive rootFrom pathFrom None Update.NoArchive id true + Update.replaceArchive rootFrom pathFrom None Update.NoArchive id true false >>= (fun _ -> (* Unison do the next line cause we want to keep a backup of the file. FIX: We only need this when we are making backups *) Update.updateArchive rootTo pathTo ui id >>= (fun _ -> Update.replaceArchive - rootTo pathTo None Update.NoArchive id true >>= (fun localPathTo -> + rootTo pathTo None Update.NoArchive id true false + >>= (fun localPathTo -> (* Make sure the target is unchanged *) (* (There is an unavoidable race condition here.) *) Update.checkNoUpdates rootTo pathTo ui >>= (fun () -> @@ -424,7 +425,8 @@ in (* BCP (6/08): We used to have an unwindProtect here that would *always* do the final performDelete. This was removed so that failed partial transfers can - be restarted. *) + be restarted. We instead remove individual failing files (not + directories) inside replaceArchive. *) Update.transaction (fun id -> (* Update the archive on the source replica (but don't commit the changes yet) and return the part of the new archive @@ -437,17 +439,12 @@ in copyRec localPathFrom tempPathTo realPathTo archFrom >>= (fun () -> make_backup >>= (fun _ -> - (* BCP: We put the unwindProtect here instead, so that we clean everything - up if there is a failure during the paranoid checking phase. *) - Remote.Thread.unwindProtect - (fun () -> - Update.replaceArchive - rootTo pathTo (Some (workingDir, tempPathTo)) - archFrom id true >>= (fun _ -> - rename rootTo pathTo localPathTo workingDir tempPathTo realPathTo uiTo)) - (fun _ -> - debug (fun() -> Util.msg "Removing temp files\n"); - performDelete rootTo (Some workingDir, tempPathTo) )))))) + Update.replaceArchive + rootTo pathTo (Some (workingDir, tempPathTo)) + archFrom id true true >>= (fun _ -> + rename rootTo pathTo localPathTo workingDir tempPathTo realPathTo uiTo >>= (fun() -> + debug (fun() -> Util.msg "Removing temp files\n"); + performDelete rootTo (Some workingDir, tempPathTo) ))))))) (* ------------------------------------------------------------ *) @@ -899,10 +896,10 @@ (fun transid -> Update.replaceArchive root1 path (Some(workingDirForMerge, workingarch)) - new_archive_entry transid false >>= (fun _ -> + new_archive_entry transid false false >>= (fun _ -> Update.replaceArchive root2 path (Some(workingDirForMerge, workingarch)) - new_archive_entry transid false >>= (fun _ -> + new_archive_entry transid false false >>= (fun _ -> Lwt.return ()))) end else (Lwt.return ()) )))) ) Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-25 13:25:42 UTC (rev 294) +++ trunk/src/mkProjectInfo.ml 2008-06-27 13:03:38 UTC (rev 295) @@ -5,8 +5,8 @@ let projectName = "unison" let majorVersion = 2 -let minorVersion = 29 -let pointVersionOrigin = 284 (* Revision that corresponds to point version 0 *) +let minorVersion = 30 +let pointVersionOrigin = 294 (* Revision that corresponds to point version 0 *) (* Documentation: This is a program to construct a version of the form Major.Minor.Point, @@ -81,3 +81,4 @@ + Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2008-06-25 13:25:42 UTC (rev 294) +++ trunk/src/update.ml 2008-06-27 13:03:38 UTC (rev 295) @@ -1723,13 +1723,14 @@ Tree.map (fun n -> n) (fun (uc1,uc2) -> uc2) equals]) end -let rec replaceArchiveRec fspath path arch paranoid = +let rec replaceArchiveRec fspath path arch paranoid deleteBadTempFiles = match arch with ArchiveDir (desc, children) -> ArchiveDir (desc, NameMap.mapi (fun nm a -> - replaceArchiveRec fspath (Path.child path nm) a paranoid) + replaceArchiveRec + fspath (Path.child path nm) a paranoid deleteBadTempFiles) children) | ArchiveFile (desc, dig, stamp, ress) -> if paranoid then begin @@ -1738,11 +1739,13 @@ let info = Fileinfo.get false fspath path in let dig' = Os.fingerprint fspath path info in let ress' = Osx.stamp info.Fileinfo.osX in - if dig' <> dig then - raise (Util.Transient - (Printf.sprintf - "The file %s was incorrectly transferred \ - (fingerprint mismatch)" (Path.toString path))); + if dig' <> dig then begin + if deleteBadTempFiles then Os.delete fspath path; + raise (Util.Transient (Printf.sprintf + "The file %s was incorrectly transferred (fingerprint mismatch)%s" + (Path.toString path) + (if deleteBadTempFiles then " -- temp file removed" else ""))); + end; ArchiveFile (Props.override info.Fileinfo.desc desc, dig, Fileinfo.stamp info, ress') end else begin @@ -1753,7 +1756,7 @@ | NoArchive -> arch -let replaceArchiveLocal fspath pathTo location arch id paranoid = +let replaceArchiveLocal fspath pathTo location arch id paranoid deleteBadTempFiles = debug (fun() -> Util.msg "replaceArchiveLocal %s %s\n" (Fspath.toString fspath) @@ -1766,7 +1769,8 @@ None -> (fspath, localPath) | Some loc -> loc in - let newArch = replaceArchiveRec workingDir tempPathTo arch paranoid in + let newArch = + replaceArchiveRec workingDir tempPathTo arch paranoid deleteBadTempFiles in let commit () = debug (fun() -> Util.msg "replaceArchiveLocal: committing\n"); let _ = Stasher.stashCurrentVersion fspath localPath (Some tempPathTo) in @@ -1783,11 +1787,13 @@ let replaceArchiveOnRoot = Remote.registerRootCmd "replaceArchive" - (fun (fspath, (pathTo, location, arch, id, paranoid)) -> - Lwt.return (replaceArchiveLocal fspath pathTo location arch id paranoid)) + (fun (fspath, (pathTo, location, arch, id, paranoid, deleteBadTempFiles)) -> + Lwt.return (replaceArchiveLocal fspath pathTo location arch + id paranoid deleteBadTempFiles)) -let replaceArchive root pathTo location archive id paranoid = - replaceArchiveOnRoot root (pathTo, location, archive, id, paranoid) +let replaceArchive root pathTo location archive id paranoid deleteBadTempFiles = + replaceArchiveOnRoot root + (pathTo, location, archive, id, paranoid, deleteBadTempFiles) (* Update the archive to reflect - the last observed state of the file on disk (ui) Modified: trunk/src/update.mli =================================================================== --- trunk/src/update.mli 2008-06-25 13:25:42 UTC (rev 294) +++ trunk/src/update.mli 2008-06-27 13:03:38 UTC (rev 295) @@ -42,7 +42,7 @@ (* Replace a part of an archive by another archive *) val replaceArchive : Common.root -> Path.t -> (Fspath.t * Path.local) option -> - archive -> transaction -> bool -> Path.local Lwt.t + archive -> transaction -> bool -> bool -> Path.local Lwt.t (* Update only some permissions *) val updateProps : Common.root -> Path.t -> Props.t option -> Common.updateItem -> From schmitta at seas.upenn.edu Fri Jun 27 12:21:28 2008 From: schmitta at seas.upenn.edu (ALAN SCHMITT) Date: Fri, 27 Jun 2008 12:21:28 -0400 Subject: [Unison-hackers] [unison-svn] r296 - trunk/src Message-ID: <200806271621.m5RGLS70010028@yaws.seas.upenn.edu> Author: schmitta Date: 2008-06-27 12:21:22 -0400 (Fri, 27 Jun 2008) New Revision: 296 Modified: trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/mkProjectInfo.ml trunk/src/os.ml trunk/src/os.mli trunk/src/update.ml Log: - Fixed handling of paths containing spaces when using rsync - Better error report for fingerprint mismatch Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-27 13:03:38 UTC (rev 295) +++ trunk/src/RECENTNEWS 2008-06-27 16:21:22 UTC (rev 296) @@ -1,3 +1,8 @@ +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. Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-27 13:03:38 UTC (rev 295) +++ trunk/src/copy.ml 2008-06-27 16:21:22 UTC (rev 296) @@ -522,6 +522,17 @@ ^ "See \\sectionref{speeding}{Making Unison Faster on Large Files} " ^ "for more information.") +let copyquoterem = + Prefs.createString "copyquoterem" "default" + "!add quotes to remote file name for copyprog (true/false/default)" + ("When set to {\\tt true}, this flag causes Unison to add an extra layer " + ^ "of quotes to the remote path passed to the external copy program. " + ^ "This is needed by rsync, for example, which internal uses an ssh " + ^ "connection requiring an extra level of quoting for paths containing " + ^ "spaces. When this flag is set to {\\tt default}, extra quotes are " + ^ "added if the value of {\tt copyprog} contains the string " + ^ "{\tt rsync}.") + let tryCopyMovedFileLocal connFrom (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) = Lwt.return (tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id) @@ -586,22 +597,29 @@ if b then Lwt.return () else begin Uutil.showProgress id Uutil.Filesize.zero "ext"; - let fromSpec = - (formatConnectionInfo rootFrom) - ^ (Fspath.concatToString (snd rootFrom) pathFrom) in - let toSpec = - (formatConnectionInfo rootTo) - ^ (Fspath.concatToString fspathTo pathTo) in targetExistsOnRoot rootTo rootFrom (`CheckNonemptyAndMakeWriteable, fspathTo, pathTo) >>= (fun b -> let prog = if b then Prefs.read copyprogrest else Prefs.read copyprog in + let extraquotes = Prefs.read copyquoterem = "true" + || ( Prefs.read copyquoterem = "default" + && Util.findsubstring "rsync" prog <> None) in + let addquotes root s = + match root with + | Common.Local, _ -> s + | Common.Remote _, _ -> if extraquotes then Os.quotes s else s in + let fromSpec = + (formatConnectionInfo rootFrom) + ^ (addquotes rootFrom (Fspath.concatToString (snd rootFrom) pathFrom)) in + let toSpec = + (formatConnectionInfo rootTo) + ^ (addquotes rootTo (Fspath.concatToString fspathTo pathTo)) in let cmd = prog ^ " " ^ (Os.quotes fromSpec) ^ " " ^ (Os.quotes toSpec) in - loggit (Printf.sprintf "%s\n" cmd); + Trace.log (Printf.sprintf "%s\n" cmd); let _,log = Os.runExternalProgram cmd in debug (fun() -> Util.msg "transferFileUsingExternalCopyprog: returned\n------\n%s\n-----\n" Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-27 13:03:38 UTC (rev 295) +++ trunk/src/mkProjectInfo.ml 2008-06-27 16:21:22 UTC (rev 296) @@ -82,3 +82,4 @@ + Modified: trunk/src/os.ml =================================================================== --- trunk/src/os.ml 2008-06-27 13:03:38 UTC (rev 295) +++ trunk/src/os.ml 2008-06-27 16:21:22 UTC (rev 296) @@ -124,15 +124,15 @@ if Util.endswith file !tempFileSuffix then begin let p = Path.child path filename in let i = Fileinfo.get false fspath p in - let secondsinaweek = 604800.0 in - if Props.time i.Fileinfo.desc +. secondsinaweek < Util.time() + let secondsinthirtydays = 2592000.0 in + if Props.time i.Fileinfo.desc +. secondsinthirtydays < Util.time() then begin debug (fun()-> Util.msg "deleting old temp file %s\n" (Fspath.concatToString fspath p)); delete fspath p end else debug (fun()-> Util.msg - "keeping temp file %s since it is less than a week old\n" + "keeping temp file %s since it is less than 30 days old\n" (Fspath.concatToString fspath p)); end; false @@ -267,6 +267,11 @@ let fullfingerprint_to_string (fp,rfp) = Printf.sprintf "(%s,%s)" (Fingerprint.toString fp) (Fingerprint.toString rfp) +let reasonForFingerprintMismatch (digdata,digress) (digdata',digress') = + if digdata = digdata' then "resource fork" + else if digress = digress' then "file contents" + else "both file contents and resource fork" + let fullfingerprint_dummy = (Fingerprint.dummy,Fingerprint.dummy) (*****************************************************************************) Modified: trunk/src/os.mli =================================================================== --- trunk/src/os.mli 2008-06-27 13:03:38 UTC (rev 295) +++ trunk/src/os.mli 2008-06-27 16:21:22 UTC (rev 296) @@ -29,6 +29,7 @@ if any. *) type fullfingerprint val fullfingerprint_to_string : fullfingerprint -> string +val reasonForFingerprintMismatch : fullfingerprint -> fullfingerprint -> string val fullfingerprint_dummy : fullfingerprint (* Use this function if the file may change during fingerprinting *) Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2008-06-27 13:03:38 UTC (rev 295) +++ trunk/src/update.ml 2008-06-27 16:21:22 UTC (rev 296) @@ -1742,8 +1742,9 @@ if dig' <> dig then begin if deleteBadTempFiles then Os.delete fspath path; raise (Util.Transient (Printf.sprintf - "The file %s was incorrectly transferred (fingerprint mismatch)%s" + "The file %s was incorrectly transferred (fingerprint mismatch in %s)%s" (Path.toString path) + (Os.reasonForFingerprintMismatch dig dig') (if deleteBadTempFiles then " -- temp file removed" else ""))); end; ArchiveFile (Props.override info.Fileinfo.desc desc, From schmitta at seas.upenn.edu Fri Jun 27 12:26:06 2008 From: schmitta at seas.upenn.edu (ALAN SCHMITT) Date: Fri, 27 Jun 2008 12:26:06 -0400 Subject: [Unison-hackers] [unison-svn] r297 - trunk/src Message-ID: <200806271626.m5RGQ64s010184@yaws.seas.upenn.edu> Author: schmitta Date: 2008-06-27 12:26:02 -0400 (Fri, 27 Jun 2008) New Revision: 297 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/os.ml Log: fix quoting for Unix Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-27 16:21:22 UTC (rev 296) +++ trunk/src/RECENTNEWS 2008-06-27 16:26:02 UTC (rev 297) @@ -1,3 +1,8 @@ +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 Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-27 16:21:22 UTC (rev 296) +++ trunk/src/mkProjectInfo.ml 2008-06-27 16:26:02 UTC (rev 297) @@ -83,3 +83,4 @@ + Modified: trunk/src/os.ml =================================================================== --- trunk/src/os.ml 2008-06-27 16:21:22 UTC (rev 296) +++ trunk/src/os.ml 2008-06-27 16:26:02 UTC (rev 297) @@ -41,7 +41,7 @@ if Util.osType = `Win32 && not Util.isCygwin then "\"" ^ s ^ "\"" else - "'" ^ Util.replacesubstring s "'" "'\''" ^ "'" + "'" ^ Util.replacesubstring s "'" "'\\''" ^ "'" (*****************************************************************************) (* QUERYING THE FILESYSTEM *) From bcpierce at seas.upenn.edu Fri Jun 27 13:30:36 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Fri, 27 Jun 2008 13:30:36 -0400 Subject: [Unison-hackers] [unison-svn] r298 - trunk/src Message-ID: <200806271730.m5RHUaGa012536@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-27 13:30:32 -0400 (Fri, 27 Jun 2008) New Revision: 298 Modified: trunk/src/INSTALL.win32 trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/mkProjectInfo.ml trunk/src/strings.ml Log: * Update docs Modified: trunk/src/INSTALL.win32 =================================================================== --- trunk/src/INSTALL.win32 2008-06-27 16:26:02 UTC (rev 297) +++ trunk/src/INSTALL.win32 2008-06-27 17:30:32 UTC (rev 298) @@ -1,9 +1,9 @@ Installation notes to build Unison on Windows systems -We provide two options for building Unison on MS Windows. -Both options require the Cygwin layer to be able to use a few GNU -tools as well as the OCaml distribution version 3.04. The options -differ in the C compiler employed: MS Visual C++ (MSVC) vs Cygwin GNU C. +We provide two options for building Unison on MS Windows. Both +options require the Cygwin layer to be able to use a few GNU tools as +well as the OCaml distribution version. The options differ in the C +compiler employed: MS Visual C++ (MSVC) vs Cygwin GNU C. Tradeoff? . Only the MSVC option can produce statically linked Unison executable. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-27 16:26:02 UTC (rev 297) +++ trunk/src/RECENTNEWS 2008-06-27 17:30:32 UTC (rev 298) @@ -1,3 +1,10 @@ +CHANGES FROM VERSION 2.30.3 + +* Update docs + + + +------------------------------- CHANGES FROM VERSION 2.30.2 fix quoting for Unix Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2008-06-27 16:26:02 UTC (rev 297) +++ trunk/src/copy.ml 2008-06-27 17:30:32 UTC (rev 298) @@ -530,8 +530,8 @@ ^ "This is needed by rsync, for example, which internal uses an ssh " ^ "connection requiring an extra level of quoting for paths containing " ^ "spaces. When this flag is set to {\\tt default}, extra quotes are " - ^ "added if the value of {\tt copyprog} contains the string " - ^ "{\tt rsync}.") + ^ "added if the value of {\\tt copyprog} contains the string " + ^ "{\\tt rsync}.") let tryCopyMovedFileLocal connFrom (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) = Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-27 16:26:02 UTC (rev 297) +++ trunk/src/mkProjectInfo.ml 2008-06-27 17:30:32 UTC (rev 298) @@ -84,3 +84,4 @@ + Modified: trunk/src/strings.ml =================================================================== --- trunk/src/strings.ml 2008-06-27 16:26:02 UTC (rev 297) +++ trunk/src/strings.ml 2008-06-27 17:30:32 UTC (rev 298) @@ -4,7 +4,7 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.29.8\n\ + Version 2.30.3\n\ \n\ ")) :: @@ -1148,6 +1148,8 @@ \032-contactquietly suppress the 'contacting server' message during startup\n\ \032-copyprog xxx external program for copying large files\n\ \032-copyprogrest xxx variant of copyprog for resuming partial transfers\n\ + \032-copyquoterem xxx add quotes to remote file name for copyprog (true/false/def\n\ + ault)\n\ \032-copythreshold n use copyprog on files bigger than this (if >=0, in Kb)\n\ \032-debug xxx debug module xxx ('all' -> everything, 'verbose' -> more)\n\ \032-diff xxx command for showing differences between files\n\ @@ -1305,6 +1307,14 @@ \032 will just be copyprog with one extra option (e.g., -partial,\n\ \032 for rsync). The default setting invokes rsync with appropriate\n\ \032 options--most users should not need to change it.\n\ + \032 copyquoterem xxx\n\ + \032 When set to true, this flag causes Unison to add an extra layer\n\ + \032 of quotes to the remote path passed to the external copy\n\ + \032 program. This is needed by rsync, for example, which internal\n\ + \032 uses an ssh connection requiring an extra level of quoting for\n\ + \032 paths containing spaces. When this flag is set to default,\n\ + \032 extra quotes are added if the value of copyprog contains the\n\ + \032 string rsync.\n\ \032 copythreshold n\n\ \032 A number indicating above what filesize (in kilobytes) Unison\n\ \032 should use the external copying utility specified by copyprog.\n\ @@ -2543,8 +2553,8 @@ \n\ ")) :: - ("news", ("Changes in Version 2.29.8", - "Changes in Version 2.29.8\n\ + ("news", ("Changes in Version 2.30.3", + "Changes in Version 2.30.3\n\ \n\ \032 Changes since 2.17:\n\ \032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\ From schmitta at seas.upenn.edu Fri Jun 27 22:25:49 2008 From: schmitta at seas.upenn.edu (ALAN SCHMITT) Date: Fri, 27 Jun 2008 22:25:49 -0400 Subject: [Unison-hackers] [unison-svn] r299 - in trunk: . fstest fstest/fstest.xcodeproj Message-ID: <200806280225.m5S2Pn1S031461@yaws.seas.upenn.edu> Author: schmitta Date: 2008-06-27 22:25:43 -0400 (Fri, 27 Jun 2008) New Revision: 299 Added: trunk/fstest/ trunk/fstest/fstest.1 trunk/fstest/fstest.m trunk/fstest/fstest.xcodeproj/ trunk/fstest/fstest.xcodeproj/project.pbxproj trunk/fstest/fstest_Prefix.pch Log: Very simple but working FSEvents file watcher Added: trunk/fstest/fstest.1 =================================================================== --- trunk/fstest/fstest.1 (rev 0) +++ trunk/fstest/fstest.1 2008-06-28 02:25:43 UTC (rev 299) @@ -0,0 +1,79 @@ +.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. +.\"See Also: +.\"man mdoc.samples for a complete listing of options +.\"man mdoc for the short list of editing options +.\"/usr/share/misc/mdoc.template +.Dd 27/06/08 \" DATE +.Dt fstest 1 \" Program name and manual section number +.Os Darwin +.Sh NAME \" Section Header - required - don't modify +.Nm fstest, +.\" The following lines are read in generating the apropos(man -k) database. Use only key +.\" words here as the database is built based on the words here and in the .ND line. +.Nm Other_name_for_same_program(), +.Nm Yet another name for the same program. +.\" Use .Nm macro to designate other names for the documented program. +.Nd This line parsed for whatis database. +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm +.Op Fl abcd \" [-abcd] +.Op Fl a Ar path \" [-a path] +.Op Ar file \" [file] +.Op Ar \" [file ...] +.Ar arg0 \" Underlined argument - use .Ar anywhere to underline +arg2 ... \" Arguments +.Sh DESCRIPTION \" Section Header - required - don't modify +Use the .Nm macro to refer to your program throughout the man page like such: +.Nm +Underlining is accomplished with the .Ar macro like this: +.Ar underlined text . +.Pp \" Inserts a space +A list of items with descriptions: +.Bl -tag -width -indent \" Begins a tagged list +.It item a \" Each item preceded by .It macro +Description of item a +.It item b +Description of item b +.El \" Ends the list +.Pp +A list of flags and their descriptions: +.Bl -tag -width -indent \" Differs from above in tag removed +.It Fl a \"-a flag as a list item +Description of -a flag +.It Fl b +Description of -b flag +.El \" Ends the list +.Pp +.\" .Sh ENVIRONMENT \" May not be needed +.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 +.\" .It Ev ENV_VAR_1 +.\" Description of ENV_VAR_1 +.\" .It Ev ENV_VAR_2 +.\" Description of ENV_VAR_2 +.\" .El +.Sh FILES \" File used or created by the topic of the man page +.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact +.It Pa /usr/share/file_name +FILE_1 description +.It Pa /Users/joeuser/Library/really_long_file_name +FILE_2 description +.El \" Ends the list +.\" .Sh DIAGNOSTICS \" May not be needed +.\" .Bl -diag +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .El +.Sh SEE ALSO +.\" List links in ascending order by section, alphabetically within a section. +.\" Please do not reference files that do not exist without filing a bug report +.Xr a 1 , +.Xr b 1 , +.Xr c 1 , +.Xr a 2 , +.Xr b 2 , +.Xr a 3 , +.Xr b 3 +.\" .Sh BUGS \" Document known, unremedied bugs +.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file Added: trunk/fstest/fstest.m =================================================================== --- trunk/fstest/fstest.m (rev 0) +++ trunk/fstest/fstest.m 2008-06-28 02:25:43 UTC (rev 299) @@ -0,0 +1,68 @@ +#import +#include + +void myCallbackFunction( + ConstFSEventStreamRef streamRef, + void *clientCallBackInfo, + size_t numEvents, + void *eventPaths, + const FSEventStreamEventFlags eventFlags[], + const FSEventStreamEventId eventIds[]) +{ + int i; + char **paths = eventPaths; + + // printf("Callback called\n"); + for (i=0; i +#endif From bcpierce at seas.upenn.edu Sat Jun 28 10:01:50 2008 From: bcpierce at seas.upenn.edu (Benjamin C. Pierce) Date: Sat, 28 Jun 2008 10:01:50 -0400 Subject: [Unison-hackers] [unison-svn] r300 - trunk/src Message-ID: <200806281401.m5SE1o2r023506@yaws.seas.upenn.edu> Author: bcpierce Date: 2008-06-28 10:01:42 -0400 (Sat, 28 Jun 2008) New Revision: 300 Modified: trunk/src/NEWS trunk/src/RECENTNEWS trunk/src/TODO.txt trunk/src/mkProjectInfo.ml trunk/src/strings.ml trunk/src/uimacbridgenew.ml trunk/src/uitext.ml trunk/src/update.ml Log: * Work on text UI to prepare for new filesystem watcher functionality * Record some current TODO items Modified: trunk/src/NEWS =================================================================== --- trunk/src/NEWS 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/NEWS 2008-06-28 14:01:42 UTC (rev 300) @@ -1,5 +1,5 @@ -Changes in Version 2.29.5 +Changes in Version 2.30.4 Changes since 2.17: * Major rewrite and cleanup of the whole Mac OS X graphical user Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/RECENTNEWS 2008-06-28 14:01:42 UTC (rev 300) @@ -1,3 +1,13 @@ +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 Modified: trunk/src/TODO.txt =================================================================== --- trunk/src/TODO.txt 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/TODO.txt 2008-06-28 14:01:42 UTC (rev 300) @@ -7,7 +7,34 @@ See the file BUGS.txt for a list of currently open bugs. ########################################################################### + +CURRENT +======= +* Makefile for fstest + +* Reverse CheckNonemptyAndMakeWriteable + +* 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!) + + +########################################################################### + SOON ==== Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/mkProjectInfo.ml 2008-06-28 14:01:42 UTC (rev 300) @@ -85,3 +85,4 @@ + Modified: trunk/src/strings.ml =================================================================== --- trunk/src/strings.ml 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/strings.ml 2008-06-28 14:01:42 UTC (rev 300) @@ -4,7 +4,7 @@ let docs = ("about", ("About Unison", "Unison File Synchronizer\n\ - Version 2.30.3\n\ + Version 2.30.4\n\ \n\ ")) :: @@ -2553,8 +2553,8 @@ \n\ ")) :: - ("news", ("Changes in Version 2.30.3", - "Changes in Version 2.30.3\n\ + ("news", ("Changes in Version 2.30.4", + "Changes in Version 2.30.4\n\ \n\ \032 Changes since 2.17:\n\ \032 * Major rewrite and cleanup of the whole Mac OS X graphical user\n\ Modified: trunk/src/uimacbridgenew.ml =================================================================== --- trunk/src/uimacbridgenew.ml 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/uimacbridgenew.ml 2008-06-28 14:01:42 UTC (rev 300) @@ -97,7 +97,8 @@ Callback.register "unisonGetVersion" unisonGetVersion;; (* snippets from Uicommon, duplicated for now *) -(* BCP: Duplicating this is a bad idea!!! *) +(* BCP: Duplicating this is a really bad idea!!! *) + (* First initialization sequence *) (* Returns a string option: command line profile, if any *) let unisonInit0() = Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/uitext.ml 2008-06-28 14:01:42 UTC (rev 300) @@ -634,7 +634,8 @@ Globals.allRootsMap (fun r -> suckOnWatcherFileRoot r n))) let synchronizePathsFromFilesystemWatcher () = - let watcherfilename = Prefs.read Uicommon.repeat in + let watcherfilename = "" in + (* STOPPED HERE -- need to find the program using watcherosx preference and invoke it using a redirect to get the output into a temp file... *) let rec loop failedPaths = let newpaths = suckOnWatcherFiles watcherfilename in if newpaths <> [] then @@ -673,7 +674,12 @@ try int_of_string (Prefs.read Uicommon.repeat) with Failure "int_of_string" -> (* If the 'repeat' pref is not a number, switch modes... *) - synchronizePathsFromFilesystemWatcher() in + if Prefs.read Uicommon.repeat = "watch" then + synchronizePathsFromFilesystemWatcher() + else + raise (Util.Fatal ("Value of 'repeat' preference (" + ^Prefs.read Uicommon.repeat + ^") should be either a number or 'watch'\n")) in let exitStatus = synchronizeUntilNoFailures() in if repeatinterval < 0 then Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2008-06-28 02:25:43 UTC (rev 299) +++ trunk/src/update.ml 2008-06-28 14:01:42 UTC (rev 300) @@ -1520,6 +1520,8 @@ Lwt.return (ONEPERPATH(result)))))) let findUpdates () : Common.updateItem list Common.oneperpath = + (* TODO: We should filter the paths to remove duplicates (including prefixes) + and ignored paths *) findUpdatesOnPaths (Prefs.read Globals.paths) From schmitta at seas.upenn.edu Sat Jun 28 10:19:30 2008 From: schmitta at seas.upenn.edu (ALAN SCHMITT) Date: Sat, 28 Jun 2008 10:19:30 -0400 Subject: [Unison-hackers] [unison-svn] r301 - trunk/fstest Message-ID: <200806281419.m5SEJUnS024122@yaws.seas.upenn.edu> Author: schmitta Date: 2008-06-28 10:19:29 -0400 (Sat, 28 Jun 2008) New Revision: 301 Modified: trunk/fstest/fstest.m Log: Check whether the detected file system change is shallow or deep, and prefix the printed path with '.' if it's shallow, '*' if it's deep. Modified: trunk/fstest/fstest.m =================================================================== --- trunk/fstest/fstest.m 2008-06-28 14:01:42 UTC (rev 300) +++ trunk/fstest/fstest.m 2008-06-28 14:19:29 UTC (rev 301) @@ -16,7 +16,11 @@ for (i=0; i