a GUI front-end author's problems parsing mercurial output
Elliott Hughes
enh at jessies.org
Fri May 19 13:24:43 CDT 2006
hi. i'm the main author of the "SCM" front-end to Bazaar, BitKeeper,
CVS, Mercurial, and Subversion (http://software.jessies.org/scm/).
it's a Java/Ruby GUI that aims to give you a good revision control UI
regardless of your choice of revision control system or OS. i pushed
the preliminary Mercurial support last night (so anyone brave enough
to poke about with it is welcome to send us feedback, though off-list
because none of us are subscribed), and had a few comments i thought
you might be interested in, in roughly increasing order of importance:
* it's good that your command-line is broadly similar to bzr(1) and
svn(1), but it's a bit confusing that the wiki seems more up-to-date
than the commands themselves when it comes to what options they
support. it would be better if the in-command help text were
generated by the argument parsing code itself, for accuracy's sake.
(the most obvious example being "hg log -v", which works, is
necessary for my purposes, but which isn't mentioned in the "hg log --
help" output.)
* as far as i can tell, the character encoding is nowhere defined. i
haven't tested yet, but hopefully it's all UTF-8 internally? it would
be beneficial to tool authors if this were documented.
* is there a reason why Mercurial doesn't use ISO date format (http://
www.cl.cam.ac.uk/~mgk25/iso-time.html)? most modern tools do, but
Mercurial uses RFC-like dates that -- in the absence of a
specification -- always leave one wondering if those month names that
need parsing are going to trip us up one day on some system where
they're localized to a language other than English.
* the "files:" header line in the log output doesn't cope with
filenames containing spaces. there's no way to tell whether
"files: new file" is one file or two. this could be solved by
escaping, URL encoding, or having multiple "files:" lines (like the
"parent:" lines); whatever's easiest in python.
* the "description:" in the log output doesn't escape check-in
comments containing "\n\n" or lines that look like header lines (so i
could have a comment "\n\nchangeset:
2242:12e36dedf668c483df6fe0fbfb3f0efdaded8b4c\ndescription:\nthis is
a fake changeset!", say). a common solution to this problem is to
output each description line (and no other kind of line) preceded by
" ". again, whatever's easiest in python is fine.
to end on a more positive note, as a long-time BitKeeper user i'm
impressed by Mercurial's inclusion of the "files:" header lines. that
makes it *much* easier and faster for us to show the entire changeset
than we can in BitKeeper, which doesn't make the information so
readily available. on a similar note, having both the revision number
and the changeset number available at the same cost is a good thing.
thanks!
-- http://www.jessies.org/~enh/
More information about the Mercurial
mailing list