Re: My WEE updater

new topic     » goto parent     » topic index » view thread      » older message » newer message
K_D_R said...
ne1uno said...
K_D_R said...

This is helpful if you have made any mods to WEE which you may want to keep.

...

If you are running Linux, and you have chosen to back up files you can view the differences between the old file and the new file by using diff and then copy your changes back into the newly updated file, if you wish:

diff -y --suppress-common-lines ~/wee/parser-bak.e ~/wee/parser.e 

For what it is worth in edx.ex the Windows compare command is something like:

 fc /T  parser-bak.e parser.e 

I think a "Mods" option in WEE kinda like the old edx.ex routine which would compare the current file to the file saved on disk would be pretty nice. I haven't been able to implement it WEE so far.

Thanks again to Pete Eberlein and Irv Mullins for WEE and EuGTK!

Regards, Ken Rhodes

kdiff, cross platform visual diff is quite good for merging changed files (diff backend). though, it can get confused with large changes.

Thanks for the kdiff3 info Ne1Uno. Can you give me any idea as to a likely "large change" threshold? I downloaded kdiff3. It looks very interesting.

I suppose I could add a could a "Would you like to view changes?" option using diff, or kdiff3, after an update is successfully written. And then of course a merge option could be presented.

Regards, Ken Rhodes

a diff view is sometimes all you really want.

I should have said, it can get confusing with large changes. diff will of course find a way to merge the two files and if it can't do it cleanly, will point out any conflicts.

kdiff is packaged with TortiseHG, (a GUI front end for mercurial) as a diff viewer and merge tool. with revision control, it's most likely the newer file that has the more important changes so an automatic merge can decide and/or highlight those changes to give a hint for user intervention.

there is no way to quantify the amount of change. computers have no way to decide which lines to save and which to toss. diff has no concept of program correctness or which program function or bug fix we want to preserve from and old file. maybe in the future, merge tools can take annotations in the source?

simple changes would be addling or removing a few variables in a list of variables. adding or removing whole functions or change in an initialization value. more complicated revision would highlight big chunks of changed lines with fewer options to pick and choose which lines to preserve. the more organized and smaller the change, the easier it gets. one of the reasons it's wise to commit changes of one issue at a time so it's more obvious what the changes are designed to do.

the version of kdiff included with TortiseHG is a few years old, you can get a newer version of kdiff from sourceforge, I imagine there are a few bug fixes since then. I also like WinMerge because I find a vertical side by side view of two files is a little easier to understand but kdiff can view/merge from three files at the same time. WinMerge hasn't been updated in awhile though there is forked version now too.

here are a few other diff tools http://alternativeto.net/software/kdiff3/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu