Tuesday, February 23, 2010

hg serve and hg glog

If you want to view Mercurial changes graphically, there are at least two choices: hg serve (web-based version) and hg glog (command-line version).

For the first, you do:

hg serve
then go to http://localhost:8000/, then click "graph" on the top left, and by repeated clicking "more" on the top right, you will find the changes you want to see.

We pushed the graph of changes to the limit today and we couldn't fully see the stuff we were interested on the far right, because it was cut-off:

Richard told me about the Graph log extension for Mercurial to see branches at command-line (in Terminal.app), which was able to do a better job at displaying the change history graphically than hg serve did.

To use that, edit ~/.hgrc and add "hgext.graphlog = " under [extensions]. Then:

hg glog
which produces output like the following that doesn't break. I attempted to use the same changesets as shown above in the pic for an apples-to-apples comparison, even though it looks a bit different:
| o---------+ | |  changeset:   ...
|   | | | | | | |  user:        ...
|  / / / / / / /   date:        ...
| | | | | | | |    summary:     ...
| | | | | | | |
| | | | | o | |    changeset:   ...
| | | | | |\ \ \   parent:      ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
| | +-------o | |  changeset:   ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
o---------+ | | |  changeset:   ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
| | | | | o | | |  changeset:   ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
o-----------+ | |  changeset:   ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
| | | | | | o | |  changeset:   ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
o-------------+ |  changeset:   ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  parent:      ...
| | | | | | | | |  user:        ...
| | | | | | | | |  date:        ...
| | | | | | | | |  summary:     ...
| | | | | | | | |
| | | | | | | o |  changeset:   ...
| | | | | | | |/   parent:      ...
| | | | | | | |    user:        ...
| | | | | | | |    date:        ...
| | | | | | | |    summary:     ...
| | | | | | | |
o-------------+  changeset:   ...
| | | | | | | |  parent:      ...
| | | | | | | |  parent:      ...
| | | | | | | |  user:        ...
| | | | | | | |  date:        ...
| | | | | | | |  summary:     ...
| | | | | | | |
| | +---------o  changeset:   ...
| | | | | | |    parent:      ...
| | | | | | |    user:        ...
| | | | | | |    date:        ...
| | | | | | |    summary:     ...
| | | | | | |
o-----------+  changeset:   ...
| | | | | | |  parent:      ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
| | | | | | o  changeset:   ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
o | | | | | |  changeset:   ...
|\| | | | | |  parent:      ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
| o | | | | |  changeset:   ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
o | | | | | |  changeset:   ...
|\| | | | | |  parent:      ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
| o | | | | |  changeset:   ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
o | | | | | |  changeset:   ...
|\| | | | | |  parent:      ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
| o | | | | |  changeset:   ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...
| | | | | | |
o-----------+  changeset:   ...
| | | | | | |  parent:      ...
| | | | | | |  parent:      ...
| | | | | | |  user:        ...
| | | | | | |  date:        ...
| | | | | | |  summary:     ...

No comments: