Manually re-align compare points
Sometimes even the best automatic diff tool will match against the wrong lines. Some other diff programs offer a way to manually re-align these lines. It would be good if Code Compare introduced this feature too.
-
Mark Ronollo commented
This feature is probably the most valuable feature that a developer can have in their toolbox. Why it's not in there is a mystery to me. Probably going to look elsewhere for a code compare tool as a result.
-
Kirsan commented
Yes, it's defiantly needed.
-
Sunny Patel commented
This is still very relevant for today; one of the reasons I use Beyond Compare over this.
If I have lines like this, it'll compare and have way more differences:
a -- a
b -- ab
c -- b
d -- c
-- dCan keep the original code if we manually can set up anchors where misalignments can occur so that it turns to:
a -- a
-- ab
b -- b
c -- c
d -- d -
Travis commented
This. As an example, look at Beyond Compare's ability to change the alignment and isolate differences where they don't actually correlate.
-
digiflex commented
I run into this when dumping schema files. Sometimes the order of tables changes, and that breaks the comparison. Which I can get round by manually moving one block, as long as it is just one table out of order. When the whole lot are jumbled... not so. Worst is when we're propagating renames (table Foo becomes Bah, views that reference it change from FooSomething to BahSomething) and the only change is those names... the diff is basically unusable, we have to run the script and see what breaks.
Being able to say "lines that start with "CREATE TABLE" are key lines/compare points would get around that. Ideally CC would chunk the file on those lines, sort, then compare.
-
George Birbilis commented
a screenshot would be useful
-
Anonymous commented
agreed
-
George Wenzel commented
I'm comparing configuration files for Alcatel DSLAMs (similar to a network switch). It would be very handy to be able to align and/or reorder configuration chunks when doing compares.
For example, in a section where port configurations are defined, service and spectrum profiles are listed first. In one DSLAM, there may have been dozens of experimental profiles added, and a new DSLAM will be configured with only the standard ones. There are clues to where the verious sections start in how the files are indented, but the port configurations fail to align because profiles and ports are indented to the same level. This confuses all of the file compare tools I have tried, resulting in a complete failure to align the parts of the files that I am wishing to compare.
it would be nice to have a way to either manually define and align blocks. Because of the repetitive nature of network configuration files, it would be handy if I could mark blocks that were similar in the two files, and have it run the automatic alignment within those blocks. If I cut the files into chunks, where only similar parts are compared, it aligns the port configurations perfectly. The problem is in a DSLAM, there are 44 different blocks to align, so if I had to cut the files apart, it might take a couple days to get through the process.
So the per port configurations are in 11 different locations within a file, and for each card type, they have additional variation.
A port config section typically starts with a like like this:
line 1/1/7/4
or
port 1/1/7/4And because different models of cards can be inserted in different orders, I might want to compare the same model card that is in a different slot, so a manual alignment would be required as only the person behind the keyboard knows which sections need to be compared when the slot numbers are out of order:
port 1/1/4/1 |--------| port 1/1/7/1
-
MJ commented
Re-alignment of Folders, Files, or lines of code.
-
Dylan Stewart commented
This is especially true for large Files