## Please edit system and help pages ONLY in the moinmaster wiki! For more ## information, please see MoinMaster:MoinPagesEditorGroup. ##master-page:Unknown-Page ##master-date:Unknown-Date ##acl MoinPagesEditorGroup:read,write,delete,revert All:read #format wiki #language en <> <> = New Web Interface = == Rewrite of hgweb == This is just something [[EricHopper|I'm]] playing around with, and it may not become 'official'. There are two basic goals I'm going for in this re-write: 1. I would like to eliminate GET form variable syntax from most of the URLs. I find URLs that say things like {{{http://selenic.com/repo/hg?ca=68ec7b9e09a4;type=bz2}}} to be rather ugly and painful to create links to from other places. Additionally, I do not think they convey to a user who sees it exactly what is being linked to. 1. I would like to clean up the code and make it obvious which code path is executed for any given URL. I would also like to abstract things sufficiently so that setting up different front ends is easy. For example, currently only CGI, and the simple Python http server are supported. It would be nice to add FastCGI, mod_python, and the Twisted http server, but right now the code makes it hard. The URLs being used are a human factors issue, and I know that I don't know the best ideas for how they should work. So I'm really interested in what you all have to say about it. The code currently has a fairly generic engine for mapping URLs to functions using regular expressions. It can also pull out named sub-expressions to use as parameters. So, when making suggestions about URLs, keep in mind those limitations, or suggest a better engine. === Things to think about === * Metasyntactic variables: * deadbeef - hash prefix, possibly the entire hash * f011beef - the full hash * revnum - a revision number * tag - A tag name * {x,y,z} - One of x, y, or z. * Reference to changelogs or revisions must allow * hash (the hash may be short) * tags (tags with special characters may not be able to be directly referenced) * Not allow reference to revision #s as we would like to discourage links that may arbitrarily change. (I don't think this should be restricted -- ThomasArendsenHein <>) * changelog - list of changes with summary * children in summary * Any attempt to display DAG? * changelog - data about single change * include diffs? * include children? * Special display for merges? * changelog - data about single file * Do this at all? * Links to change history for file? * What to do for files that haven't changed? * Special raw mode for diff data? * If raw mode, then what to do about merges? * revision - the state of the repository at a particular revision * What about diffs? * Special raw mode? * Any kind of color syntax highlighting support? * Some sort of list of changelog entries that include changes to this file? * How do changelog entries and revisions relate? * Allow explicit reference to a manifest rev? * Allow explicit reference to a file rev? * Must have some listing of tags * Do tags link to the changelog or revision? * Do they link by explicit hash or by tag name? * If by tag name, do weird tags still link to explicit hash, or some strangely escaped tag name? * Link to archive link for tag? * Archives * Some way of specifying tags? === Commentary === * [[tonfa]] thinks I should use {{{url.split('/')}}} for speed reasons. * Perhaps this is true, but I feel that choosing that path right now is premature optimization. It's quite possible an optimized URL parser could be written after a good syntax is decided upon. -- EricHopper <> * sky: besides URLs below, I suggest: http://example.com/repo/head/path/to/dir_or_file === Specific suggestions === Here is a suggestion for the format of URLs: * changelog: http://example.com/repo/log/081512345678 (./) * filelog: http://example.com/repo/log/081512345678/path/to/file (./) * changeset: http://example.com/repo/rev/081512345678 (./) * manifest: http://example.com/repo/file/081512345678/path/to/dir/ (./) * file: http://example.com/repo/file/081512345678/path/to/file (./) * raw file: http://example.com/repo/raw-file/081512345678/path/to/file (./) * annotate: http://example.com/repo/annotate/081512345678/path/to/file (./) * filediff: http://example.com/repo/diff/081512345678/path/to/file (./) * raw filediff: http://example.com/repo/raw-diff/081512345678/path/to/file (./) * archive: http://example.com/repo/archive/081512345678.tar.gz (./) (maybe as alternative: http://example.com/repo.tar.gz or http://example.com/repo-tip.tar.gz or http://example.com/repo-081512345678.tar.gz) * tags: http://example.com/repo/tags (./) ---- CategoryOldFeatures CategoryWeb