Question & Answer
Question
How do you specify the file properties and line delimiter types when share a project or check in new file using "scm" command line in IBM Rational Team Concert (RTC)?
Cause
When your team develops software on more than one platform, differences in platform conventions for line termination in text files can affect content merges and other development tasks. By default, RTC source control stores text files in a normalized format, and follows the workspace platform line delimiter convention when loading a file into a sandbox.
RTC Eclipse client includes a File Content preference page that maps file name extensions to line delimiter types. To change the default mapping, you can click the main Eclipse menu "Window > Preferences" and navigate to "Team > Jazz source control > File Properties" page.
If you are using "scm"
command line to share a project or check in a file, the preference configuration in the Eclipse client will not take effect for the files checked in or shared by the command line.
Answer
You can use a "magic" file to change the default mapping between the file name extensions and the line delimiter types if using "scm" command line to share a project or check in a file.
The magic file can be created following the steps below.
- Create a new "magic.properties" file.
This file resides in the following directory, by default:
UNIX and Linux: HOME/.jazz-scm/
Windows: LOCALAPPDATA\jazz-scm\
(For Windows 7, LOCALAPPDATA defaults to C:\Users\userid\AppData\Local.)
- Edit the magic.properties file in the format below:
*.txt: delim: lf
*: delim: platform
where the "delim" keyword may have any one of the following values: - lf indicating that line feeds (ASCII 0x0a) are newlines within the file
- cr indicating that carriage returns (ASCII 0x0d) are newlines within the file
- crlf indicating that carriage-return/line-feed pairs are considered newlines within the file
- platform indicating that RTC should use the platform-specific character to denote newlines
- none indicating that no newline conversion should occur.
"scm checkin"
or "scm share"
, the new files, added in RTC source control, will use the delimiter type identified by the magic file.Note: If you save the "magic.properties" file to an alternate directory instead of your home directory, you can specify that it be read from this alternate directory by setting the environment variable SCM_CONFIG_DIRECTORY. Set it to the full path of the jazz-scm directory, for example, C:\temp\jazz-scm.
Product Synonym
Rational Team Concert
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21607057