# HG changeset patch # User Alexis S. L. Carvalho # Date 1190671211 10800 # Node ID 4528858e7202d02c55c78e48eed18b76f6b71083 # Parent 7e6138cb8d387a02ff0346f3d2c0be90d2f41ab4 make identify an optionalrepo command Fixes issue726. diff -r 7e6138cb8d38 -r 4528858e7202 mercurial/commands.py --- a/mercurial/commands.py Mon Sep 24 19:00:11 2007 -0300 +++ b/mercurial/commands.py Mon Sep 24 19:00:11 2007 -0300 @@ -1489,6 +1489,10 @@ name for non-default branches. """ + if not repo and not source: + raise util.Abort(_("There is no Mercurial repository here " + "(.hg not found)")) + hexfunc = ui.debugflag and hex or short default = not (num or id or branch or tags) output = [] @@ -3155,7 +3159,7 @@ norepo = ("clone init version help debugancestor debugcomplete debugdata" " debugindex debugindexdot debugdate debuginstall") -optionalrepo = ("paths serve showconfig") +optionalrepo = ("identify paths serve showconfig") def dispatch(args): try: