Post by Qphoria » Mon Mar 05, 2012 11:11 pm

Q: How do I check what files are different between versions?
Q: How do I know what files changed in the last update?
Q: How do I create a "patch only" version?

A:
To see what has changed between 2 versions of OpenCart (or any system), you can simply compare the 2 versions in one of many free merge tools. You can even get export the changed files for your own "patch" version.

1. Downloads:
- Download and install the free "WinMerge" diff program (Windows Only).
- Download the zip file of the latest version of OpenCart.
- Download the zip file of the version of OpenCart that you currently are using.

2. Extract:
Extract your current version of the opencart zip to a folder called c:\current
Extract the latest version of the opencart zip to a folder called c:\latest

3. Verify:
There should be an "upload" folder at c:\current\upload
There should be an "upload" folder at c:\latest\upload
There may be other files (readme.txt, etc) but we don't care about these for now.
folder_compare.png

folder_compare.png (29.5 KiB) Viewed 13133 times

4. Perform the "Diff":
- In Windows XP, Click the "Start" button and choose "Run".
- In Windows Vista/7, just use the search field at the bottom.

Type this and hit enter:

Code: Select all

winmerge /r "c:\current" "c:\latest"
Be sure current is first and latest is second

It should open WinMerge and start comparing the 2 folders recursively.

5. Filtering:
When it has finished diffing the files, you should see a list of files like this:
winmerge-list.jpg

winmerge-list.jpg (130.1 KiB) Viewed 13133 times

In the menu bar choose "View" and set the checkmarks to match this example:
winmerge-view-menu.jpg

winmerge-view-menu.jpg (37.39 KiB) Viewed 13133 times

Now you should see exactly what is "changed" or "new" on the right side (latest)

6. Export the changes:
For my example, I've diff'd v1.5.2 with v1.5.2.1
There were "43" files changed and I want to get a package of only these files.

On the WinMerge window, hit "Ctrl+A" to select all files.
With all files selected, right click anywhere on the list (be sure not to de-select any files)
and choose "Copy->Right to..."
winmerge-extract.png

winmerge-extract.png (121.92 KiB) Viewed 13133 times

Create a new folder called "c:\changes-only" and you should get a confirmation like:
winmerge-changes-only.png

winmerge-changes-only.png (10.29 KiB) Viewed 13133 times

Hit OK

7. Verify Output:
Go to c:\changes-only folder and look in the "upload" folder. You should have a smaller subset of folders and files consisting ONLY of what has changed or is newer since the current version.
changes-only.png

changes-only.png (18.28 KiB) Viewed 13133 times


8. IMPORTANT INSTALL CHECK!
If the file "upload\install\opencart.sql" exists in the changes-only then there are likely database changes.
Since the install folder won't likely already exist on your site, you will need to grab the "full" install folder from the c:\latest folder and paste that directly into the c:\changes-only\upload folder
This will add all the other necessary files needed for upgrade. If the upgrade.sql file doesn't already exist in the c:\changes-only folder then there are no db upgrades and you can skip this step.

Now simply upload the folders from the changes-only folder following this video tutorial:
http://forum.opencart.com/viewtopic.php?f=20&t=9645

If there were upgrade.sql changes (From step 8 above) then be sure to follow the upgrade.txt procedures after uploading the new files.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Fri Mar 09, 2012 2:43 am

OpenCart uses "Git" now so the SVN method won't work for you.
There may be a similar method using TortoiseGIT but I've not used it

If you use Tortoise SVN, there is an easier method listed here:
http://verysimple.com/2007/09/06/using- ... ied-files/
But you have to know which rev the release version was and we haven't been the best at keeping that information.

v1.5.1.3 is r647
v1.5.2 is r885
v1.5.2.1 is r902
v1.5.2.2 is r990
v1.5.3 is r1101
v1.5.3.1 is r1111

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 1 guest