Thread: Using WinMerge

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default Using WinMerge

    Using WinMerge

    You can install WinMerge by downloading the latest version from their website at: http://winmerge.sf.net

    After installing, run it.

    To compare files press CTRL-O (File | Open) and choose the desired individual files to compare.
    Or, drag-and-drop files from an explorer window onto the WinMerge window. The 2nd file you drag onto WinMerge needs to be dragged onto the 2nd filename box.
    Click OK, and the files' contents will be compared, with differences highlighted.

    There are arrow buttons in the navigation bar to allow you to move down and up thru known differences, and left/right to copy text from one to the other.

    ESC exits. If you've made any changes, you'll be prompted to save them, for both files (if relevant).

    When comparing, if you see only left-side or right-side files, click on the "View" menu and choose "Show Different Items".
    Probably best to *not* choose "Show Identical Items" because if the files are identical, you don't need to review them.


    To compare entire folders, do the same as for files above, but only enter folder names (or drag-and-drop). BE SURE TO CHECK THE "Recursive" CHECKBOX so that it knows to compare files in subdirectories too.

    You'll see a list of files after comparison. Under the "View" menu, deselect "Identical Files". You can optionally enable/disable left/right comparison results too.

    To look at diff's in displayed files, double-click or press Enter on a highlighted entry. Edit as described above for individual file diff's.


    Preventing it from flagging line-endings as changes

    If your FTP program mangles your files by changing line-endings, you'll want to tell WinMerge to ignore carriage return differences.


    Optional Configuration:
    Choose Tools | Filters | Linefilters tab and check the "Ignore lines..." box, and enter this:
    (Prior to WinMerge v2.2, choose: Edit | Options | Filters and check the RegEx box)
    Code:
    //.*
    [/]{2}.*[\|\+]*
    [/]{2}\s*\$[\s]?Id: .*\$
    ^ \* @version \$Id:.*\$
    #\s*\$[\s]?Id: .*
    This will tell WinMerge to ignore commented text as well as common header components in each file.
    This allows comparing between ZC release versions without having to worry about files that only have changes in the headers or in commented text.




    In terms of replying to this post, please keep discussion only to issues regarding WinMerge. If you have questions about Zen Cart or editing Zen Cart files or Upgrading Zen Cart, please post those in a separate thread. Thanks!
    Last edited by DrByte; 26 Nov 2010 at 09:12 AM.

  2. #2
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,989
    Plugin Contributions
    15

    Default

    Originally posted by DrByte@Sep 29 2004, 06:01 PM
    Optional Configuration:
    Choose Edit | Options | Filters and check the RegEx box, and enter this:
    Code:
    //.*
    [/]{2}.*[\|\+]*
    [/]{2}\s*\$[\s]?Id: .*\$
    #\s*\$[\s]?Id: .*
    This will tell WinMerge to ignore commented text as well as common header components in each file.
    This allows comparing between ZC release versions without having to worry about files that only have changes in the headers or in commented text.
    Exactly what i was looking for, this makes it much easyer to use WinMerge to compare zen-cart files/versions!

    You're great! ::tup

  3. #3
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default

    Update related WinMerge 2.x

    You can also implement "file" filters.

    If you're working with a Subversion repository (on ANY project), you can create the following File Filter to exclude any SVN file components from the comparisons:

    Code:
    ## This is a directory/file filter for WinMerge
    ## This filter suppresses various binaries found in SVN source trees
    name: SVN loose
    
    ## This is an inclusive (loose) filter
    ## (it lets through everything not specified)
    def: include
    
    ## Filters for filenames begin with f:
    ## Filters for directories begin with d:
    ## (Inline comments begin with " ##" and extend to the end of the line)
    
    f: \..svn$ ## SVN control file
    
    d: \\cvs$ ## CVS control directory
    d: \\.svn$ ## SVN control directory
    .

    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
    Join Date
    Jan 2005
    Posts
    71
    Plugin Contributions
    0

    Default

    Anyone know of a similar utility for OS X?

  5. #5
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default

    For the Mac, there's BBEdit (commercial) and Text Wrangler (free), which do 2-way comparisons, and DeltaWalker which does 3-way comparisons.

    More details here: http://www.zen-cart.com/wiki/index.php/Useful_Tools
    .

    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.

  6. #6
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,292
    Plugin Contributions
    1

    Default

    May be worth for look at.

    KDiff3 work in different platforms (Linux/Mac)
    http://kdiff3.sourceforge.net/
    A New Starter again

  7. #7
    Join Date
    Apr 2005
    Posts
    1
    Plugin Contributions
    0

    Default

    Or if you've installed the Developer Tools for OS X, FileMerge has the same core functionality. Developer->Applications->Utilities.

    Diff exists on the command line as well - but it's a little more cryptic to work with...

  8. #8
    Join Date
    Apr 2005
    Posts
    18
    Plugin Contributions
    0

    Default

    DrByte,

    The regex you supplied knocks out much more than comments, etc. Just discovered that when comparing a couple of PunBB installs - full lines of code were ignored.

    I think the following regex is safer for just ignoring SVN version id:
    Code:
    ^// \WId: .*\$

  9. #9
    Join Date
    Feb 2005
    Location
    Traverse City, MI
    Posts
    40
    Plugin Contributions
    0

    Default

    For OS X take a look at zsCompare from Zizasoft. I have used it to apply the 1.2.4.1 and 1.2.5 upgrades, a number of contributions, and to migrate files from my development environment to my test webserver.
    Insanity: Doing the same thing over and over and expecting different results. -Albert Einstein

    My site: Harbor Fare

  10. #10
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default

    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. When using Winmerge it appears every file shows up as different
    By 1234go in forum Upgrading from 1.3.x to 1.3.9
    Replies: 16
    Last Post: 20 Nov 2014, 01:16 AM
  2. Using WinMerge - Topic Revisited
    By ScriptJunkie in forum Upgrading from 1.3.x to 1.3.9
    Replies: 15
    Last Post: 17 Dec 2011, 07:41 PM
  3. 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
  4. Upgrade 1.3.0.2 to 1.3.6 - Why winmerge when using override system?
    By Steve G. in forum Upgrading from 1.3.x to 1.3.9
    Replies: 10
    Last Post: 18 Nov 2006, 04:06 AM

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