mercurial/commands.py
changeset 5330 4528858e7202
parent 5329 7e6138cb8d38
child 5336 24de027551c1
equal deleted inserted replaced
5329:7e6138cb8d38 5330:4528858e7202
  1486     This summary identifies the repository state using one or two parent
  1486     This summary identifies the repository state using one or two parent
  1487     hash identifiers, followed by a "+" if there are uncommitted changes
  1487     hash identifiers, followed by a "+" if there are uncommitted changes
  1488     in the working directory, a list of tags for this revision and a branch
  1488     in the working directory, a list of tags for this revision and a branch
  1489     name for non-default branches.
  1489     name for non-default branches.
  1490     """
  1490     """
       
  1491 
       
  1492     if not repo and not source:
       
  1493         raise util.Abort(_("There is no Mercurial repository here "
       
  1494                            "(.hg not found)"))
  1491 
  1495 
  1492     hexfunc = ui.debugflag and hex or short
  1496     hexfunc = ui.debugflag and hex or short
  1493     default = not (num or id or branch or tags)
  1497     default = not (num or id or branch or tags)
  1494     output = []
  1498     output = []
  1495 
  1499 
  3153     "version": (version_, [], _('hg version')),
  3157     "version": (version_, [], _('hg version')),
  3154 }
  3158 }
  3155 
  3159 
  3156 norepo = ("clone init version help debugancestor debugcomplete debugdata"
  3160 norepo = ("clone init version help debugancestor debugcomplete debugdata"
  3157           " debugindex debugindexdot debugdate debuginstall")
  3161           " debugindex debugindexdot debugdate debuginstall")
  3158 optionalrepo = ("paths serve showconfig")
  3162 optionalrepo = ("identify paths serve showconfig")
  3159 
  3163 
  3160 def dispatch(args):
  3164 def dispatch(args):
  3161     try:
  3165     try:
  3162         u = ui.ui(traceback='--traceback' in args)
  3166         u = ui.ui(traceback='--traceback' in args)
  3163     except util.Abort, inst:
  3167     except util.Abort, inst: