1. Marcin Kuzminski
  2. RhodeCode
  3. Issues


Issue #619 resolved

Make Changeset Hashes in Links Shorter

Na'Tosha Bard
created an issue

At least for Mercurial repositories, links to a changeset contain the full 40-byte hash, which makes them very cumbersome to paste into documents, chats, etc. They should be shorter (i.e, 16 characters) so that they are more manageable.

Comments (5)

  1. Marcin Kuzminski repo owner

    I'm against that since i want urls to be the same for git and hg, and git handling of short hashes is really bad, You can always copy the 16 chars or less and the urls should work just fine for mercurial. I don't want to change the urls really. Github uses long urls, and have git.io shortener impl. I would rather do an url shortener in rhodecode than make the links shorter

  2. Aras Pranckevičius

    How is git bad at handling partial hashes? E.g. on github and in my local client, short hashes seem to work just fine.

    Anyway, even if it's not possible for git, how about (pseudocode):

    function printHashUrl(hash) {
        if (usingGit)
            print full hash;
            print first N chars as configured in global settings;

    And use that function to print the hash everywhere it's printed.

  3. Marcin Kuzminski repo owner

    Sorry i wasn't clear enough i mean git implementation in RhodeCode, and specially dulwich(python git impl used in RhodeCode) doesn't really support lookup by shorter hashes. It's not so trivial to switch everything to short urls, but i'll keep that in mind and try to do something about it.

  4. Log in to comment