mercurial/dispatch.py
changeset 26142 7332bf4ae959
parent 25932 d491f289045f
child 26186 eb2187ebdf8a
equal deleted inserted replaced
26141:fa6ba7c9600b 26142:7332bf4ae959
   888                     raise util.Abort(_("repository '%s' is not local") % path)
   888                     raise util.Abort(_("repository '%s' is not local") % path)
   889                 repo.ui.setconfig("bundle", "mainreporoot", repo.root, 'repo')
   889                 repo.ui.setconfig("bundle", "mainreporoot", repo.root, 'repo')
   890             except error.RequirementError:
   890             except error.RequirementError:
   891                 raise
   891                 raise
   892             except error.RepoError:
   892             except error.RepoError:
       
   893                 if rpath and rpath[-1]: # invalid -R path
       
   894                     raise
   893                 if cmd not in commands.optionalrepo.split():
   895                 if cmd not in commands.optionalrepo.split():
   894                     if (cmd in commands.inferrepo.split() and
   896                     if (cmd in commands.inferrepo.split() and
   895                         args and not path): # try to infer -R from command args
   897                         args and not path): # try to infer -R from command args
   896                         repos = map(cmdutil.findrepo, args)
   898                         repos = map(cmdutil.findrepo, args)
   897                         guess = repos[0]
   899                         guess = repos[0]