SSH for permanent repo reference

Issue #351 resolved
Ross Thomas created an issue

In the https interface there is a ‘Permanent URL’ that references a repo by it’s internal ‘id’ (e.g. https://…/_1). This same repo reference fails when using the SSH interface (i.e. ssh://…/_1).

$ hg clone ssh://…/_1 my-name-for-repo
remote: abort: Access to '_1/' denied
abort: no suitable response from remote hg!

Not sure if this is a bug or a feature request.

Kallithea version: 0.5.0 (current head of repo: 155c52d8f210)

TIA.

Comments (8)

  1. Mads Kiilerich

    True. The UI got weird and complex when having both https and ssH URLs and readable and numeric URLs. We thus decided to keep numeric URLs for backward compatibility but not advocate them.

    Also, I don’t see many relevant use cases for numeric URLs. If a repo name changes, any automation that use the repo should probably also be changed … or at least be updated to be explicit and consistent with the new name.

    Can you say more about your use case vs the thoughts and design decisions outlined above?

  2. Ross Thomas reporter

    If this is a design decision then I’m happy and I’ll close this issue.

    The numeric repo name was being bandied about here as a work-around for the two ‘inconvenient’ differences between BB & Kallithea wrt repo naming: flat name-space vs hierarchy enforcement; and case sensitivity.

    None of us are really a fan of the numeric repo suggestion and it was only while investigating that as a least-best option that we tripped over the apparent discrepancy.

  3. Thomas De Schampheleire

    With respect to:

    two ‘inconvenient’ differences between BB & Kallithea wrt repo naming: flat name-space vs hierarchy enforcement; and case sensitivity.

    Can you clarify what is your ideal?

    Kallithea can do both a flat namespace as a hierarchy (using repository groups).

    I guess the repositories in Kallithea are case sensitive. Are they not in Bitbucket?

  4. Ross Thomas reporter

    We have adjusted to life in Kallithea (KT) so our ‘ideal’ is in line with it.

    Well, I should say, re-adjusted as we were once on KT, then forced to use BB and are now (happily) back again. 😎

    Kallithea can do both a flat namespace as a hierarchy (using repository groups).

    In BB you can group repos into Projects but this does not affect the referential naming and all repos live in the ‘root’. This actually caused us issues when initially moving to BB previously.

    I guess the repositories in Kallithea are case sensitive. Are they not in Bitbucket?

    In BB all repos get created and presented in lower-case but you can reference a repo via https/ssh as any case mix and it will still find it. Your local clones end up with the case-mixed name, however. For example:

    $ hg clone bb://Some-Repo

    will find the repo called ‘some-repo' on BB and create a local repo called 'Some-Repo’.

  5. Mads Kiilerich

    Kallithea make some efforts to avoid repos that only differ in casing.

    I think that case ignoring repo access only depends on whether the database and the indices are case folding. I am not sure if it is a bug or a feature if it silently allow “sloppyness”. But if I remember correctly, it is tricky to make it performant and efficient across all databases.

  6. Log in to comment