diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -129,8 +129,14 @@ def churn(ui, repo, *pats, **opts):
         aliases = repo.wjoin('.hgchurn')
     if aliases:
         for l in open(aliases, "r"):
-            alias, actual = l.split('=' in l and '=' or None, 1)
-            amap[alias.strip()] = actual.strip()
+            try:
+                alias, actual = l.split('=' in l and '=' or None, 1)
+                amap[alias.strip()] = actual.strip()
+            except ValueError:
+                l = l.strip()
+                if l:
+                    ui.warn(_("skipping malformed alias: %s\n" % l))
+                continue
 
     rate = countrate(ui, repo, amap, *pats, **opts).items()
     if not rate:
diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -227,7 +227,7 @@ def sign(ui, repo, *revs, **opts):
         data = node2txt(repo, n, sigver)
         sig = mygpg.sign(data)
         if not sig:
-            raise util.Abort(_("Error while signing"))
+            raise util.abort(_("error while signing"))
         sig = binascii.b2a_base64(sig)
         sig = sig.replace("\n", "")
         sigmessage += "%s %s %s\n" % (hexnode, sigver, sig)
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -2106,7 +2106,7 @@ def fold(ui, repo, *files, **opts):
     if not files:
         raise util.Abort(_('qfold requires at least one patch name'))
     if not q.check_toppatch(repo)[0]:
-        raise util.Abort(_('No patches applied'))
+        raise util.Abort(_('no patches applied'))
     q.check_localchanges(repo)
 
     message = cmdutil.logmessage(opts)
@@ -2133,7 +2133,7 @@ def fold(ui, repo, *files, **opts):
         pf = q.join(p)
         (patchsuccess, files, fuzz) = q.patch(repo, pf)
         if not patchsuccess:
-            raise util.Abort(_('Error folding patch %s') % p)
+            raise util.Abort(_('error folding patch %s') % p)
         patch.updatedir(ui, repo, files)
 
     if not message:
@@ -2883,7 +2883,7 @@ def mqinit(orig, ui, *args, **kwargs):
     else:
         repopath = cmdutil.findrepo(os.getcwd())
         if not repopath:
-            raise util.Abort(_('There is no Mercurial repository here '
+            raise util.Abort(_('there is no Mercurial repository here '
                                '(.hg not found)'))
     repo = hg.repository(ui, repopath)
     return qinit(ui, repo, True)
diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -234,7 +234,7 @@ class transplanter(object):
                 p2 = node
                 self.log(user, date, message, p1, p2, merge=merge)
                 self.ui.write(str(inst) + '\n')
-                raise util.Abort(_('Fix up the merge and run '
+                raise util.Abort(_('fix up the merge and run '
                                    'hg transplant --continue'))
         else:
             files = None
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -839,7 +839,7 @@ def debugancestor(ui, repo, *args):
         lookup = r.lookup
     elif len(args) == 2:
         if not repo:
-            raise util.Abort(_("There is no Mercurial repository here "
+            raise util.Abort(_("there is no Mercurial repository here "
                                "(.hg not found)"))
         rev1, rev2 = args
         r = repo.changelog
@@ -2102,7 +2102,7 @@ def identify(ui, repo, source=None,
     """
 
     if not repo and not source:
-        raise util.Abort(_("There is no Mercurial repository here "
+        raise util.Abort(_("there is no Mercurial repository here "
                            "(.hg not found)"))
 
     hexfunc = ui.debugflag and hex or short
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -198,7 +198,7 @@ class changectx(object):
             if match(fn):
                 yield fn
         for fn in sorted(fset):
-            if match.bad(fn, _('No such file in rev %s') % self) and match(fn):
+            if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
                 yield fn
 
     def sub(self, path):
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -463,9 +463,9 @@ def _dispatch(ui, args):
     cmd, func, args, options, cmdoptions = _parse(lui, args)
 
     if options["config"]:
-        raise util.Abort(_("Option --config may not be abbreviated!"))
+        raise util.Abort(_("option --config may not be abbreviated!"))
     if options["cwd"]:
-        raise util.Abort(_("Option --cwd may not be abbreviated!"))
+        raise util.Abort(_("option --cwd may not be abbreviated!"))
     if options["repository"]:
         raise util.Abort(_(
             "Option -R has to be separated from other options (e.g. not -qR) "
diff --git a/mercurial/hbisect.py b/mercurial/hbisect.py
--- a/mercurial/hbisect.py
+++ b/mercurial/hbisect.py
@@ -63,7 +63,7 @@ def bisect(changelog, state):
     if not ancestors: # now we're confused
         if len(state['bad']) == 1 and len(state['good']) == 1:
             raise util.Abort(_("starting revisions are not directly related"))
-        raise util.Abort(_("Inconsistent state, %s:%s is good and bad")
+        raise util.Abort(_("inconsistent state, %s:%s is good and bad")
                          % (badrev, short(bad)))
 
     # build children dict
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1205,7 +1205,7 @@ class localrepository(repo.repository):
                 cg = remote.changegroup(fetch, 'pull')
             else:
                 if not remote.capable('changegroupsubset'):
-                    raise util.Abort(_("Partial pull cannot be done because "
+                    raise util.Abort(_("partial pull cannot be done because "
                                        "other repository doesn't support "
                                        "changegroupsubset."))
                 cg = remote.changegroupsubset(fetch, heads, 'pull')
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1284,7 +1284,7 @@ def internalpatch(patchobj, ui, strip, c
     if eolmode is None:
         eolmode = ui.config('patch', 'eol', 'strict')
     if eolmode.lower() not in eolmodes:
-        raise util.Abort(_('Unsupported line endings type: %s') % eolmode)
+        raise util.Abort(_('unsupported line endings type: %s') % eolmode)
     eolmode = eolmode.lower()
 
     try:
diff --git a/tests/test-cat.t b/tests/test-cat.t
--- a/tests/test-cat.t
+++ b/tests/test-cat.t
@@ -19,6 +19,6 @@
   $ hg cat -r 0 b
   0
   $ hg cat -r 1 a
-  a: No such file in rev 03f6b0774996
+  a: no such file in rev 03f6b0774996
   $ hg cat -r 1 b
   1
diff --git a/tests/test-churn b/tests/test-churn
--- a/tests/test-churn
+++ b/tests/test-churn
@@ -38,7 +38,9 @@ cd ..
 echo % churn with aliases
 cat > ../aliases <<EOF
 user1 alias1
+
 user3 alias3
+not-an-alias
 EOF
 hg churn --aliases ../aliases
 echo % churn with .hgchurn
diff --git a/tests/test-churn.out b/tests/test-churn.out
--- a/tests/test-churn.out
+++ b/tests/test-churn.out
@@ -16,10 +16,12 @@ user1      2 ***************************
 user2      2 ***************************************************************
 user1      1 ********************************
 % churn with aliases
+skipping malformed alias: not-an-alias
 alias3      3 **************************************************************
 alias1      3 **************************************************************
 user2       2 *****************************************
 % churn with .hgchurn
+skipping malformed alias: not-an-alias
 alias3      3 **************************************************************
 alias1      3 **************************************************************
 user2       2 *****************************************
diff --git a/tests/test-dispatch.out b/tests/test-dispatch.out
--- a/tests/test-dispatch.out
+++ b/tests/test-dispatch.out
@@ -32,6 +32,6 @@ options:
 use "hg -v help cat" to show global options
 % [defaults]
 a
-a: No such file in rev 000000000000
+a: no such file in rev 000000000000
 % no repo
 abort: There is no Mercurial repository here (.hg not found)!
diff --git a/tests/test-globalopts.out b/tests/test-globalopts.out
--- a/tests/test-globalopts.out
+++ b/tests/test-globalopts.out
@@ -56,8 +56,8 @@ summary:     a
 %% earlygetopt short option without following space
 0:b6c483daf290
 %% earlygetopt with illegal abbreviations
-abort: Option --config may not be abbreviated!
-abort: Option --cwd may not be abbreviated!
+abort: option --config may not be abbreviated!
+abort: option --cwd may not be abbreviated!
 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
diff --git a/tests/test-identify.t b/tests/test-identify.t
--- a/tests/test-identify.t
+++ b/tests/test-identify.t
@@ -3,7 +3,7 @@
 no repo
 
   $ hg id
-  abort: There is no Mercurial repository here (.hg not found)
+  abort: there is no Mercurial repository here (.hg not found)
 
 create repo
 
diff --git a/tests/test-import-eol.t b/tests/test-import-eol.t
--- a/tests/test-import-eol.t
+++ b/tests/test-import-eol.t
@@ -36,7 +36,7 @@ invalid eol
 
   $ hg --config patch.eol='LFCR' import eol.diff
   applying eol.diff
-  abort: Unsupported line endings type: LFCR
+  abort: unsupported line endings type: LFCR
   $ hg revert -a
 
 
diff --git a/tests/test-mq.t b/tests/test-mq.t
--- a/tests/test-mq.t
+++ b/tests/test-mq.t
@@ -195,7 +195,7 @@ init --mq without repo
   $ mkdir f
   $ cd f
   $ hg init --mq
-  abort: There is no Mercurial repository here (.hg not found)
+  abort: there is no Mercurial repository here (.hg not found)
   $ cd ..
 
 init --mq with repo path
diff --git a/tests/test-revert.out b/tests/test-revert.out
--- a/tests/test-revert.out
+++ b/tests/test-revert.out
@@ -37,7 +37,7 @@ no changes needed to a
 %% should say file not managed
 file not managed: q
 %% should say file not found
-notfound: No such file in rev 095eacd0c0d7
+notfound: no such file in rev 095eacd0c0d7
 A z
 ? e.orig
 %% should add a, remove d, forget z
diff --git a/tests/test-transplant.t b/tests/test-transplant.t
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -206,7 +206,7 @@ transplant --continue
   Hunk #1 FAILED at 0
   1 out of 1 hunks FAILED -- saving rejects to file foo.rej
   patch failed to apply
-  abort: Fix up the merge and run hg transplant --continue
+  abort: fix up the merge and run hg transplant --continue
 
 transplant -c shouldn't use an old changeset
 
@@ -219,7 +219,7 @@ transplant -c shouldn't use an old chang
   Hunk #1 FAILED at 0
   1 out of 1 hunks FAILED -- saving rejects to file foo.rej
   patch failed to apply
-  abort: Fix up the merge and run hg transplant --continue
+  abort: fix up the merge and run hg transplant --continue
   $ hg transplant --continue
   a1e30dd1b8e7 transplanted as f1563cf27039
   $ hg transplant 1:3
@@ -319,7 +319,7 @@ test filter with failed patch
   file b1 already exists
   1 out of 1 hunks FAILED -- saving rejects to file b1.rej
   patch failed to apply
-  abort: Fix up the merge and run hg transplant --continue
+  abort: fix up the merge and run hg transplant --continue
   $ cd ..