DirSync3 — Synchronize Directories

Here you can discuss about your favorite plug-in.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post by pepak »

Latest post of the previous page:

That's a problem of your configuration. DirSync3 does not perform side-by-side comparison, it calls a program (e.g. WinMerge) to do that. You need to set this program up in plugin options. Then the functionality will work just fine.
User avatar
Dennis_Moore
Posts: 295
Joined: Tue 03 Mar, 2015 19:54
Location: Kiev
Has thanked: 6 times
Been thanked: 17 times

DirSync3 — Synchronize Directories

Post by Dennis_Moore »

pepak wrote: That's a problem of your configuration. DirSync3 does not perform side-by-side comparison, it calls a program (e.g. WinMerge) to do that. You need to set this program up in plugin options. Then the functionality will work just fine.
WinMerge works fine, but by default "Command used for visual compare" is VC: [what means FAR plugin Visual Compare]. I propose to change default setting in the next release to empty line or "WinMergeU.exe" and notice about it in the readme file.

And one more request. "Command used for visual compare" did not recognize environment variables. Can you solve this? Thanks.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post by pepak »

That's definitely not true. DirSync3 does not default to Visual Compare. There isn't even any functionality for calling a plugin for visual comparison. The default command is "winmerge" (without U or .exe).

Environment variables can be arranged, will put it in my TODO list.
User avatar
Dennis_Moore
Posts: 295
Joined: Tue 03 Mar, 2015 19:54
Location: Kiev
Has thanked: 6 times
Been thanked: 17 times

DirSync3 — Synchronize Directories

Post by Dennis_Moore »

pepak wrote: That's definitely not true. DirSync3 does not default to Visual Compare. There isn't even any functionality for calling a plugin for visual comparison. The default command is "winmerge" (without U or .exe).

Environment variables can be arranged, will put it in my TODO list.
Yes, default is "WinMerge". Sorry. Maybe I was trying to use DirSync with VC file compare function [as it does AdvCmp] and forgot about it.
User avatar
Dennis_Moore
Posts: 295
Joined: Tue 03 Mar, 2015 19:54
Location: Kiev
Has thanked: 6 times
Been thanked: 17 times

DirSync3 — Synchronize Directories

Post by Dennis_Moore »

pepak wrote: Environment variables can be arranged, will put it in my TODO list.
Temporary solution. Using EnvMan with something like this:

Code: Select all

FAREXTPRG=%SYSTEMDRIVE%\Program Files\FAR_ExtPrg
PATH=%FAREXTPRG%\WinMerge;%PATH%
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post 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
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post 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
Last edited by pepak on Sun 27 Jan, 2019 17:24, edited 1 time in total.
Hedin
Posts: 210
Joined: Thu 17 Mar, 2005 10:29
Has thanked: 4 times

DirSync3 — Synchronize Directories

Post by Hedin »

pepak, PlugRing page contains binaries for FarCtags plugin, instead of DirSync3.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post by pepak »

Fixed.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post 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 comparison 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 synchronization 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
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

DirSync3 — Synchronize Directories

Post by HaRT »

Thank you for this massive update!
pepak wrote: Fri 06 Mar, 2020 19:48 (this comparison doe snot support comparing by content)
One small documentation glitch: I doubt you meant “doe snot”. :)
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post 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
Last edited by pepak on Sun 17 Oct, 2021 11:38, edited 1 time in total.
lidskoe
Posts: 2
Joined: Thu 26 Nov, 2020 15:52

DirSync3 — Synchronize Directories

Post by lidskoe »

Hi! I downloaded dirsync3-1.11-far3-x64.zip -> unpack -> reload Far Manager 3.0.5709.0 x64 -> press F11 -> select Advanced compare -> ... -> Press on OK. Appears progress bar and that's all. The window with discrepancies does not appear.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post by pepak »

Advanced Compare is a different plugin, are you sure you are running DirSync3? And are you sure there are indeed differences between the left and the right panel?
lidskoe
Posts: 2
Joined: Thu 26 Nov, 2020 15:52

DirSync3 — Synchronize Directories

Post by lidskoe »

I got it, thank you. Yes, it was another plugin.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

DirSync3 — Synchronize Directories

Post 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
Post Reply

Return to “General Plug-In Discussions”