An Agreeable Procrastination – and the blog of Niels Kühnel

Code, the universe and everything

Posts Tagged ‘I Fixed This!

How to use TortoiseHG as a client for Assembla’s Source/Git repository

leave a comment »

After a little struggle I have managed to use TortoiseHG as a client for an Assembla Git respository. The biggest problem was to get ssh working with the hg-git extension.

It’s really great because now I can use Mercurial (as I prefer) with Assembla. And with hg-git, the integration with Git repositories is seamless, so I will never have to think about that I’m actually sleeping with the enemy.

So, what you need to do to enjoy the same hapiness as I am is this:

1. Generate a public/private key pair to use with Assembla

Download PuTTy. You can get it from here. Choose to download all the binaries (either as zip or installer).

Use “PUTTYGEN.EXE” to create the key pair and update your profile on Assembla as described at http://www.barebonescoder.com/2010/04/assembla-git-windows-you/

Note the stuff about pageant.exe. On my computer I had to start it manually (it’s placed where you installed PuTTY). It’s pretty easy to make it start automatically with Windows. Just add a shortcut in the folder “Startup” in your start menu.

When it’s running you have to add the private key you’ve just created:

Simply click the pageant icon in the system tray (it’s a computer wearing a fedora) and choose “Add Key”. Then select your key and enter your passphrase

pageant

The pageant icon in the sytem tray on Windows 7

2. Install the hg-git extension

(from http://tortoisehg.bitbucket.org/manual/1.0/nonhg.html)

TortoiseHg Windows installers come with the python-git bindings (named dulwich) that hg-git requires, so one only needs to clone the hg-git repository to your local computer:

hg clone http://bitbucket.org/durin42/hg-git/ C:\hg-git

Then enable hggit and bookmarks in your Mercurial.ini file:

[extensions]
bookmarks =
hggit = C:\hg-git\hggit

You can verify that worked by typing hg help hggit

3. Make a copy of TortoisePlink.exe and call it “ssh.exe”

I took me a while to figure this one out. Luckily, this answer worked. Otherwise you get weird “abort: The system cannot find the file specified” errors when trying to clone the repository.

It’s easy: Simply make a copy of “C:\Program Files (x86)\TortoiseHg\TortoisePLink.exe” (or wherever you have installed TortoiseHG) and call it “ssh.exe”.

4. Use the right url for the repository. That’s not the one from Assembla.

Assembla will tell you to use an url like “git@git.assembla.com:your-space-name.git”. That doesn’t work. Instead you should use “hg clone git+ssh://git@git.assembla.com/your-space-name.git”.

5. Enjoy

That’s it. Now you can use TortoiseHG as you’re used to while pushing and pulling changes from Assembla. Neat, huh?

Written by niels.kuhnel

September 1, 2010 at 5:37 pm

Posted in Uncategorized

Tagged with ,

How to use the cool, new OpenType features in Word 2010

with one comment

It’s really nice to see that Microsoft finally provides support for the standard they defined themselves only 14 years ago. The advanced typography features of OpenType, now enabled in Word 2010, makes your documents look so much more professional and aesthetically pleasing. Especially when they’re combined with features already present in earlier versions of Word.

However, all this is disabled by default. Here’s how to enable it:

1. Change the “normal” style to enable the features everywhere:

OpenType features in Word2010 - Change font settings, small

2. Enable hyphenation

Hyphenation 

And now, look what you’ve got: Kerning (must have), ligatures (must have – special characters for certain character “collisions” like fi, ffi) and old-style figures (optional, but looks really nice and fancy ad agency’ish).

OpenType features in Word 2010

It looks like the everyday typophile can finally retire LyX + XeLaTeX. XeLaTeX’ll probably have some sophisticated features, still not present in Word, but in comparison Word documents are extremely convenient as they can be emailed to and fro for comments and collaboration, without telling people how to install MikTeX, LyX and follow various intricate guides to set it up right.

One more thing… You probably want to create a PDF when you’re nicely looking document is done. And you have probably used Type 1 flavoured OpenType fonts (the ones form Adobe that have so-called CFF outlines), and then you find that your PDF looks miserable and text can’t be selected when you use Word’s build-in export function. That’s because Word doesn’t support OpenType fonts with CFF outlines.  Luckily a free remedy (soon again) exists if you want to have both automatically generated table of contents AND OpenType fonts with CFF outlines. The PDF-T-Maker. For some reason it doesn’t currently work with Word 2010. I have created a patch and sent it to them. To avoid licensing issues I will not publish it here, though.

Written by niels.kuhnel

August 26, 2010 at 4:47 pm