diff mercurial/dispatch.py @ 13447:931a72e00efa stable

introduce new RequirementError (issue2649) This improves the misleading error message $ hg identify abort: there is no Mercurial repository here (.hg not found)! to the more explicit $ hg identify abort: requirement 'fake' not supported! for all commands in commands.optionalrepo, which includes the identify and serve commands in particular. This is for the case when a new entry in .hg/requires will be defined in a future Mercurial release.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 18 Feb 2011 20:25:25 +0100
parents ed720c7cc97d
children 14d0553bd48b
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Feb 10 09:03:06 2011 +0100
+++ b/mercurial/dispatch.py	Fri Feb 18 20:25:25 2011 +0100
@@ -576,6 +576,8 @@
             if not repo.local():
                 raise util.Abort(_("repository '%s' is not local") % path)
             ui.setconfig("bundle", "mainreporoot", repo.root)
+        except error.RequirementError:
+            raise
         except error.RepoError:
             if cmd not in commands.optionalrepo.split():
                 if args and not path: # try to infer -R from command args