Client Configuration File

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Configuring the Server >

Client Configuration File

A client-side configuration file defines various configuration settings that affect comparisons and connectivity between DiffDog Command Line Client and a remote DiffDog Server. You must typically edit the client configuration file in order to achieve the following:

 

Set up the communication between DiffDog Command Line Client and a remote DiffDog Server. In this case, the server.address and server.port parameters in the client configuration file must point to the machine where DiffDog Server runs.
Change the language of the command line interface (for the client).
Set default values for various options when you run a comparison. For example, if you don't specify a comparison mode (binary, text) when comparing files, the application will use the default comparison mode as it is configured in the client configuration file.
Define XML filters. An XML filter is useful when you are comparing XML files. It lets you ignore attributes or elements with a specific name during comparison.
Define directory filters. When you compare directories, a directory filter lets you include or ignore files or directories that follow a specific pattern.
Other configuration options, as further described below.

 

If you do not need the functionality above, there is no need to set up a client configuration file. Otherwise, you can find a sample client configuration file in the cmdlclient subdirectory relative to the program installation directory; it is called client_config.ini.sample. To set up your custom configuration file, create a copy of client_config.ini.sample and remove the .sample part from the file name.

 

When you run a comparison, you can set the path to the custom configuration file by setting the --c option. If you do not set the --c option, the DiffDog Command Line Client executable attempts to read the client configuration file from the same directory. If there is no configuration file in the same directory as the executable, the default values as described in the command line help and this documentation apply.

 

To view the current configuration, run the showcfg command.

 

The client configuration file includes the options listed below.

 

[general]

Option

Description

jvm-location

This option lets you specify the path to a Java VM (Virtual Machine) required for Java-specific tasks such as connecting to a database through JDBC.

 

Note that adding a custom Java VM path is typically not necessary. By default, the application attempts to detect the Java VM path automatically based on the JAVA_HOME environment variable. On Windows, the Java VM path is determined by reading (in this order) the Windows registry an the JAVA_HOME environment variable.

 

The custom path added in the jvm-location option will take priority over any other Java VM path detected automatically. If set, the path must point to the jvm.dll (Windows), jvm.so (Linux), or libjvm.dylib (macOS) file found in the JDK installation directory.

language

Specifies the language of the command line interface (for the client). Valid values are en, de, es, fr, ja (English, German, Spanish, French, and Japanese).

server.address

Specifies the address of the remote host where DiffDog Server is listening for HTTP requests.

server-alias

If the server administrator has restricted access to server paths for security reasons, you can no longer run comparisons that refer server file paths directly, see also Restricting Access to Server Paths. Instead, you need to specify the name of an alias by means of the --alias option.

 

Alternatively, you can set the server-alias option in the client configuration file, so that you don't have to enter it at the command line. For example, the following configuration defines a default alias called sandbox:

 

server-alias=sandbox

 

Note:If you set the --alias option at the command line, it takes precedence over the value in the configuration file.

server.port

Specifies the remote port where DiffDog Server is listening for HTTP requests.

zip-as-dir

When you run the diff command without setting the --zip-as-dir option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

whitespace-mode

When you run the diff command without setting the --whitespace-mode option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

 

[file-types]

When you run the diff command without specifying a comparison mode through the --mode option (text, binary, or XML), the application decides the comparison mode automatically for each file based on extension (that is, --mode=auto). In the options below, you can define what file extensions should be treated as text, binary, or XML, whenever the comparison mode is not explicitly set.

 

Option

Description

text

A comma-separated list of file extensions that are treated as text by default.

xml

A comma-separated list of file extensions that are treated as XML by default.

binary

A comma-separated a list of file extensions that are treated as binary by default.

 

[xml]

Option

Description

ignore-namespace

When you run the diff command without setting the --xml-ignore-namespace option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-prefixes

When you run the diff command without setting the --xml-ignore-prefixes option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

resolve-entities

When you run the diff command without setting the --xml-resolve-entities option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-text

When you run the diff command without setting the --xml-ignore-text option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-case-in-names

When you run the diff command without setting the --xml-ignore-case-in-names option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-case-in-text

When you run the diff command without setting the --xml-ignore-case-in-text option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-markup-attributes

When you run the diff command without setting the --xml-ignore-markup-attributes option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-markup-cdata

When you run the diff command without setting the --xml-ignore-markup-cdata option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-markup-comments

When you run the diff command without setting the --xml-ignore-markup-comments option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-markup-processing-instructions

When you run the diff command without setting the --xml-ignore-markup-processing-instructions option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-markup-doctype-decls

When you run the diff command without setting the --xml-ignore-markup-doctype option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-markup-xml-decls

When you run the diff command without setting the --xml-ignore-markup-xml option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

order-by-elements

When you run the diff command without setting the --xml-order-by-elements option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

order-by-attributes

When you run the diff command without setting the --xml-order-by-attributes option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

order-by-text

When you run the diff command without setting the --xml-order-by-text option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

order-by-list

When you run the diff command without setting the --xml-order-by-attribute-list option, the executable will look for it in this configuration file. Set here the default preferred value for this option. This must be a named list of attributes defined in the [xml.orderby<name-of-my-list>] group (see below).

 

[xml.orderby:<identifier>]

This option group represents a named list of XML attributes. When an XML comparison takes place, such a list will cause the XML elements to be ordered by specific attributes before comparison. For an example, see the --xml-order-by-attribute-list option. You can create multiple attribute lists, for example [xml.orderby:list1], [xml.orderby:list2], and so on. The name of each attribute list must be unique.

 

Option

Description

attributes

Enter here the attribute by which XML elements must be ordered before comparison, for example:

 

attributes = myattribute

 

You can also specify a comma-separated list of XML attributes, for example:

 

attributes = attr1, attr2, attr3

 

[xml.filter:<identifier>]

This option group represents a filter that lets you ignore attributes or elements with a specific name during comparison. You can create multiple such option groups, for example [xml.filter:filter1], [xml.filter:filter2], and so on. The name of each option group must be unique.

 

Option

Description

ignore-elements

Enter here a comma-separated list of XML elements that should be ignored when this filter is active.

ignore-attributes

Enter here a comma-separated list of XML attributes that should be ignored when this filter is active.

ignore-both

Enter here a comma-separated list of XML elements or attributes that should be ignored when this filter is active.

 

Once you define a filter in the configuration file, you can supply it at the command line using the --xml-filter option.

 

[text]

Option

Description

ignore-case

When you run the diff command without setting the --ignore-case option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-blank-lines

When you run the diff command without setting the --ignore-blank-lines option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

 

[dir]

Option

Description

ignore-case

When you run the diff command without setting the --dir-ignore-case option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

compare-file-content

When you run the diff command without setting the --dir-compare-contents option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

compare-sizes

When you run the diff command without setting the --dir-compare-sizes option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

compare-modification-times

When you run the diff command without setting the --dir-compare-mod-times option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

ignore-modtime-interval

When you run the diff command without setting the --dir-compare-mod-times-ignore-seconds option, the executable will look for it in this configuration file. Set here the default preferred value for this option.

 

[dir.filter:<identifier>]

This option group represents a filter that lets you include or ignore files or directories that follow a specific pattern. At the command line, you can specify directory filters using the --directory-filter option. In the configuration file, you can create multiple such option groups, for example [dir.filter:filter1], [dir.filter:filter2], and so on. The name of each option group must be unique. Each option group can contain one or more of the following options:

 

Option

Description

ignore-files

A list of file extensions that should be excluded from the comparison (ignored) when this filter is active.

ignore-dirs

A list of directory names that should be excluded from the comparison (ignored) when this filter is active.

include-dirs

A list of directory names that should be included in the comparison when this filter is active.

include-files

A list of file extensions that should be included in the comparison when this filter is active.

include-archive-files

Windows-specific. Set this value to true if archive files should be included in the filter; false otherwise.

include_hidden_dirs

Windows-specific. Set this value to true if hidden directories should be included in the filter; false otherwise.

include_hidden_files

Windows-specific. Set this value to true if hidden files should be included in the filter; false otherwise.

include-readonly-files

Windows-specific. Set this value to true if read-only files should be included in the filter; false otherwise.

include_system_dirs

Windows-specific. Set this value to true if system directories should be included in the filter; false otherwise.

include_system_files

Windows-specific. Set this value to true if system files should be included in the filter; false otherwise.

 

Note that the application contains a few built-in directory filters (and you don't need to create them since they will be recognized even if you didn't define them in the configuration file). You can however alter the definition of these filters in the configuration file, in which case your filter will override the built-in configuration. The built-in filters are as follows:

 

Filter identifier

Purpose

xml

When this filter is active and a directory comparison is performed, files with the following extensions are included in the comparison: *.biz, *.cml, *.dcd, *.dtd, *.ent, *.fo, *.math, *.mml, *.mtx, *.rdf, *.smil, *.svg, *.tld, *.tsd, *.vml, *.vxml, *.wml, *.wsdl, *.xbrl, *.xdr, *.xhtml, *.xml, *.xsd, *.xsl, *.xslt.

 

On Windows, read-only and archive files are included in the comparison.

text

When this filter is active and a directory comparison is performed, only files with the following extensions are included in the comparison: *.asp, *.c, *.cc, *.cpp, *.cs, *.css, *.cxx, *.h, *.hpp, *.htm, *.html, *.java, *.jsp, *.rc, *.tlh, *.tli, *.txt.

 

On Windows, read-only and archive files are included in the comparison.

nobinary

When this filter is active and a directory comparison is performed, files with the following file extensions are ignored: a.out, *.a, *.avi, *.bmp, *.chm, *.com, *.dll, *.doc, *.docm, *.docx, *.dot, *.dotm, *.dotx, *.exe, *.gif, *.gz, *.hlp, *.ico, *.ilk, *.jar, *.jpeg, *.jpg, *.lib, *.mdb, *.mid, *.mp2, *.mp3, *.mp4, *.mpeg, *.msi, *.o, *.obj, *.ogg, *.pdb, *.pdf, *.png, *.pps, *.ppt, *.pptx, *.rar, *.snd, *.so, *.tar, *.tif, *.tiff, *.tlb, *.ttf, *.wav, *.wma, *.wmf, *.wmv, *.xls, *.xlsx, *.zip

cvs

When this filter is active and a directory comparison is performed, files with the following file extensions are ignored: .#*, .cvsignore, .cvsrc, .cvswrappers, .cvspass, .rhosts. Also, any directory with the name CVS is ignored.

 

On Windows, read-only and archive files are also included in the comparison.

svn

When this filter is active and a directory comparison is performed, any directory with the name .svn is ignored.

 

On Windows, read-only and archive files are included in the comparison.

git

When this filter is active and a directory comparison is performed, any directory with the name .git is ignored. Also, any file with the name .gitignore is ignored.

 

On Windows, read-only and archive files are included in the comparison.

 

[datasource:<name>]

A [datasource] section defines the connection details to a database, and specifies various other parameters applicable when performing database comparisons. You can create multiple data sources if necessary. For more information, see Setting up Data Sources.

 

[datadiff:<name>]

A [datadiff] section defines the parameters of a database data comparison job that will be run with the data-diff command. You can create multiple [datadiff] sections if necessary. For more information, see Setting up Database Comparisons.


© 2019 Altova GmbH