How can I compare configuration files?
When creating or modifying a CDRouter configuration file, sometimes it can be helpful to compare it with another configuration file in order to see differences between the two files. CDRouter offers a Configuration Diff tool to do just that.
The Configuration Diff tool allows you to see differences between two configuration files or differences between a selected file and the default configuration file, on a line-by-line basis. It also allows you to move individual changes from one configuration file to the other with a single click.
Comparing configuration files
From the Configurations page, select (check) two configurations, then click the Diff button.
This will bring you to a page where the two configuration files can be compared side by side as seen in the following screen shot.
As you scroll through the files, differences between the two are clearly indicated and highlighted in yellow. Changes can be made to the configuration file on the left (the A file) either directly or by clicking the left facing arrow in the area between the files. This will copy that line from the right (the B file) to the A file. Changes made to the A file may be saved or undone by clicking the Save or Undo buttons.
The B file is read-only. However, the A and B files can be swapped by clicking the Swap A and B button above the A file window, allowing you to toggle which file can be modified. NOTE: The swap button is only shown when two non-default configs are diff’ed.
The files are scroll-locked together, but this can be undone by clicking on the double arrows at the bottom.
Comparing a configuration file to the default config file
If only a single configuration file is selected from the Configurations page, then it will be compared with the default configuration file that ships with CDRouter. This can be useful to see what changes you’ve made to your file and how it differs from the original. NOTE: The contents of the default configuration file usually changes with each version of CDRouter that is released. This is because new testvars are sometimes added and/or modified with each software release.
Compare config files from test package results
You can also use the Configuration Diff tool on configs from a package result. From the Results index, select up to two results and then press the Diff Configs button which is to the right of the Visualize button. These are the actual configs that were used by the packages when the tests were run, and therefore cannot be modified. Since these configs are read-only, the Save/Undo buttons will not appear.
Diff Tool Caveats
Comparing two configuration files works best if both configuration files have been upgraded to use the current configuration file format. For information on upgrading configuration files, please consult this knowledge base article: How do I upgrade a config file?.