Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Stop rational team concert (RTC) changing file text encoding?

I need to integrate some source code from ClearCase(CC) to RTC, but some how some xml files were changed after checked into RTC. These files contains the same content with the original ones from CC, but the endcoding was changed. For example, a xml file encoded by Unix will be changed to Dos after checked into RTC.

I don't know if it will cause any impact to the project, maybe this problem can be ingonred. But I prefer to keep the code what they look like from CC. Is there any way to do that? Don't know where to config about that.

like image 961
user1676950 Avatar asked Nov 23 '12 03:11

user1676950


1 Answers

As mentioned in this thread, it is because ".xml" files have the property "Line Delimiter" set to "Platform". This is an RTC default.

The line delimiter of a file that is under version control is a version-controlled property in the RTC repository.
The part that is a client-side configuration is the rule that specifies what the line delimiter should be for a new file being put under version control for the first time.

So the issue is: you cannot version the eol style you would want: this is a local properties defined by the client (here the Eclipse RTC GUI), managed by the File Property Wizard.

The general issues are:

  • Synchronize preferences between Eclipse workspaces
  • It should be possible to ensure that consistent mime type and line ending rules be applied to every file in a component

The settings are described here:

Procedure

  • On the Eclipse main menu, click Window > Preferences and navigate to Team > Jazz source control
  • On the File Properties page, you can view how Rational Team Concert source control currently maps file name suffixes to MIME content types and line delimiters.
    You can also change these mappings, and add new ones.
    File types and their properties are displayed as a hierarchical list.
    Properties of an item in the list are inherited by its children.
    Inherited properties are not displayed (the table cell is empty).
    • To change a line delimiter type, click an item in the list and choose a type form the list.
    • To add a new file name extension and properties for it, click Add File/Extension.
    • To remove an existing mapping, click it and then click Remove.
  • Click OK to save your changes and exit.
like image 56
VonC Avatar answered Jan 01 '23 20:01

VonC