Friday, 12 March 2010

Unhashing Gitorious paths

Gitorious hashes the repository paths which can be an issue if you need to access them from somewhere else (e.g. Redmine). I wrote a script that creates sane links to the repositories with an easily followable structure. Probably the best way to use this is to add this to crontab to be run every now and again (every 10 minutes?).

8 comments:

  1. I was going to post and say that I couldn't find the script, but I realized that it may have been in Javascript. I had to allow like 10 different sites for Javascript in order to be able to see the script.

    ReplyDelete
  2. Oh, I didn't even realise that. I host the code snippets in smipple and use their embed script to show them here.

    ReplyDelete
  3. Any chance this script could be hosted in git somewhere (e.g. gitorious.org or github.com) so that people can keep track of revisions?

    ReplyDelete
  4. I don't have any ideas or needs at the moment to improve this script, but if someone wants to, feel free to use the script in any way you want. This script has the WTFPL license ( http://sam.zoy.org/wtfpl/ ).

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Thanks for this, came in handy. I installed mysql via gem, and found that I had to 'require "rubygems"' first, in order for mysql to load.

    Also, do you think the paths should be based off projects.slug rather than projects.title ? The url for the actual git repository doesn't change in gitorious when you rename a project. I suppose it just depends on whether you want consistency with the project name or the git url.

    ReplyDelete
  7. I haven't thought of that to be honest. I'm not currently using Gitorious as a private instance either (I don't have one available) so I can't check which one would make more sense.

    ReplyDelete
  8. what happened to the script? Is it still available?

    ReplyDelete