No announcement yet.

Is it possible to save/load the comparison state?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to save/load the comparison state?

    I've been using BC for a long while now but I never before needed this so I'm not sure if this is already doable.

    I have a project with lots of subfolders and files and I have to merge in a large change set that touches almost every file. There are well over 5,000 changes and there's no way I can do it in one sitting. Many of the changes shouldn't be merged over, so I can't rely on already-merged changes not showing up when I restart the comparison.

    I'm wondering if it's possible to save the entire comparison state (not just the folder settings, but all differences, the differences that have been ignored so far, etc.) and then reload it later on to continue where I left off. I tried saving a session but that only saves the folders and some comparison settings, but the actual differences, etc. are not saved at all, so I still have to restart and wade through all files again.

  • #2

    BC3 does not support this type of save directly. You could save a Report using the Session menu -> Folder Compare Report, or you can set filters to show only the files you wish to "remember" and save a Snapshot (Tools menu) which can be loaded as a folder on one side or the other to compare against. If you setup the snapshot to only contain the list of files you want to review, you could load it, compare against one of your main directories, then set the file name filter to show only these files, then replace the snapshot with the other directory.

    Usually in this case, if there are differences you do not care about, you would mark that text as Unimportant. If there are entire files you would not want compared, you exclude them using either a File Name filter or one of the Other filters. This way, the comparison does re-run, but only the files you want compared are, and scanned in the way you want them compared. Do you think it would be possible to configure BC3 to ignore the differences/files you are trying to ignore? Do you have any specific examples?

    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.
    Aaron P Scooter Software


    • #3
      Thanks for your reply Aaron. What I'm looking for is not the ability to exclude a certain class of text or a certain class of files.

      Imagine this situation: I'm in the middle of a large merge and I have to interrupt it because I have to go somewhere. I already checked 10% of all changes and decided to merge 5% of them - the other 5% is important on the left side but won't be merged to the right side. I went through ~150 files up to this point. When I'm done with a file, I check "Ignored" for the file so even though it may still has more differences, those won't be merged.

      If I want to finish this merge, I have to re-run the entire comparison again and start from the beginning - my former "Ignore" settings are now gone. I'll have 5% fewer changes in my list but many of the files contain changes that aren't to be merged, so even though I checked a file in the previous pass, I need to check it again because it shows up red.

      The text is not something that I could define a regex for - it's just code changes that is only needed on one side, mixed with code that's needed on the right as well. Technically I could use file filters but I have many files and manually managing a file filter list would be very tedious - most of these filenames are just various class names and don't follow a pattern other than having a common extension (.cs). I'd probably have to spend as much time managing the filter list as I do with the merge.

      It's be nice if BC were able to save/restore the entire comparison state so a merge operation could be paused & resumed later.