Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Define file types with magic.properties

How can I determine the MIME type of files added to RTC source control?

I have tried to display or compare visual studio .xxproj-files (csproj, vbproj), but they could not be displayed or compaired, because they seem to have the wrong file type.

I've found this article in the wiki https://jazz.net/wiki/bin/view/Main/SCMMagicFile#The_magic_file.

I have created a file
C:\Dokumente und Einstellungen\<name>\.jazz-scm\magic.properties
with this entry:
*.csproj: mime: text/xml

But when adding or creating a .csproj file (in the eclipse client) to source control, the file type is still just File.

Looks like the magic.properties is only used by visual studio? When creating a new project in visual studio, the files could be viewed in web client.

Would it make sense to modify the default mime setting for these files that visual studio project files (and other files) could be viewed in the web without modifying each client?

Could I make a setting to default, that visual studio project files could be viewed in the web without modifying each client?

1 vote



5 answers

Permanent link
How can I determine the MIME type of files added to RTC source control?

I have tried to display or compare visual studio .xxproj-files (csproj, vbproj), but they could not be displayed or compaired, because they seem to have the wrong file type.

I've found this article in the wiki https://jazz.net/wiki/bin/view/Main/SCMMagicFile#The_magic_file.

I have created a file
C:\Dokumente und Einstellungen\<name>\.jazz-scm\magic.properties
with this entry:
*.csproj: mime: text/xml

But when adding or creating a .csproj file (in the eclipse client) to source control, the file type is still just File.

Looks like the magic.properties is only used by visual studio? When creating a new project in visual studio, the files could be viewed in web client.

Would it make sense to modify the default mime setting for these files that visual studio project files (and other files) could be viewed in the web without modifying each client?

Could I make a setting to default, that visual studio project files could be viewed in the web without modifying each client?


To answer the first part of your question - You can find the MIME type of a file in RTC source control by looking at the jazz Properties of the file. MIME type can also be modified for a loaded file from Jazz Properties.

Are you using visual studio client to create the project and then checking in the changes through Eclipse client?

0 votes


Permanent link
The projects have been created with visual studio 2010. The project lead wants to have a look at those files in the web client. (In eclipse you can see and compare them.)

Unfortunately they have more than 50 projects (now with the wrong mime type; therefore we are looking for a way to correct them at once).

You wrote "MIME type can also be modified for a loaded file from Jazz Properties." Does this change the type for the entire object or just for this version of the object and maybe the future once?

0 votes


Permanent link
The projects have been created with visual studio 2010. The project lead wants to have a look at those files in the web client. (In eclipse you can see and compare them.)

Unfortunately they have more than 50 projects (now with the wrong mime type; therefore we are looking for a way to correct them at once).


You can do the following to change the MIME types of all these projects:
Load repository workspace using Visual Studio client. Multi-select projects in solution explorer, and open <b>&quot;Properties&quot;</b>. The properties view should have a field called <b>&quot;File Properties&quot;</b>. Change the value of <b>&quot;MIME type&quot;</b> field under it to &quot;text/plain&quot;. This will update the MIME type of all the selected project files, and unresolved changes will appear in Pending Changes. Check-in all and deliver. This will update the MIME type in repository. You can do the same thing from Eclipes client as well.
After this the project lead will be able to see it in web client.

You wrote &quot;MIME type can also be modified for a loaded file from Jazz Properties.&quot; Does this change the type for the entire object or just for this version of the object and maybe the future once?


This changes the MIME type of .csproj file and after you deliver the change to stream, it gets stored in stream. Everyone in the team will see the MIME type as &quot;text/plain&quot; after this.

0 votes


Permanent link
Hello,

How can i speficy the file property, mime type, using Visual Studio?

In Eclipe we can do like this: (Note, i dont need to select one specific file or mutiple files to do this.)

https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/t_scm_eclipse_file_properties.html&scope=null

    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.

0 votes


Permanent link
Hello,

How can i speficy the file property, mime type, using Visual Studio?


In Eclipe we can do like this: (Note, i dont need to select one specific file or mutiple files to do this.)

https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/t_scm_eclipse_file_properties.html&scope=null

    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.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Feb 29 '12, 11:46 a.m.

Question was seen: 7,036 times

Last updated: Nov 05 '14, 7:08 a.m.

Confirmation Cancel Confirm