comparison mercurial/cmdutil.py @ 4671:150afe6becf6

identify: take a path to a remote repo Rather than using -R, we take a path as an argument. This lets us use url#branch syntaxes that may be in hgrc.
author Matt Mackall <mpm@selenic.com>
date Thu, 21 Jun 2007 13:09:01 -0500
parents 850950e59b52
children 849f011dbf79
comparison
equal deleted inserted replaced
4670:850950e59b52 4671:150afe6becf6
319 repo = None 319 repo = None
320 if cmd not in commands.norepo.split(): 320 if cmd not in commands.norepo.split():
321 try: 321 try:
322 repo = hg.repository(ui, path=path) 322 repo = hg.repository(ui, path=path)
323 ui = repo.ui 323 ui = repo.ui
324 if not repo.local() and cmd not in commands.remoterepo.split(): 324 if not repo.local():
325 raise util.Abort(_("repository '%s' is not local") % path) 325 raise util.Abort(_("repository '%s' is not local") % path)
326 except hg.RepoError: 326 except hg.RepoError:
327 if cmd not in commands.optionalrepo.split(): 327 if cmd not in commands.optionalrepo.split():
328 if not path: 328 if not path:
329 raise hg.RepoError(_("There is no Mercurial repository here" 329 raise hg.RepoError(_("There is no Mercurial repository here"