Differences between revisions 6 and 8 (spanning 2 versions)
Revision 6 as of 2005-12-05 11:22:45
Size: 4880
Comment: Second opinion on reference to revision numbers
Revision 8 as of 2006-12-17 16:29:21
Size: 5061
Comment: new webinterface is reality since 0.9.2
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
Note: most of this is already implemented in Mercurial 0.9.2 -- ThomasArendsenHein [[DateTime(2006-12-17T16:29:21Z)]]
Line 22: Line 23:
 * Metayntactic variables:  * Metasyntactic variables:
Line 66: Line 67:
 * sky: besides URLs below, I suggest:
   http://example.com/repo/head/path/to/dir_or_file
Line 72: Line 74:
   http://example.com/repo/log/081512345678                       http://example.com/repo/log/081512345678 (./)
Line 74: Line 76:
   http://example.com/repo/log/081512345678/path/to/file      
 * changeset:   
   http://example.com/repo/rev/081512345678                   
 * manifest:    
   http://example.com/repo/rev/081512345678/path/to/dir       
   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/ (./)
Line 80: Line 82:
   http://example.com/repo/rev/081512345678/path/to/file      
 * raw file:    
   http://example.com/repo/raw/081512345678/path/to/file      
 * annotate:    
   http://example.com/repo/annotate/081512345678/path/to/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 (./)
Line 86: Line 88:
   http://example.com/repo/diff/081512345678/path/to/file         http://example.com/repo/diff/081512345678/path/to/file (./)
Line 88: Line 90:
   http://example.com/repo/rawdiff/081512345678/path/to/file      http://example.com/repo/raw-diff/081512345678/path/to/file (./)
Line 90: Line 92:
   http://example.com/repo/archive/081512345678.tar.gz            http://example.com/repo/archive/081512345678.tar.gz (./)
Line 93: Line 95:
   http://example.com/repo/tags    http://example.com/repo/tags (./)

Note: most of this is already implemented in Mercurial 0.9.2 -- ThomasArendsenHein DateTime(2006-12-17T16:29:21Z)

Rewrite of hgweb

This is just something [wiki: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.

  2. 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.
  • 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

Specific suggestions

Here is a suggestion for the format of URLs:


CategoryNewFeatures

NewWebInterface (last edited 2012-10-25 21:26:22 by mpm)