Archive for September, 2007

Revert a Changeset in Subversion

Wednesday, September 19th, 2007

Today I accidentally gzipped a file and copied it over my original….(I won’t get into how I managed to accomplish this). I hadn’t realized my mistake until I checked in the file into “trunk”.

After a brief moment of panic I had a the original restored, after re-applying my local changes.

Changeset #2301 is the bad file that was committed to trunk erroneously.
Changeset #2300 is the most recent “working version” of the same file.


$ svn merge 2301:2300 ./path/to/file

The arguments are explained better with “svn help merge” display. The command will merge the newer version with the older version for the given file path.

The one problem is that I lost all my local changes on the file. Be sure to check your changes in frequently…if you work on a feature that is not going to be done soon (a day or less)…then perhaps branching will be a good idea so you can retain revision history on files before they are ready for “trunk”.

If you need to save the changes in the file you checked in, prior to reverting (merging) back to the previous version, make a backup of the file that was checked into trunk accidentally.

We will assume you checked in “foo.html” on accident, but still want to keep your changes to the “working copy”:


$ cp foo.html foo.html.new
$ svn merge -r 2301:2300 foo.html
$ svn st
   #=> M foo.html (it is modified -- back to its original state)
$ svn ci -m 'reverting accidental checkin' ./foo.html
$ mv foo.html.new foo.html
$ svn st
   #=> M foo.html (it is modified in your working copy, containing the changes you reverted from trunk)

Now you are back at the original state — a locally modified “foo.html” with the original back in “trunk” where it belongs.

VN:F [1.8.4_1055]
Rating: 3.0/10 (1 vote cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)

IAP Political Forum -

Wednesday, September 19th, 2007

Great political forum recently redesigned with speed improvements.

read more | digg story

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)

Ruby Text in CSS3

Wednesday, September 12th, 2007

“Ruby text” is a new paradigm added to the CSS 3 specification (currently in draft). It allows an author to associate and align blocks or fragments of text with each other.

“Ruby” is the term used for a run of text that is associated with another run of text, referred to as the base text. Ruby text is used to provide a short annotation of the associated base text.CSS 3.0


<ruby>
  <rb>WWW</rb>
  <rt>World Wide Web</rt>
</ruby>

This would allow the design to place the ruby and the ruby text in the desired order, as shown here:

Ruby text markup

Common use cases will be for content written in Japanese or Chinese…although there are many examples of it in English as well.

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)