NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Use my own difference editor
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
I LOVE "beyond compare" as a difference editor, other people i work with like "win diff" and "compare it".

Can it be made possible to define the default compare program as either an external program, or use the internal diff editor, please.

I just cant understand what the internal diff editor is actually trying to tell me.

If this was to happen, i could merge a server file (copy of server file downloaded) into a local file, e.g. to revert some error i've made in a file - something that is currently not possible, and a feature i required this morning when i messed up a local file !
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7861
Reply with quote
The problem is that external tool won't work with remote files. They simply do not undestand what remote accounts are in phped.
So it's not so trivial to replace our internal diff with an external one, especially if it is a merge tool, not just diff, and you want to save merge results back to the server.
BTW, what is unclear with our internal diff? Could you please explain in details? May be it's easier to fix it instead of replace?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 24 Jul 2009
Posts: 717
Reply with quote
Hi Dmitri, I use Beyond Compare and Araxis Merge, both of which support direct FTP comparisons. A few years ago I tried to integrate either of those into PhpED but could not because the account information was not available for passing to them. However, that was before PhpED had built-in comparison, so it doesn't cause me any more issues.

I guess the main feature people would be lacking might be merge. My workflow disallows changing of files directly on servers, although occasionally I might find a development edit does not go well and merging back some of the original code would be useful. The answer for me would be to make the FTP account details and FTP file path available in symbols so they can be passed to external tools.

I understand the perceived security issues of having that information in symbols, but it is relatively easy to grab FTP username & password out of most applications even if stored encrypted. I've done it out of PhpED many times. I use SmartFTP and they've even decided there is no point in trying to hide it, so have an option to always show passwords.
View user's profileFind all posts by plugnplaySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7861
Reply with quote
FTP is good, but what's about SFTP and WEBDAV?
Do they support these protocols?
What form of referece to files on ftp server do they recognize?

Merge tool is in our plans and may be it will be easier to use our diff then?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 24 Jul 2009
Posts: 717
Reply with quote
A merge tool built into PhpED would be excellent, and I'm also currently very happy with the convenience of the built-in comparison tool, which I regularly use to ensure clients haven't mucked around with files before I start doing development changes. Smile
View user's profileFind all posts by plugnplaySend private message
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
You dont need account info for the compare programs.

PHPEd needs to download the file from the server to a temp file, then send the temp file, and real local file to the compare programs.

(This is what SVN -> Diff does)

If the user needs to add stuff to the remote file directly, they should be uploading their local file, not editing directly to the server!!
View user's profileFind all posts by joebSend private message
Guru master

Joined: 24 Jul 2009
Posts: 717
Reply with quote
Agreed that the temporary file method would work for just comparisons, but something would need to trigger PhpED to download that file.

On the other hand, account info would provide more flexibility for integration with various external tools and PhpED wouldn't have to do anything special such as doing downloads, just provide an extra few symbols.
View user's profileFind all posts by plugnplaySend private message
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
plugnplay wrote:
Agreed that the temporary file method would work for just comparisons, but something would need to trigger PhpED to download that file.


Right-click on open file tab -> Show Differences -> Remote File Differences Smile
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7861
Reply with quote
Indeed some tools may recognize remote file names written like URLs, for example sftp://hostname:port/path/filename and even sftp://username:password@hostname:port/path/filename
and this is much easier than tracking temporary name and won't raise question what file name is shown here in the tool.
It's still unclear what to do if such filenames are not supported. Just ignore?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 24 Jul 2009
Posts: 717
Reply with quote
joeb is discussing changing the existing differences tool, whereas I'm discussing providing more flexibility for external tools using Integration. By providing macro symbols for the various parts (protocol / username / password / account path prefix / relative file path / full file path) then the tool configuration can do what it likes with those to make up the whole path according to what the external tool expects.

I confess I haven't looked at external tools for a while so I'm not familiar with currently available macro symbols, but I suspect account username and password are not available.
View user's profileFind all posts by plugnplaySend private message
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
Ive just tried this in dreamweaver. I add the path to the diff editor into the settings, then DW downloads the remote file to a temp file, and sends the local and temp file names to the diff editor.

Can this not be done? Seems pretty simple to me.
View user's profileFind all posts by joebSend private message
Use my own difference editor
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic