grep: extend functionality, add man page entry, add unit test.
walkchangerevs now returns a two-tuple. Its behaviour is also
extensively commented.
The annotate command's getname function has been factored out to a new
function, trimname, so it can be shared between annotate and grep.
The behaviour of grep has been beefed up, so that it now performs a
number of useful functions.
pulling from ../a
searching for changes
warning: pulling from an unrelated repository!
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg update' to get a working copy)
changeset: 1:9a79c33a9db3
tag: tip
user: a
date: Thu Jan 1 00:00:00 1970 +0000
summary: a
changeset: 0:01f8062b2de5
user: b
date: Thu Jan 1 00:00:00 1970 +0000
summary: b