rename util.find_exe to findexe
authorAdrian Buehlmann <adrian@cadifra.com>
Sun, 08 May 2011 20:35:46 +0200
changeset 14271 4030630fb59c
parent 14268 a55a0045704c
child 14272 adf5f4bdeaf6
rename util.find_exe to findexe
hgext/convert/common.py
hgext/convert/gnuarch.py
mercurial/commands.py
mercurial/filemerge.py
mercurial/mail.py
mercurial/posix.py
mercurial/util.py
mercurial/windows.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)
 
--- 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'))
--- 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"))
--- 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):
--- 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)
 
--- 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.
--- 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
 
--- 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.