So once more, development on an internal project hit a stumbling block. The latest release of Dojo, 1.3.1, has some bug fixes I'd like to use, and in general I like to keep my main project working with the newest dojo releases. But 1.3.1 introduced a new security constraint that basically escaped all the html that I was showing in a grid control. Suddenly, instead of rich text, I get HTML markup!!!

The issue was raised a month ago, and a patch added to the Dojo trunk. But the 1.3.1 version was not patched, and the patch wasn't applied to the 1.3 branch, either. And the patch, adding a flag called "escapeHTMLInData" seems like a sensible approach, so I wanted to start coding for it. Except that the trunk of development, as the only place with the patch, had too many other changes implemented that I did not want to deal with just yet.

Git to the rescue. Git, if you don't know, is a popular source-code management tool we use at Freelock for managing all of our development, as well as keeping sites maintained.

Here's what I did to get the patch into my main codebase:

  1. git checkout -b gridEscapePatch svn/release-1.3.1  # Create a new branch called "gridEscapePatch" so I can still switch to other points without losing the patch
  2. gitk --all # pull up the entire history of Dojo, and in the search box, search for "EscapeHTML". This pulled up the commit containing the patch I wanted to apply.
  3. git cherry-pick 18f0dc99798  # Once I found the commit containing the patch, apply it to my current tree.

Done!

That's why I like using git.

I'll write a post on how we manage dojo in git as a submodule of our main projects soon, but for now if you want to clone our dojo git repository, use "git clone git://git.freelock.com/git/dojo.git" to get your own copy.

Permalink

Git sounds like a dream. Does it work in a non-programming environment? I'd like to use for a writing fiction. Does Git, or any other version control system, manage changes to binary (OO.org or Word) or rich text files?

Thanks

You can use git or svn or a variety of other tools to manage documents. Most modern (i.e. newer than CVS/RCS) version control tools can create efficient diffs of binary files, and help keep disk usage down.

However, they don't give you tools for merging changes. They are not able to unzip an OOo file, merge changes cleanly, and zip it back up--at least not yet.

For just providing you a backup history of your documents, it's great, and I highly recommend using some tool for doing this--I devoted a chapter in "Open Source Solutions for Small Business Problems" to managing documents in Subversion. But these tools don't provide the same benefits to collaborative document development as they do with collaborative development...

I could have spent hours to determine that. It sounds like you'd have to keep the content files in some sort of markup format and use a WYSIWYG editor that rendered the display separately.

In reply to by Michael (not verified)

Permalink

... "Lyx and LaTeX", as the rest of the world refers to it ;-)

Add new comment

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <blockquote cite> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h1> <h2 id> <h3 id> <h4 id> <h5 id> <p> <br> <img src alt height width>
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.