You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/12/05 01:42:35 UTC

svn commit: r1547977 - /subversion/trunk/tools/dev/which-error.py

Author: breser
Date: Thu Dec  5 00:42:34 2013
New Revision: 1547977

URL: http://svn.apache.org/r1547977
Log:
Better detection of the directory which-error.py is in.

* tools/dev/which-error.py
  (get_errors): Use os.path.realpath(__file__) to allow the command to be
    symlinked to.

Modified:
    subversion/trunk/tools/dev/which-error.py

Modified: subversion/trunk/tools/dev/which-error.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/which-error.py?rev=1547977&r1=1547976&r2=1547977&view=diff
==============================================================================
--- subversion/trunk/tools/dev/which-error.py (original)
+++ subversion/trunk/tools/dev/which-error.py Thu Dec  5 00:42:34 2013
@@ -72,7 +72,8 @@ def get_errors():
   ## errno values.
   errs.update(errno.errorcode)
   ## APR-defined errors, from apr_errno.h.
-  for line in open(os.path.join(os.path.dirname(sys.argv[0]), 'aprerr.txt')):
+  dirname = os.path.dirname(os.path.realpath(__file__))
+  for line in open(os.path.join(dirname, 'aprerr.txt')):
     # aprerr.txt parsing duplicated in gen_base.py:write_errno_table()
     if line.startswith('#'):
        continue