imported from gitorious