fourier / ztree

Directory tree comparison mode for Emacs
http://www.emacswiki.org/emacs/ZtreeDiff
GNU General Public License v3.0
239 stars 21 forks source link

Compared directories are not on the same host #47

Closed cjohansson closed 7 years ago

cjohansson commented 7 years ago

6 months ago I think ztree-diff worked over TRAMP without any problems but now I get the error "Compared directories are not on the same host". Is it possible to enable diffs between different hosts?

fourier commented 7 years ago

@Silex Could you take a look at this?

Silex commented 7 years ago

@cjohansson: IMHO there's no way ztree-diff worked over TRAMP for directories on different hosts...

What happened if you did is that ztree probably reported everything as "different" (or similar, whichever was the default I'm not sure). What has changed since then is that a check was added that reports an error if you try to compare unsupported things.

For the implementation, ztree just runs diff -r $DIR1 $DIR2. When over TRAMP, this command is run on the remote host. It makes no sense to run that command with different hosts.

The only way to achieve what you want would be to implement the diff as elisp, and download each file and diff them and that would be horribly slow.

Just to be clear, ztree-diff works fine on TRAMP, but the directories needs to be on the same host.

cjohansson commented 7 years ago

I see, yes you are correct. I think it labeled all files on a different host as changed.

Silex commented 7 years ago

:+1: