Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1

    Default Using WinMerge - Topic Revisited

    Hi There,

    I'm using the most recent version of WinMerge (2.12.4) and have read the previous sticky on Using WinMerge and have applied a comments filter and turned off viewing for identical files.

    In spite of this, the comparison is still returning almost 1800 files. I am comparing the original V138a to the back up download from my store - also V138a.

    A quick glance at a few of the files reveals that the software is reading white space and carriage return differences as actual "differences".

    My questions are related to the settings in WinMerge. In order to reduce the number of files returned as "different" so that I may better identify my changed files,

    1. Should I set it to ignore white space, and if so, which of my two white space ignore options is the better choice? (Ignore Change or Ignore All White Space)

    2. Should I set it to ignore blank lines?

    3. Should I set it to ignore carriage return differences?

    TIA for your help :)
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Using WinMerge - Topic Revisited

    Set them all if your current set of file are functional
    Just remember this if you are trouble shooting a blank page issue where you might need the ignore blank lines turned off
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Using WinMerge - Topic Revisited

    Your FTP program has probably mangled the line-endings, in which case "Ignore carriage return differences" would be appropriate.
    The others are probably best to leave as-is IMO.
    .

    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.

  4. #4

    Default Re: Using WinMerge - Topic Revisited

    Awesome :) Thanks Kobra and DrByte for the fast responses :)
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  5. #5

    Default Re: Using WinMerge - Topic Revisited

    Hi There :)

    My questions this time around are about file comparison & merging as part of the upgrade process, however I'm posting them here because the questions are also about correctly interpreting what I see in WinMerge in order to carry out that process. I hope that's ok.

    Here's where I'm at and what I've done so far:

    I'm using WinMerge 2.12.4 to compare the 138a fileset with the 138a files from my live store. I'll refer to them as Fileset and Live, respectively, throughout this post.

    As stated in my initial post, the first comparison returned almost 1800 files after turning off "view identical" in the view menu and applying a filter for comments. So I ran it again after turning off "compare white space", "compare blank lines", and "compare carriage return differences". This action returned just under 800 compared files.

    My next step was to hide all image files by highlighting them, right clicking, and selecting "hide items". This action brought me down to a less daunting, but still hefty 305 files.

    Of these remaining files, about 3/4 of them have a comparison result of "right side only" (Live) and about a quarter of them have a comparison result of "text files are different". Only two of them have a result of "left side only" (Fileset) and these are the two config files named "dist-config" that came with the fileset and were moved and renamed to "config" upon installation.

    Ok, on to my questions.

    ========================================

    Interpreting Results in WinMerge

    1. Does the "right side only", (Live) mean that these are new files that were not in the original fileset because they were created when mods were installed?

    2. Does "text files are different" mean that the file exists in both Live and the Fileset, but that it has been altered by Mods and/or my customizations & design changes?

    (The vast majority of these are in MY CUSTOM TEMPLATE, but a handful are core code files (i.e. invoice customization, email customization, etc - all common core code customizations - nothing fancy or outrageous).


    Next Steps Questions

    I know my next step, according to the tutorial, is to run WinMerge to compare 138a Live with the 139h fileset, (I'll refer to them as Live and New Fileset, respectively), and make the appropriate file edits.

    1. Am I correct in thinking that when I run this comparison, that pretty much all of the files will be different?

    2. And so in order to more easily identify my changed files so I can edit their New Fileset counterparts, I should make a list of all files returned with a comparison result of "text files are different"?

    3. Because the files returned as "text files are different" are comprised of both override and non-override files, I have two questions:

    a) Of those that are core code customizations, am I correct that each of their New Fileset counterparts must be edited with the changes that were made to them?

    b) Of those that are part of the override system (found in MY CUSTOM TEMPLATE), I can leave those alone unless they appear on the list of changed files in the 139h changelog?

    4. Regarding files returned as "right side only" (Live) - if these are indeed new files added by Mods, I shouldn't need to do anything with them, correct? Wouldn't they be handled the same way override files not appearing on the changelog list are handled? i.e. do nothing in terms of file editing in New Fileset?

    5. In order to better understand why I'm using WinMerge twice over three sets of ZC files, can you tell me if I'm understanding correctly based on the statements below?

    The primary reason for using WinMerge to compare Live with Fileset in step 1 was to identify which files I have changed through customization and Mod addons so I would know what files in New Fileset to edit later?

    And....

    The primary reason for using WinMerge to compare Live and New Fileset in this step is to easily identify the changes & customizations in Live and then use them to edit New Fileset in order to carry those changes over in the upgrade, thus keeping my settings, designs, customizations, etc?


    Ok, I think that's all the questions I have on the subject. TIA for the help :)

    ==========================================================================

    Append: Oops, I do have one more question.

    DrByte, you responded to my initial post that you would not have WinMerge ignore white space or blank lines. Can you please help me understand the role white space and blank lines play in terms of accurate file comparison? i.e. do they serve a purpose for this particular process (comparing files for zc upgrade) that could be undermined?

    Do I risk missing an important file edit if I apply white pace and blank line "filters"?

    Thanks much!
    Last edited by ScriptJunkie; 27 Nov 2010 at 01:08 AM.
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Using WinMerge - Topic Revisited

    If you ignore whitespace within lines then you might miss cases where spaces or tabs were intentionally added for some reason.
    If you ignore blank lines then you might miss a case where a line was added intentionally. This may be a non-issue in most cases, but it still allows a true comparison. If nothing *else* has changed in the file, then of course you can just ignore that one from the results.


    Keep in mind that THE REASON for using WinMerge to compare the OLD ORIGINAL vs CURRENT site is *JUST* to quickly identify all the changes that you need to rebuild into your new site. That's essentially all you're doing: redoing your site in the new version, using all the changes you made *previously* as a reference for what to customize in the new one. If you wish to skip certain changes when redoing the site in the new version, that's entirely up to you. The WinMerge comparison is just a very handy tool for identifying the things that you need to do.

    The guide suggests comparing the *current* site with the *new* files simply as a means of allowing you to easily copy from old to new as needed. Since generally most files will be largely the same, simply copying certain sections of code from the old customized files to the new versions of those files is mostly all you'll be doing, except in cases where certain files have had major updates in the new version.


    And, yes, "right side only" files are files that don't exist on the left side, and thus were likely added in that set of files.
    And likewise "left side only" files are files that don't exist on the right side, and thus were likely deleted in that set of files.
    .

    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.

  7. #7

    Default Re: Using WinMerge - Topic Revisited

    Wow, thanks for the fast response doc!

    I understand now about white space and blank lines and the uncommon but still possible inherent risk to skipping/ignoring them.

    Keep in mind that THE REASON for using WinMerge to compare the OLD ORIGINAL vs CURRENT site is *JUST* to quickly identify all the changes that you need to rebuild into your new site.
    I think I came to that realization while typing out my last post... it all started to come together in my head as I typed out my questions.

    I guess for me the issue is that if I don't ignore white space and blank lines, those files return with a comparison result of "text files are different". This requires me to look at them one at a time to see how they are different and sort through which ones have code difference vs. just space difference.

    Not a real big deal except that the difference in the number of files to look at when the filter is off vs. on is several hundred files. That takes the ease and quickness out of the process.

    I was just trying to eliminate some of the hassle. But...it is better to be safe than sorry later.

    Before I go down that road however, do you have any suggestions for an easier way of isolating the white space and blank line files from the files that actually have code change?
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Using WinMerge - Topic Revisited

    Hmmmm ... I just look at them anyway. It only takes a second and then I "know".

    Granted, I usually use a 3-way comparison tool instead, which allows me to not only view the changes, but also immediately copy the parts I want to preserve ... right while I'm looking at it. Then I'm done with that file, and move on.

    In MANY cases when looking at the files I just ignore white space and blank lines, cuz I don't wanna copy anything onto the *new* files that I don't really need ... cuz touching as few files as possible makes the *next* upgrade faster yet again.
    .

    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.

  9. #9

    Default Re: Using WinMerge - Topic Revisited

    Yeah, you're right. I think the number of files to do that with overwhelmed me because it was late and I was tired. Realistically, I probably would only save an hour or so of work. Put in those terms, not worth the risk of missing something.

    Thanks for your help!
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  10. #10
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Using WinMerge - Topic Revisited

    Ok so how do you get winmerge to ignore differences in the comments,
    when i go into winmerge -> compare -> options
    no matter what the comments option is set to i get the same result.

    or is this something i am supposed to add in to winmerge


    edit------------------------
    yeesh I search for hours, post for help, then find it a minute later

    http://www.zen-cart.com/forum/showthread.php?t=7330
    Webzings Design
    Semi retired from Web Design

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Using WinMerge -Not
    By northfork in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 23 Mar 2011, 07:17 PM
  2. Using WinMerge
    By DrByte in forum Upgrading to 1.5.x
    Replies: 10
    Last Post: 21 Aug 2005, 03:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR