The linkifier converts old svn revision numbers to links to e.g. https://hg.python.org/lookup/r12345 , and this figures out the equivalent hg changeset and redirects to the corresponding hg.p.o page. The linkifier should just create links to https://hg.python.org/lookup/csid and let the page figure out if the csid is from hg or git and redirect where more appropriate.
Best Regards, Ezio Melotti On Tue, Jan 5, 2016 at 3:37 AM, Alex Gaynor <alex.gay...@gmail.com> wrote: > Probably the easiest thing is to point the linkifier at our own webservice > that just does: > > if hash not in cache: > try: > requests.head("github.com/hash") > except requests.error: > try: > request.head("hg.python.org/hash") > except request.error: > return 404 > else: > cache[hash] = hg.python.org > else: > cache[hash] = github > return cache[hash] > > > I'll send you my consulting bill :-) > Alex > > On Mon, Jan 4, 2016 at 8:33 PM, R. David Murray <rdmur...@bitdance.com> > wrote: >> >> On Tue, 05 Jan 2016 01:26:58 +0000, "Gregory P. Smith" <g...@krypto.org> >> wrote: >> > On Mon, Jan 4, 2016 at 12:34 PM R. David Murray <rdmur...@bitdance.com> >> > wrote: >> > >> > > to have to do some extra work to make the hash links work in the bug >> > > tracker, since I don't think there's any a priori way to distinguish >> > > between hg hashes and git hashes. >> > > >> > >> > Just ignore the remote possibility of short 32-bit hash prefix >> > collisions >> > (possible, but infrequent): the way to resolve that is when a hash >> > lookup >> > fails, to look it up in a translation index of former hg hashes. >> > practical. good enough. >> >> Yes, collision is not the problem, it's that you can't distinguish them >> without a lookup table or something. Which means we have to do more >> than just change the URL in the existing linkifier, which was my point. >> >> --David >> _______________________________________________ >> python-committers mailing list >> python-committers@python.org >> https://mail.python.org/mailman/listinfo/python-committers > > > > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." -- Evelyn Beatrice Hall (summarizing Voltaire) > "The people's good is the highest law." -- Cicero > GPG Key fingerprint: 125F 5C67 DFE9 4084 > > _______________________________________________ > python-committers mailing list > python-committers@python.org > https://mail.python.org/mailman/listinfo/python-committers > _______________________________________________ python-committers mailing list python-committers@python.org https://mail.python.org/mailman/listinfo/python-committers