Improvements to the Mercurial Client
CVS-like atomic commit+push
For users who wish to use mercurial like CVS, we want an atomic commit+push routine:
hg servercommit [remote-repo]
Performs the following actions:
- Check that the local repository has no incoming changes from the remote repository... if it does, prompt the user to <tt>hg pull -u</tt>
- editor pops up for commit message
- If commit message was edited, do the commit
- Push the commit to the server.
- If the push fails because it would add a remote head, there was an intermediate commit by another user. Strip the commit from the local repository and restore the working directory to its original (locally modified) state
CVS-like behavior mode
Write an extension or tool that disables all mercurial commands that wouldn't operate in CVS-like mode. So disable at least:
- pull without -u
Improve the hgweb viewer
Add HTML anchors to many elements
Provide named anchors for various elements so that users may post links to them in bug reports, etc.
- line numbers in "file" and "annotate" view
- files and hunks in "revision" view, e.g. link to a particular hunk of http://hg.mozilla.org/mozilla-central/?rev/1b97a74034d1
Allow marking lines of "file" and "annotate" view
In bonsai, you can use a magic &mark=line-line,line-line URL parameter to mark interesting lines, e.g.: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/tools/tinderbox-configs/firefox/win32/mozconfig&rev=188.8.131.52&mark=8-12
- Reimplement the mark parameter in hg "file" and "annotate" view
- Add marking UI so that users can create a marked-up URI without hand-editing the URI
Add basic searching
From the root view or revision view of the hg viewer, give the ability for users to type "cssframeconstructor" and find nsCSSFrameConstructor.h/cpp in the default revision (root view) or the current revision (revision view).
Add graphical history viewing
Add the ability to get a graphical changelog of a particular file, and perhaps of the entire repository, similar to the bonsai functionality.
Because complete history is so large, it may make sense for this to be a dynamically-expandable view, using SVG, instead of a generated image.
This is somewhat like a web version of <tt>hg glog</tt> or <tt>hg view</tt>.
Feature: linear history according to a particular repository
Because mercurial history can get very branch-y, we would like the ability to navigate through history linearly as it appears in a particular repository:
Step 1: mozilla-central
Step 2: local user clones m-c and adds commits
Step 3: new revisions in m-c
Step 4: user merges
Step 5: user pushes
So, the linear history of mozilla-central (the mainline) should be recorded somehow as A -> B -> E -> F. However, we should not require this information to be known at commit-time. It should be recorded when a changeset is pushed to mozilla-central.
Doing this should not impose special requirements on users: they should not have to create a special named branch for their intermediate changes, nor should they have to follow special rules about which direction a particular merge happens.
Possible implementation may include some kind of named-branch, or a datastore recording in which direction merges should be followed.
This implementation should work for multiple ancestries: e.g. a user should be able to follow either mozilla-central or actionmonkey history if they wish.
Add the ability to diff an arbitrary revision against it's last ancestor in mozilla-central. So after step 4, the user should be able to do something like:
hg diff -rF --ancestor=mozilla-central
Add the ability for <tt>annotate</tt> and <tt>log</tt> to follow the history of mozilla-central:
$ hg log --follow=mozilla-central changeset: F changeset: E changeset: B changeset: A
none in particular, though I presume this will involve a post-push hook
The web interface for mozilla-central should annotate/log the mozilla-central history by default, and only note branch histories when explicitly requested by the user.