mercurial/dispatch.py
changeset 35149 e6487522ef92
parent 35145 25c543944bc0
child 35163 ee64e677c3cf
equal deleted inserted replaced
35148:d2eff9d4db3f 35149:e6487522ef92
   911                     if rpath and rpath[-1]: # invalid -R path
   911                     if rpath and rpath[-1]: # invalid -R path
   912                         raise
   912                         raise
   913                     if not func.optionalrepo:
   913                     if not func.optionalrepo:
   914                         if func.inferrepo and args and not path:
   914                         if func.inferrepo and args and not path:
   915                             # try to infer -R from command args
   915                             # try to infer -R from command args
   916                             repos = map(cmdutil.findrepo, args)
   916                             repos = pycompat.maplist(cmdutil.findrepo, args)
   917                             guess = repos[0]
   917                             guess = repos[0]
   918                             if guess and repos.count(guess) == len(repos):
   918                             if guess and repos.count(guess) == len(repos):
   919                                 req.args = ['--repository', guess] + fullargs
   919                                 req.args = ['--repository', guess] + fullargs
   920                                 return _dispatch(req)
   920                                 return _dispatch(req)
   921                         if not path:
   921                         if not path: