Issue #533 wontfix

Add DOAP and FOAF support

David Larlet
created an issue

The attached patch is still a work in progress but it works :-)

Still missing: how to deal with auth/perms? what if a user choose "rdf" as repo name? what is the best way to generate absolute URLs? support for private & cnamed repos discuss with DOAP crew to add an HGRepository class do something useful with that ;)

Comments (15)

  1. David Larlet reporter

    I should probably use just .slug instead of .name_as_slug()? I copy/paste it from get_absolute_url() but it doesn't look to be necessary in this case.

  2. Jesper Nøhr
    • changed status to open
    • auth/perms: You got auth_if_private from helpers, should suffice, otherwise there's always repo.get_writers() + repo.get_admins().
    • rdf as repo name: maybe we can use something like ?rdf=t instead of /rdf/? Don't know how ugly this would be..
    • absolute urls: there's .get_absolute_url() on most objects, but in case there isn't, resort to reverse()
    • private/cnamed repos: private repos, you can use auth_via_token (used for feeds), for cnamed repos, there are a bunch of helpers (look in cname.py) you can use
    • name_as_slug: this is just a helper that runs on .save(), so don't use it directly unless you have to. As you said, just use .slug.
  3. David Larlet reporter
    • auth/perms: OK
    • /rdf/ looks consistent with feeds, I imagine there are already reserved names for repos?
    • I already use reverse but by absolute I mean real absolute (not the django way) with scheme+authority(+path)
    • private/cnamed: OK
    • .slug already used in the latest patch ;)
  4. Jesper Nøhr
    • /rdf/: ah, but the way we get around feeds, is to use /rdf/feed/ and /atom/feed/ since a repository slug cannot contain a slash ;) there will never be collisions this way
    • absolute url: you mean including http(s) + bitbucket.org + object.get_absolute_url()? for now, check whether request.is_secure() for http/https, and just hardcode bitbucket.org (we have to move to Site in the future, but we'll do that all at once)
  5. Log in to comment