Page 1 of 1

DirSync3 — Synchronize Directories

Posted: Thu 23 Jul, 2015 16:49
by pepak
After about 18 months of betatesting, I think we can officially announce the completely new DirSync, a plugin for synchronization of directories.

Its history is somewhat complicated: Back in 2009 I wanted a synchronization plugin which didn't exist at the time. So I took the sources from FAR 1's Advanced Compare and modified them in several places to get the functionality I wanted. The result was the original DirSync. Maximus5 later took this plugin, updated it for FAR 2 compatibility and released it as DirSyncW. He continued developing the plugin for some time and eventually he implemented some new features and also provided a MacroLib script for better control of the editor with synchronization info. For some reason I didn't like his script, so I rewrote the script, but kept using the plugin.

Last year, I finally decided that the plugin is ripe for a complete rewrite. I tossed out all of the previous code and started from scratch. I kept a lot of the original functionality because it was proven to be useful, but I changed a lot of things which seemed to be cumbersome and added a whole lot of new features, such as full FAR2/FAR3 32bit/64bit compatibility, full support for long paths, a significantly extended support for the editor with synchronization data (which no longer needs an external script, supports blocks, has info in the keybar, etc.). It is now possible to e.g. visually compare (using WinMerge or any other tool you like) two files when an overwrite prompt is shown or the ability to first handle the easy stuff and keep all confirmations for later.

Download:

DirSync3 — Synchronize Directories

Posted: Sun 10 Jan, 2016 16:05
by techie
It will help to describe what this plugin really does. =) Looks like it is not http://syncthing.net as I first thought.

DirSync3 — Synchronize Directories

Posted: Sat 18 Feb, 2017 10:14
by pepak
Version 1.01
  • Fixed very long filenames from version v0.90 - the feature did not actually work.
  • The user's decision for the "delete directory" operation (Delete/Skip) is now applied to files within that directory, too.
  • Fixed incorrect redraw after pressing ESC during the synchronization phase.
  • When synchronizing directories, copy also file attributes (read-only, hidden etc.).
  • During the initial scan for differences, show the indeterminate progress status in the FAR Manager icon. It will get removed when the scan completes.
  • Refresh the panels when synchronization completes.
Download

DirSync3 — Synchronize Directories

Posted: Fri 28 Jul, 2017 18:58
by pepak
Version 1.02
  • If no synchronization items remained in the editor when it was being closed, the editor would reappear immediately. It was not possible to leave the editor unless at least one item remained in it.
  • When opening the editor with the differences for the first time (not using "return to editor"), the cursor is positioned at the first synchronization item.
  • The progress window no longer shows the NT schematics (\\?\) in filenames. The same is true for various confirmation dialogs.
  • Tightened checks for error conditions:
    • A source file or directory requested for synchronization does not exist at the time synchronization is to be actually performed.
    • A source directory is no longer a directory when synchronizing.
    • A destination for a directory copy exists but is not a directory.
  • When running the visual comparison command, environment variables such as %ProgramFiles% in the command get expanded.
Download

DirSync3 — Synchronize Directories

Posted: Sun 27 Jan, 2019 17:24
by pepak
Version 1.03
  • Completely rewritten the underlying framework for my FAR plugins. As a result it will be much easier to maintain the plugin, but it is possible (likely) that in the short term, some new bugs will manifest.
  • Support for building the plugin using Delphi versions up to 10.3 Rio.
  • Fixed remembering of directories in the "files are different, which one do you want to overwrite" mode. In the old version, incorrect directories might possibly be remembered.
  • Fixed incorrect "Remember choice" checkbox caption when the "Global remember" option was active.
  • Fixed the "ignore differences in new line characters" and "ignore differences in whitespace" options which haven't been working correctly for ages.
  • Fixed the unnecessarily large size of Retry/Skip dialogs if only one file was concerned (e.g. when deleting a file).
Download

DirSync3 — Synchronize Directories

Posted: Fri 06 Mar, 2020 19:46
by pepak
Version 1.10
  • Support for synchronizing directories which loop into itself, such as Windows user profiles. Looped directories are detected during scan and either considered matching (if both left and right directory are in their respective loops) or non-matching (if only one of the directories is looped). During synchronization, looped directories are detected and a warning is issued instead of endlessly copying.
  • When a reparse point such as a junction is encountered while deleting directories during synchronization, the reparse point is now deleted non-recursively - that is, the reparse point itself will get deleted but its contents will remain at the other end of the reparse point.
  • Support for proper detection of reading failures (e.g. because of insufficient privileges). Until now, these errors would be reported as differences in the file contents, but the direction of the difference would be based solely on the file dates of both files. Now a failed file is marked as such (<!--, --!>, <!!>) and considered the "older" one for the purposes of synchronization (i.e. it will be marked for overwriting with the readable file). A similar behavior is implemented for unreadable directories, except that unreadable directories will not get synchronized - you must change the difference to one of the non-error differences (<---, --->).
  • Implemented a PluginCall interface for all editor tasks. All available functionality can be found in DirSync3.lua, along with a demonstration of how the calls can be used. You can modify the macro at the end of the file or add extra macros with other functions, as needed.
  • Support for CTRL+F5/F6 hotkeys in the editor to jump to the left/right file of the selected difference.
  • Support for comparing file names case-sensitively.
  • When comparing directories, if the two directories refer to the same filesystem object (e.g. after using junctions), consider them matching without performing the actual comparison.
  • Updated the plugin to a newer version of Dialog API. Among other things, this allows the plugin to properly react to resizing of the FAR's window.
  • Minor fixes for compatibility with Delphi 10.1 and newer.
  • Display the contents of the "Remember directory" edit as "changed" for a better readability. We don't really need the "unchanged" option here anyway, since most of the modifications will involve either deleting path components (which is more comfortably achieved by pressing BACKSPACE on the checkbox than in the edit) or adding extra path components (where we don't want to delete the previous content anyway).
  • Implemented a more consistent work with file-times. Sub-millisecond times are now supported.
  • Far window's title gets updated during both looking for differences and synchronization.
  • Changed the way compare options work in regards to persistence: In the previous versions, if an option was disabled, it would also be saved as unchecked. In this version, disabled option's value is kept for the purpose of saving it. This means that, e.g. if you normally have the "compare by content" option checked and perform a comparison with a plugin panel (this comparison doe snot support comparing by content), that one comparson would be done disregarding the content but future comparisons with non-plugin panels will still have "compare by content" checked.
  • Move the cursor to the first difference even if the editor is reopened after the synchornization had been finished (e.g. if an error occurred during synchronization or a difference had been skipped by the user).
  • Fixed incorrect display of the synchronization progress after an interruption (if e.g. a confirmation had to be displayed, the succeeding progress windows would only be displayed partially).
  • Fixed incorrect display of file times in UTC rather than the local time.
  • Fixed the incorrect version information shown in FAR's Plugin list.
Download

DirSync3 — Synchronize Directories

Posted: Sun 11 Oct, 2020 16:16
by pepak
Version 1.11
  • Added DirSync.IsEditorLine() function to DirSync3.lua. It returns true if the active editor is a DirSync3's editor and the current line is a line displaying a difference item.
  • Added macros for all scripting-enabled functionalities to DirSync3.lua.
  • Option to disable internal hotkeys (ALT+F1 etc.). This may be useful if you use these hotkeys for another functionality. You may want to redefine the functions to new hotkeys using the provided scripting (see DirSync3.lua for examples).
  • Option to allow a direction change (ALT+F1/F2) on incomplete blocks. This is particularly useful when you search for some specific direction (e.g. <---) with the "Select Found" editor option enabled (or using the Regular Expression Search and Replace plugin).
  • Only save the settings if they are actually different from the previous version. This will prevent unnecessary changes to the plugin's data file, e.g. when performing incremental backups.
  • Support building with Delphi 10.4 Sydney.
  • When changing the direction through the supported functions, an Undo block is created for the operation. That basically means that you can undo the whole operation in just one Undo (CTRL+Z) step.
  • Fixed a minor memory leak in several functions.
  • Fixed DirSync.IsEditor() scripting function to be usable from within LUA macro conditions.
Download

DirSync3 — Synchronize Directories

Posted: Sun 17 Oct, 2021 11:38
by pepak
Version 1.12
  • Updated the underlying components used by DirSync3.
  • Cleaned up the source code.
  • Fixed an error where the difference between files was always shown using the left file's path and name. Now the newer file is used for the choice of path and name. This can be significant if there's a change in capitalization between the left and right file (e.g. if a.txt and A.txt are compared and found different).
Download