Comparing remote and local versions

I frequently compare the remote version of a file with the local one when I want to be sure the two versions are the same. Currently to do this I have to open up the remote version, highlight it, then use Tools/Compare Files. I tried to do this the other way around, which would save having to open up the remote version, by highlighting the local copy but there didn’t seem to be a way of picking up the remote version to compare. I’m using Komodo 8.5.3.

Is there a way of doing this?

Hmm…
Tools - Compare files:
First file: ftp://Servername/yourfile
Second name: yourlocalfile
or
First file: yourlocalfile
Second name: ftp://Servername/yourfile
You can use drag’n’drop to set files to compare.
Or what are you talking about?

Thanks for this - I was expecting to be able to drill down to the remote file using Browse but I’ll just have to enter the ftp address manually as you suggest. As regards drag and drop wouldn’t I have to open the remote file in Komodo to allow me to do this, something I wanted to avoid?

I thought I’d solved this as I saw that I could add the remote site in Places, and the context menu for a highlighted file there gave me the Compare File With option. However when I selected the local file and tried to compare these for some reason or other I got the message “Error calculating difference: No such file or directory”!

Okay…
Try to do what I describe below. I think remote compare files with local files available only not in IDE version.

  1. Connect to your server via FTP in Komodo.
  2. Open local file and remote file that you want to compare (in my case I try to compare different index.php files)
  3. Go to Tool - Compare files.
  4. In “first file” drag’n’drop your file from Komodo file browser
  5. In “second file” select your local file: click on “Browse” button and select.
  6. Compare.
    If you don’t understand what I mean in 4 and 5 list items - just see the picture.
1 Like

Many thanks for your reply.

Unless I’m misunderstanding what you’re suggesting this still means I’ll have the remote file open in Komodo, which is what I want to avoid. In the past I’ve started to edit a remote file and then saved it thinking it was the local one. I know that I should have looked at the path shown in Komodo but in the heat of the moment I didn’t!

You seem to imply that the remote compare files is only available in the Edit version of Komodo but not the IDE one, which is a great pity.

Hahaha :smiley: IDE more powerful that Edit version and compare files available in IDE, like in Edit :smile:

Also, I’m trying to compare remote and local files in Edit version and say the result.
Result: compare in Edit version work’s perfectly.

[quote=“Defman21, post:6, topic:477, full:true”]
Hahaha IDE more powerful that Edit version and compare files available in IDE, like in Edit
[/quote]Yes that’s what I thought, and I have the IDE version.

Was this a comment about what I was trying to do by adding the remote site in Places and trying to do the compare from there?

I compare remote file and locale file and use “Places” to pick remote file. I misunderstand what are you want, because my English is not so good to understand something posts.

Ah I see. I had tried doing the compare from Places but without first opening up the remote file. When you highlight a file there you still get the option to Compare File With in the context menu even if the file is not open but it doesn’t work. It seems that this option should really only be available if you’ve first of all opened the file.

I’ve found an answer to my problem though which avoids me having to type in the ftp address in the compare window. If in Places I highlight the remote file I’m wanting to work with I can just use copy which gives me the ftp path to the file, which i can then paste into the compare box.

Thanks again for all your comments.

You explode my brains :smiley:
Also I trying to compare remote file without connection to server (just for see content of folder) or using “Open remote folder” - works normal.

Note the use-case @Defman21 is describing would have you open Compare Files from the Tools menu, then drag the remote file from your Places widget into the dialog to quickly insert its path.

I agree this is not ideal but should be a good enough workaround for now. You do not need to open the remote file to compare it.

@RobbieSnr, @nathanr, Also you can just click 1 times on file in Places (it’s just select file) and press Ctrl(Cmd)+C, It’s copy path to buffer and can be pasted into “First file” or “Second file” as String.
sftp://Server/home/server/public_html/hooks/a_hook.php - this string will be pasted by Ctrl+V.

Another option for easily keeping track of remote v’s local files is to use the Komodo IDE Publishing feature:

that shows you when the local/remote files are different - and offer the ability to overwrite the local or remote as you see fit.

[quote=“nathanr, post:12, topic:477”]
Note the use-case @Defman21 is describing would have you open Compare Files from the Tools menu, then drag the remote file from your Places widget into the dialog to quickly insert its path.
[/quote]That sounded good but with a local file highlighted Tools/Compare Files inserts that as file # but even if I also have the corresponding remote file highlighted in Places I’m not able to drag it in as file #2. Am I misunderstanding what you’re suggesting?

Many thanks for this Todd. When I come back to a project after a delay I always check to ensure that my local files match the remote ones before I start to make any changes, and this will do this for me.