We will not, sir, render…

Today I moved a concepts-n-usage document from MagicDraw out to Subversion, and made a link from MagicDraw out to the Subversion, uh, version.  The problem being, when I go there, it is rendered as raw HTML!

Initial Tries

I tried “view page source” and it looked just the same.  I tried to find a URL parameter to pass to tell it to render the HTML, but didn’t come up with anything.

Worries

Visions began to go through my mind of having to maintain the document in MagicDraw (but the html text control in MagicDraw is clunky… response is sluggish, and it’s too easy to accidentally delete things from your document, possibly without knowing it —  it really seems like it’s designed for use as a possibly multiline text box, not multipage documents); or export a copy of what’s in Subversion to some location on the network that is then referenced (but how to automatically keep that up to date with the repository?  Ug…) or have two versions, one in Subversion and one in MagicDraw and try to always remember to keep them in sync (I don’t know that I could ever be happy with that though, especially not after reading Test-Driven Development!)

Searching

So it was with angst and worry that I started looking for information about Subversion, and rendered vs. raw html.  My search eventually led me to the section in the online Subversion book dealing with file content type.  It took a few minutes for it to sink in, but finally I realized that there was a subversion property named svn:mime-type, and it looked like if I could set that, it might help with my rendering issue.

I wondered if you could set the Subversion properties in Eclipse.  You can:

But what to set it to?  (Now stop your snickering, all you MIME-savvy folks, I’m not hip on all this stuff so I have to look it up, okay? ;)

I looked through the MIME text media types, and text/html looked like the best thing, so I set that:

…and committed my changes…

Solved

…and now my link from MagicDraw renders beautifully:

I think there’s a way to set up Subversion to do this automatically for .html documents so that I wouldn’t have to explicitly set a property, but this is good enough for me today!

Advertisements

, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s