Forums / Upgrading from 1.3.x to 1.3.9 / Need detailed help with comparing and merging override files with winmerg

Need detailed help with comparing and merging override files with winmerg

Locked

Started by airsoftoutfitter on 31 Aug 2010, 3:44 AM · Views: 1,419

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
31 Aug 2010, 3:44 AM
#1
airsoftoutfitter avatar

airsoftoutfitter

Zen Follower

Join Date:
Dec 2009
Posts:
244
Plugin Contributions:
0

Need detailed help with comparing and merging override files with winmerg

I am currently running 1.3.9e and want to upgrade to 1.3.9f. I installed a fresh set of core files for 1.3.9f into a separate directory and created a test database as I have some functions that are not working correctly on my 1.3.9e current install.

I have 1.3.9f demo site up right now, and I want to add my override files to the 1.3.9f directory to see how it functions once my site is running there. My concern is that I was told to compare override files in my 1.3.9e install with the new 1.3.9f channel log. because I have some 3rd party mods installed and I have made some customizing changes to my override files I don't want to loose the changes and mess everything up. How can I maintain the alterations in my override files while updating them if they need to be??? I am not what you would call proficient as I am new to all this, so detailed instructions on how to accomplish this and find the override files easily to compare would be very helpful. I have literally worked on this stupid thing from 9 am this morning until 5:30pm, then stopped to exercise and started again at 8pm. I am no farther than I was this morning.

I would like details from the point after my fresh install is installed, what are the next steps to bring the look/feel of my current site over. Do I check the files first for differences, if so how is this done, and how do I preserve the changes I have made since there are significant differences in some files. Do I copy the override files into the fresh install, then check for differences... The clearer instructions I can get the better. Kobra is helping me very much but he is offline currently and I can't see this taking 2-3 days as it doesn't sound like it is that hard.

31 Aug 2010, 4:22 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Need detailed help with comparing and merging override files with winmerg

So, you're trying to upgrade from 1.3.9e to 1.3.9f, right?

What does the /docs/changelog-v1-3-9f.html file list as the files changed between e and f?

Which of those files have you altered/customized/replaced by addons?
Which of those files have you overridden with addon versions in override folders?

Only those files need any special attention.
The others can just be replaced.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Aug 2010, 6:29 AM
#3
airsoftoutfitter avatar

airsoftoutfitter

Zen Follower

Join Date:
Dec 2009
Posts:
244
Plugin Contributions:
0

Re: Need detailed help with comparing and merging override files with winmerg

DrByte:

So, you're trying to upgrade from 1.3.9e to 1.3.9f, right? Yes, in essence.

What does the /docs/changelog-v1-3-9f.html file list as the files changed between e and f? One in particular is the "product_listing.php"

Which of those files have you altered/customized/replaced by addons? "includes/modules/Mercenary/product_listing.php" and this file has been altered with an addon.

Which of those files have you overridden with addon versions in override folders? "includes/modules/Mercenary/product_listing.php" and this file has been altered with an addon.

Only those files need any special attention.
The others can just be replaced.

Please see responses in "RED" listed above.

I don't know if I am getting mixed up here, but one file in particular is the "includes/modules/product_listing.php" I have an override in this directory "includes/modules/Mercenary/product_listing.php" and this file has been altered with an addon.

But because this file is not altered in the same default directory, and is located within the includes/modules/Mercenary which is my Template name does it need to have attention? here is the file from 1.3.9f and it is in the file alone, whereas my Template Name Folder includes the override file. http://www.airsoftoutfitter.com/DEMOMERCENARY/product_listing.zip

31 Aug 2010, 6:49 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Need detailed help with comparing and merging override files with winmerg

Okay, so one changed file is a conflict that needs resolution. All the others can just be replaced.

For that one file, since you have an override, you need to do two things:

  1. Upload the new version of the file to its master location: /includes/modules/product_listing.php

  2. Now you need to merge the changes from the new file into your override file: /includes/modules/Mercenary/product_listing.php
    So ... the process is simple:
    a) compare the original copy of the prior version of that file against the original copy of the new version of that file, and find out what's changed. In many cases the changes are very simple, often one or two lines, which in most cases are completely separate from any other customizations you've made to the file yourself or with an addon. Sometimes the changes are more complex, but if they're simple then you get off easy.

b) now, recreate those changes into your override version of the file.
There are various ways to do that:
i) you could look through the file and find the changed line(s) and make those changes yourself
ii) you could use a comparison tool like winmerge to compare the original old version of that file vs the override version, and see whether the changes from (a) above touch anything the same as the changes made by the addon. If they're unrelated, then it's a simple matter of changing the appropriate lines in the override file to add the changes intended by the new version of the file.
iii) if there are conflicting changes (ie: your addon changed the same lines that the upgrade changes), then you'll need to study the changed lines carefully and see what exactly in the lines was changed and recreate the changes yourself. Usually it's just a small change of adding/removing some text before/after other text.

It sounds way more complicated than it really is. Often what I just described takes all of 2 minutes ... less than the time it takes to read the steps above!

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Aug 2010, 6:52 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Need detailed help with comparing and merging override files with winmerg

Just think of it as though you've got a Word document that you've shared with 3 colleagues, and they've all made their own edits and sent it back to you to combine their changes (without the aid of internal markup/commenting tools).

  1. You study one person's changes, and copy them into your master.
  2. Next you study the next person's changes, and copy them in, updating your master.
  3. Finally you study the last person's changes, and copy them into the master.
    If more than one person had similar thoughts to similar lines/paragraphs, you need to figure out yourself what the correct change ultimately should be, by determining the correct intent of each one, and implementing that.

It's the same process, just in a different kind of file. Don't make it more complicated than it really is.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.