Posts Tagged ‘git’

Testing out bisecting

Monday, February 11th, 2008

About the time to take some action:

chi linux # git-bisect good
Bisecting: 4814 revisions left to test after this
[d2e626f45cc450c00f5f98a89b8b4c4ac3c9bf5f] x86: add PAGE_KERNEL_EXEC_NOCACHE

Also.. back in Tartu. A new semester, weather feels crappy and this time I forgot my toothpaste.. ;)

Django with Git

Friday, January 4th, 2008

I decided to take a peek into Django world and while playing around with tutorial project I decided to use also git for version control.
As basic Django project layout is following:

project/
    __init__.py
    manage.py
    settings.py    # < -- Contains sensitive information
    urls.py

Where settings.py contains sensitive information like usernames/passwords and other data one doesn’t actually want to save in the repository.
But fortunately it’s possible to use external configure file which is included by main configuration file and thanks to Python’s clever exception system, or ImportError exception, we can simply make following modification to settings.py:

diff --git a/project/settings.py b/project/settings.py
index 641c97f..9019d9e 100644
--- a/project/settings.py
+++ b/project/settings.py
@@ -84,4 +84,9 @@ INSTALLED_APPS = (
     'django.contrib.sites',
 )
-
+
+try:
+	import sys
+	from settings_local import *
+except ImportError, e:
+	print "Unable to load local settings: %s" % e
+	sys.exit(1)

Then we create settings_local.py which contains all these defines you do not want to appear inside the repository.

Swfdec git ebuilds

Thursday, November 8th, 2007

As people seem to be looking for working ebuild for swfdec-mozilla (current one in portage is b0rked). I have uploaded the latest git snapshot ebuilds here: