Mercurial > public > mercurial-scm > evolve
diff hgext/evolve.py @ 998:85ec2a55fe7c
fold: improve error messages for multiple heads and roots
This commit adds hints and i18n to the error messages about non-linear
revisions, along with corresponding tests.
author | Jordi Guti?rrez Hermoso <jordigh@octave.org> |
---|---|
date | Mon, 30 Jun 2014 13:38:49 -0400 |
parents | f48cd2f48d14 |
children | 195642c1520b |
line wrap: on
line diff
--- a/hgext/evolve.py Mon Jun 30 13:37:15 2014 -0400 +++ b/hgext/evolve.py Mon Jun 30 13:38:49 2014 -0400 @@ -2135,13 +2135,15 @@ roots = repo.revs('roots(%ld)', revs) if len(roots) > 1: - raise util.Abort("set has multiple roots") + raise util.Abort(_("cannot fold non-linear revisions " + "(multiple roots given)")) root = repo[roots[0]] if root.phase() <= phases.public: raise util.Abort(_("cannot fold public revisions")) heads = repo.revs('heads(%ld)', revs) if len(heads) > 1: - raise util.Abort("set has multiple heads") + raise util.Abort(_("cannot fold non-linear revisions " + "(multiple heads given)")) head = repo[heads[0]] wlock = lock = None try: