# HG changeset patch # User Adrian Buehlmann # Date 1304879746 -7200 # Node ID 4030630fb59c905a2a76bca614ee9a453c90a45d # Parent a55a0045704cc5d915253b8f7fbed4046d3e6daf rename util.find_exe to findexe diff -r a55a0045704c -r 4030630fb59c hgext/convert/common.py --- a/hgext/convert/common.py Sun May 08 16:16:41 2011 -0500 +++ b/hgext/convert/common.py Sun May 08 20:35:46 2011 +0200 @@ -29,7 +29,7 @@ def checktool(exe, name=None, abort=True): name = name or exe - if not util.find_exe(exe): + if not util.findexe(exe): exc = abort and util.Abort or MissingTool raise exc(_('cannot find required "%s" tool') % name) diff -r a55a0045704c -r 4030630fb59c hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py Sun May 08 16:16:41 2011 -0500 +++ b/hgext/convert/gnuarch.py Sun May 08 20:35:46 2011 +0200 @@ -36,10 +36,10 @@ # Could use checktool, but we want to check for baz or tla. self.execmd = None - if util.find_exe('baz'): + if util.findexe('baz'): self.execmd = 'baz' else: - if util.find_exe('tla'): + if util.findexe('tla'): self.execmd = 'tla' else: raise util.Abort(_('cannot find a GNU Arch tool')) diff -r a55a0045704c -r 4030630fb59c mercurial/commands.py --- a/mercurial/commands.py Sun May 08 16:16:41 2011 -0500 +++ b/mercurial/commands.py Sun May 08 20:35:46 2011 +0200 @@ -1648,7 +1648,7 @@ # editor ui.status(_("Checking commit editor...\n")) editor = ui.geteditor() - cmdpath = util.find_exe(editor) or util.find_exe(editor.split()[0]) + cmdpath = util.findexe(editor) or util.findexe(editor.split()[0]) if not cmdpath: if editor == 'vi': ui.write(_(" No commit editor set and can't find vi in PATH\n")) diff -r a55a0045704c -r 4030630fb59c mercurial/filemerge.py --- a/mercurial/filemerge.py Sun May 08 16:16:41 2011 -0500 +++ b/mercurial/filemerge.py Sun May 08 20:35:46 2011 +0200 @@ -31,10 +31,10 @@ continue p = util.lookupreg(k, _toolstr(ui, tool, "regname")) if p: - p = util.find_exe(p + _toolstr(ui, tool, "regappend")) + p = util.findexe(p + _toolstr(ui, tool, "regappend")) if p: return p - return util.find_exe(_toolstr(ui, tool, "executable", tool)) + return util.findexe(_toolstr(ui, tool, "executable", tool)) def _picktool(repo, ui, path, binary, symlink): def check(tool, pat, symlink, binary): diff -r a55a0045704c -r 4030630fb59c mercurial/mail.py --- a/mercurial/mail.py Sun May 08 16:16:41 2011 -0500 +++ b/mercurial/mail.py Sun May 08 20:35:46 2011 +0200 @@ -112,7 +112,7 @@ raise util.Abort(_('smtp specified as email transport, ' 'but no smtp host configured')) else: - if not util.find_exe(method): + if not util.findexe(method): raise util.Abort(_('%r specified as email transport, ' 'but not in PATH') % method) diff -r a55a0045704c -r 4030630fb59c mercurial/posix.py --- a/mercurial/posix.py Sun May 08 16:16:41 2011 -0500 +++ b/mercurial/posix.py Sun May 08 20:35:46 2011 +0200 @@ -221,7 +221,7 @@ """Return True if the stat object st is from the current user.""" return st.st_uid == os.getuid() -def find_exe(command): +def findexe(command): '''Find executable for command searching like which does. If command is a basename then PATH is searched for command. PATH isn't searched if command is an absolute or relative path. diff -r a55a0045704c -r 4030630fb59c mercurial/util.py --- a/mercurial/util.py Sun May 08 16:16:41 2011 -0500 +++ b/mercurial/util.py Sun May 08 20:35:46 2011 +0200 @@ -319,7 +319,7 @@ elif mainfrozen(): _sethgexecutable(sys.executable) else: - exe = find_exe('hg') or os.path.basename(sys.argv[0]) + exe = findexe('hg') or os.path.basename(sys.argv[0]) _sethgexecutable(exe) return _hgexecutable diff -r a55a0045704c -r 4030630fb59c mercurial/windows.py --- a/mercurial/windows.py Sun May 08 16:16:41 2011 -0500 +++ b/mercurial/windows.py Sun May 08 20:35:46 2011 +0200 @@ -163,7 +163,7 @@ def isowner(st): return True -def find_exe(command): +def findexe(command): '''Find executable for command searching like cmd.exe does. If command is a basename then PATH is searched for command. PATH isn't searched if command is an absolute or relative path.