nautilus-compare does not work with sftp mounts

Bug #1195272 reported by Martin Bartlett
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nautilus-compare
Fix Released
Wishlist
Märt Põder

Bug Description

Gnome/Nautilus can mount sftp connections. Meld can work with files so-mounted.

However, nautilus-compare only recognizes files/directories if the GIO URL scheme is "file://".

The attached patch to /usr/share/nautilus-compare/nautilus-compare.py fixes it so it works with ANY mounted url scheme.

Related branches

Revision history for this message
Martin Bartlett (martin-j-bartlett) wrote :
Revision history for this message
Paul Wohlhart (paul-wohlhart) wrote :

Thanks. Patch works nicely. Dont know why obviously nobody else cares ?

Revision history for this message
Martin Bartlett (martin-j-bartlett) wrote : Re: [Bug 1195272] Re: nautilus-compare does not work with sftp mounts

sftp mounts, I imagine, are fairly rare - NFS and SAMBA being much more
common

Thanks for fixing

Martin

On Mon, Nov 24, 2014 at 4:23 PM, Paul Wohlhart <email address hidden> wrote:

> Thanks. Patch works nicely. Dont know why obviously nobody else cares ?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1195272
>
> Title:
> nautilus-compare does not work with sftp mounts
>
> Status in File compare extension for Nautilus:
> New
>
> Bug description:
> Gnome/Nautilus can mount sftp connections. Meld can work with files
> so-mounted.
>
> However, nautilus-compare only recognizes files/directories if the GIO
> URL scheme is "file://".
>
> The attached patch to /usr/share/nautilus-compare/nautilus-compare.py
> fixes it so it works with ANY mounted url scheme.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nautilus-compare/+bug/1195272/+subscriptions
>

Märt Põder (boamaod)
Changed in nautilus-compare:
status: New → In Progress
assignee: nobody → Märt Põder (boamaod)
importance: Undecided → Wishlist
Revision history for this message
Märt Põder (boamaod) wrote :

I have problem using GIO URIs for SFTP mounts with meld:

$ meld "sftp://user@server/home/filename1.txt" "sftp://user@server/home/filename2.txt"

* "[Errno 2] No such file or directory: 'sftp://user@server/home/filename1.txt'"
* "[Errno 2] No such file or directory: 'sftp://user@server/home/filename2.txt'"

However meld seems to support GVFS style URIs:

* "/run/user/1000/gvfs/sftp:host=server,user=user/home/filename1.txt"

Am I missing something here? How did it work for you? Does it still work? Do I need special version of meld for it? I am using meld 1.8.4 on Ubuntu 14.04 at the moment.

Revision history for this message
Märt Põder (boamaod) wrote :

Yes, it seems meld 3.12.3 handles these URIs, however it's not default on Ubuntu 14.04. I cannot really find our when was this feature added to meld, so it's hard to add this new feature starting from certain version number. Any ideas about that? This seems to be bit connected, but I'm not sure:

* https://git.gnome.org/browse/meld/commit/?id=f236b50f649b0b55f3bda7ef201d7b76b55ab1d5

Märt Põder (boamaod)
Changed in nautilus-compare:
milestone: none → 0.0.5
Märt Põder (boamaod)
Changed in nautilus-compare:
status: In Progress → Fix Committed
Revision history for this message
Märt Põder (boamaod) wrote :

If I try compare GIO URI [1] with meld 3.12.0, I get an error on Ubuntu 14.04:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 73, in do_command_line
    tab = self.parse_args(command_line)
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 316, in parse_args
    focus=i == 0)
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 148, in open_files
    return window.open_paths(paths, **kwargs)
  File "/usr/lib/python2.7/dist-packages/meld/meldwindow.py", line 729, in open_paths
    paths, auto_compare=auto_compare, auto_merge=auto_merge)
  File "/usr/lib/python2.7/dist-packages/meld/meldwindow.py", line 667, in append_diff
    dirslist = [p for p in paths if os.path.isdir(p)]
  File "/usr/lib/python2.7/genericpath.py", line 41, in isdir
    st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found

So it seems I need to package the feature to support meld from 3.12.1, which is also the one that is in current Debian stable and is reported to support GIO URIs.

[1] https://mail.gnome.org/archives/meld-list/2015-July/msg00029.html

Märt Põder (boamaod)
Changed in nautilus-compare:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.