DirSync3 — Synchronize Directories

Here you can discuss about your favorite plug-in.
Maximus5
Posts: 3295
Joined: Sun 11 Nov, 2007 02:03
Been thanked: 10 times
Contact:

Re: DirSync — Synchronize Directories

Post by Maximus5 »

Latest post of the previous page:

This is fail.
For example, we want to erase files from the left panel, not existing on the right. But all other files must be synchronized.
Your suggestion does not allow such behaviour.
AnrDaemon
Posts: 93
Joined: Mon 14 Jun, 2010 20:25

Re: DirSync — Synchronize Directories

Post by AnrDaemon »

Maximus5 wrote:TFor example, we want to erase files from the left panel, not existing on the right. But all other files must be synchronized.
True that :/ I didn't spared enough time to consider all possible usage patterns.
Maximus5
Posts: 3295
Joined: Sun 11 Nov, 2007 02:03
Been thanked: 10 times
Contact:

Re: DirSync — Synchronize Directories

Post by Maximus5 »

v0.3.4
Fix: Memory leaks, traps.
Fix: Checkboxes in copying direction confirmation dialog ignored.
Checkbox «Use self settings» in options dialog.
Force panels updating after sync.
Very long paths support.
More information in copying failed dialog.
Maximus5
Posts: 3295
Joined: Sun 11 Nov, 2007 02:03
Been thanked: 10 times
Contact:

Re: DirSync — Synchronize Directories

Post by Maximus5 »

Maximus5
Posts: 3295
Joined: Sun 11 Nov, 2007 02:03
Been thanked: 10 times
Contact:

Re: DirSync — Synchronize Directories

Post by Maximus5 »

v0.3.5

Delete left/right option in options dialog.
You can show menu for each synchronized line in editor,
CallPlugin(0x44725363,1), look at AltF3.fml for example.
Fix: Copying fails, when target have 'Hidden' attribute.
r-bin
Posts: 67
Joined: Fri 16 Jul, 2010 02:53
Has thanked: 1 time
Been thanked: 2 times

Re: DirSync — Synchronize Directories

Post by r-bin »

Maximus5 wrote:v0.3.5
Что за версия фар 2.1.1807, что необходима?
Maximus5
Posts: 3295
Joined: Sun 11 Nov, 2007 02:03
Been thanked: 10 times
Contact:

Re: DirSync — Synchronize Directories

Post by Maximus5 »

Требование 2.1 случайно получилось. Но вообще, оно в 3.0 через враппер замечательно работает.

v0.3.6
User avatar
Wave
Posts: 1885
Joined: Thu 04 Aug, 2005 18:47
Has thanked: 14 times
Been thanked: 26 times

Re: DirSync — Synchronize Directories

Post by Wave »

Да всё равно 2.1 желателен — макрос, что с плагином, использует Menu.Show, а это появилось в 2.1 build 1807 bis6.
Пользуюсь ФАРом больше 20 лет © собирательный.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: DirSync — Synchronize Directories

Post by pepak »

Maximus5 wrote:v0.3.5
Maximus5, in your distribution you provide a MacroLib script for quick access to various useful tasks. But... which MacroLib version are you using? The newest one I could find (build 9, from February 2011) gives me an error on Menu.Show, claiming that it is an unknown command. Is it some incompatibility with FAR 2? Or do I need to do something more than just install MacroLib and copy the macro file to its Macros subdirectory?
User avatar
John Doe
Бюрократ
Posts: 13801
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 72 times
Been thanked: 425 times
Contact:

Re: DirSync — Synchronize Directories

Post by John Doe »

For menu.show you need FAR 3 (or updated FAR 2: http://forum.farmanager.com/viewtopic.php?f=3&t=6419).
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: DirSync — Synchronize Directories

Post by pepak »

I see. Never mind, I am writing a better (IMHO) fml based on Maximus' at the moment.
User avatar
John Doe
Бюрократ
Posts: 13801
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 72 times
Been thanked: 425 times
Contact:

Re: DirSync — Synchronize Directories

Post by John Doe »

pepak wrote:It's my first attempt at FAR's macro language, so please bear with me and point out any errors I made. The code is heavily based on the original Maximus5's code, except that I opted to remove dependency on menu, and use a number of keys instead:
[...]
Moved to http://forum.farmanager.com/viewtopic.php?f=35&t=6569
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: DirSync — Synchronize Directories

Post by pepak »

I would have thought it was more relevant here, but what the hell...
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: DirSync — Synchronize Directories

Post by pepak »

Note: This should be considered a beta. It seems to work fine for me, but I only use a subset of all the functionality.

http://www.pepak.net/files/far/dirsync3-0.90.zip

Features:
  • Rewritten into Delphi.
  • Support for FAR2, FAR3. 64bit versions are also published, but these haven't been tested at all. They compile fine and don't output any warnings, but that's the limit of my tests of them. If you use them, please let me know how they behave.
  • Support for very long filenames using the \\?\ namespace. All file operations should now use this namespace.
  • All confirmation dialogs now have the "Remember" checkbox for applying the selected answer to all further confirmations of the same kind.
  • All confirmation dialogs which need the user's decision between two files now have the "Compare" button to execute the visual comparison program on the files before the final decision is made.
  • The synchronization operation no longer skips same-date files (marked as "<--> in the editor". Instead, the user is given a choice as to what to do in such a situation - overwrite the left file, overwrite the right file, skip. The main synchronization dialog shown when the editor with results is closed allows to select the answer beforehand, removing the need for confirmations later.
  • The plugin can now be started from the editor, provided that the editor contains synchronization results. In that case, a menu is shown with several useful functions (change the operation to overwrite left/right, edit file on left/right, compare the two files). This makes it easy to create keyboard macros for these tasks using CTRL+dot.
  • The editor with sync. results now responds to some predefined keyboard shortcuts: ALT+F1/F2 changes the synchronization operation to "overwrite the left/right file". ALT+F3 invokes the visual comparison program. CTRL+F1/F2 opens the left/right file in FAR's editor. These shortcuts are also displayed in FAR's keybar.
  • The "change the operation to overwrite left/right file" now also works for multiple files in a block, if a block is active in the editor.
  • Program used for visual comparison of two files is now configurable in the plugin's options. Note that you must correctly configure its ability to use the \\?\ namespace - for example, WinMerge does not use it, and thus is limited to short 260 character filenames.
  • The synchronization results have been updated to display not only the synchronization operation, but (right after the "arrows") also the reason for that decision: "F" for "file missing", "T" for "different date/time", "S" for "different size" and "C" for "different contents".
  • Various internal changes to the program's logic. For example, editors are now identified by their ID, not by the name of the files loaded in them.
Some features of DirSyncW are missing:
  • "Use filter" is gone, because I noticed its existence too late. If there is interest in it, I can try to resurrect it.
  • "Use self settings" is also gone, because I have no idea what was its purpose.
  • The russian translation is incomplete; what I could copy from DirSyncW, that I did, but a lot of new strings remain untranslated.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: DirSync — Synchronize Directories

Post by pepak »

Version 0.91: http://www.pepak.net/files/far/dirsync3-0.91.zip
  • Fixed incorrect display of the progress window in case a warning or confirmation had to be displayed.
  • If the "change the operation to overwrite left/right file" was used on a block, the current line was moved to the very top of the screen, which made it rather inconvenient in the common case where the current line was under the block - the user had to scroll to visually verify that the operation really was changed. Now the current line will be the sixth from the top, providing a quick peek at last lines of the block.
  • It is now possible to return from the synchronization dialog to the synchronization editor using the appropriate button.
  • New menu item "Show file information" in the synchronization editor's menu will show some details about the left and the right file. Keyboard shortcut is CTRL+F3.
I'll keep using it for a few weeks more, but it is almost getting ready to be called "stable".

If someone could shed some light into why the editor's hotkeys (ALT+F1 etc.) aren't working in FAR2, I would appreciate it. As far as I can tell, the problem is that in FAR2, my ProceddEditorInputW receives nonsensical keyboard events: The bKeyDown is correct, as is the dwControlKeyState, but wVirtualKeyCode receives some value for Left Alt pressed (incorrect - 56, I think), but zero for LEFT ALT+F1. The wVirtualScanCode is also incorrect. I couldn't find a reason why, so I disabled the support in FAR2 for now. One can always define a macro for this functionality.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: DirSync — Synchronize Directories

Post by pepak »

Version 0.92: http://www.pepak.net/files/far/dirsync3-0.92.zip
  • Incorrect check caused that the "Overwrite left" and "Overwrite right" buttons would have the same effect as "Skip" if used in the dialog shown for two files with the same timestamp ("<-->").
  • When the synchronization is complete, failed synchronization items are shown in a new editor, giving you the opportunity to synchronize them again.
  • Support for the silent mode. When enabled, the plugin postpones all confirmations until after all synchronization items are processed. You can set the silent mode in the synchronization dialog, the default value can be set in the plugin's options.
  • Fixed reading of options in FAR3, which could fail and revert to defaults in some situations.
  • The descriptions (language items MReportFileNotes1, MReportFileNotes2) in the sync file can now be turned off in the plugin's configuration.
  • Build script updated.
Did anyone encounter any problems with the plugin? I am leaning towards officially announcing it in the "Announcements" forum, but I hesitate to do it without any actual testing done by someone else than me.
Post Reply

Return to “General Plug-In Discussions”