Review Request 114812: KVersionControlPlugin2 based Dropbox version control plugin for Dolphin

Frank Reininghaus frank78ac at googlemail.com
Tue Feb 4 16:33:58 GMT 2014



> On Feb. 3, 2014, 10:31 a.m., Phil Schaf wrote:
> > a question: does this fix this? https://bugs.kde.org/show_bug.cgi?id=264717
> > 
> > i.e. work with symlinks to the dropbox directory?
> 
> Emmanuel Pescosta wrote:
>     > does this fix this?
>     No, this problem is (nearly) unsolvable within this plugin or within Dolphin - it can be fixed with some really (!!!) ugly hacks, but this will drastically slow down this plugin.
>     
>     This needs adjustments in the Dropbox client itself.
>     
>     It would be much better if Dropbox does smth. like git or svn for example, so that you can put every folder under version control + symlinks will also work ;)
> 
> Phil Schaf wrote:
>     > No, this problem is (nearly) unsolvable within this plugin or within Dolphin
>     
>     actually, you just have to save the real dropbox path once (say /mnt/somedisk/Dropbox), and then when querying some path, check if there’s a symlink in the path’s parents to the real dropbox path or one of its parents. (e.g. if you’re in ~/Dropbox/foobar/, you check all path components from ~/Dropbox/foobar/ up, and find that ~/Dropbox is a symlink to /mnt/somedisk/Dropbox). then you append the part of the symlink to the real dropbox path (e.g. pathjoin(/mnt/Dropbox, foobar/)) and you’re done.
>     
>     that just requires to check each path component above the directory you’re checking the status of once with .isSymLink(). neglegible. (of course you only have to check directories, not files)
>     
>     seriously, the plugin is unusable without that functionality once you have /home/ on a SSD and dropbox somewhere else because don’t want it creating heaps of IO, and the functionality isn’t IO intensive or computationally expensive at all.
> 
> Emmanuel Pescosta wrote:
>     This is the ugly hack ;)
>     
>     The idea is great in theory, but it'll introduce some other real-world problems.
>     
>     > you just have to save the real dropbox path once (say /mnt/somedisk/Dropbox)
>     Do you really think that this is a great solution? - I don't think so, because it'll be really error-prone.
>     It would be great if Dropbox has a command to request the Dropbox versioned folder path.
>     
>     > that just requires to check each path component above the directory you’re checking the status of once with .isSymLink().
>     This is ok for FileViewDropboxPlugin::itemVersion (runs in a thread), but I think this is a no-go for FileViewDropboxPlugin::actions (blocks the GUI thread).
>     
>     > seriously, the plugin is unusable without that functionality once you have /home/ on a SSD and dropbox somewhere else
>     Yes I agree with you, but this has to be fixed on the Dropbox side to provide a clean solution for this problem.
>     
>     @Frank:
>     What do you think?
>     Should we add a workaround for this problem in Dolphin?

To be honest, I'm not even sure if I understand what the actual problem is (I'm not extremely familiar with the version control code, and even less with the Dropbox plugin). Is it that the Dropbox executable does not provide the expected information if we ask it about a path that contains symbolic links?

If that is the case, would using

http://doc-snapshot.qt-project.org/4.8/qdir.html#canonicalPath

to transform that path to the "canonical" one work?


- Frank


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114812/#review48802
-----------------------------------------------------------


On Jan. 30, 2014, 12:11 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114812/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2014, 12:11 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Bugs: 298199
>     http://bugs.kde.org/show_bug.cgi?id=298199
> 
> 
> Repository: dolphin-plugins
> 
> 
> Description
> -------
> 
> Added a Dropbox version control plugin for Dolphin.
> 
> This Dropbox plugin is based on the work of:
> Sergei Stolyarovs - https://bitbucket.org/cancel/dolphin-dropbox-plugin
> Thomas Richards - http://trichard-kde.blogspot.co.at/2010/12/introducing-dropbox-integration-for.html
> 
> What I have done:
> - Ported the old source code to the newer KVersionControlPlugin2 interface
> - Use the Dropbox client to form the context menu more dynamically
>   (If the Dropbox guys add a new feature to their client, Dolphin can make use of it automatically)
> - Fixed a crash (Dolphin-4.8.2 segfaults when a file with special characters is present)
> - Replaced the item version changed timer with a file system watcher -> No useless updates every 10 seconds and immediate update on real changes
> - A lot of code/coding style related changes
> 
> I think that this plugin is small enough to include it into the official Dolphin-plugins collection. ;)
> 
> 
> Diffs
> -----
> 
>   dropbox/fileviewdropboxplugin.desktop PRE-CREATION 
>   dropbox/fileviewdropboxplugin.h PRE-CREATION 
>   dropbox/fileviewdropboxplugin.cpp PRE-CREATION 
>   dropbox/CMakeLists.txt PRE-CREATION 
>   CMakeLists.txt 4d87420 
> 
> Diff: https://git.reviewboard.kde.org/r/114812/diff/
> 
> 
> Testing
> -------
> 
> Works fine for me.
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140204/175251b0/attachment.htm>


More information about the kfm-devel mailing list