Show More
@@ -685,16 +685,17 b' def runcommand(lui, repo, cmd, fullargs,' | |||||
685 | result=ret, pats=cmdpats, opts=cmdoptions) |
|
685 | result=ret, pats=cmdpats, opts=cmdoptions) | |
686 | return ret |
|
686 | return ret | |
687 |
|
687 | |||
688 | def _getlocal(ui, rpath): |
|
688 | def _getlocal(ui, rpath, wd=None): | |
689 | """Return (path, local ui object) for the given target path. |
|
689 | """Return (path, local ui object) for the given target path. | |
690 |
|
690 | |||
691 | Takes paths in [cwd]/.hg/hgrc into account." |
|
691 | Takes paths in [cwd]/.hg/hgrc into account." | |
692 | """ |
|
692 | """ | |
693 | try: |
|
693 | if wd is None: | |
694 | wd = os.getcwd() |
|
694 | try: | |
695 | except OSError as e: |
|
695 | wd = os.getcwd() | |
696 | raise error.Abort(_("error getting current working directory: %s") % |
|
696 | except OSError as e: | |
697 | e.strerror) |
|
697 | raise error.Abort(_("error getting current working directory: %s") % | |
|
698 | e.strerror) | |||
698 | path = cmdutil.findrepo(wd) or "" |
|
699 | path = cmdutil.findrepo(wd) or "" | |
699 | if not path: |
|
700 | if not path: | |
700 | lui = ui |
|
701 | lui = ui |
General Comments 0
You need to be logged in to leave comments.
Login now