##// END OF EJS Templates
Allowing multiple issue servers to be autolinked in the changeset view;...
Allowing multiple issue servers to be autolinked in the changeset view; linking is now contingent on issue_server_link, issue_pat and issue_prefix being defined; multiple servers can be used by specifying a common suffix on all the above variables, ie .. issue_server_link_1 issue_pat_1 issue_prefix_1 .. and .. issue_server_link_other issue_pat_other issue_prefix_other .. would be treated as two distinct servers, but .. issue_pat_thing .. would be ignored (since the other two requisite vars aren't present). This patch is backwards compatible with existing variables (as a suffix isn't needed).

File last commit:

r1203:6832ef66 beta
r2865:6d9b3ade beta
Show More
importpath.py
15 lines | 494 B | text/x-python | PythonLexer
import os
import sys
def import_path(fullpath):
""" Import a file with full path specification. Allows one to
import from anywhere, something __import__ does not do.
"""
# http://zephyrfalcon.org/weblog/arch_d7_2002_08_31.html
path, filename = os.path.split(fullpath)
filename, ext = os.path.splitext(filename)
sys.path.append(path)
module = __import__(filename)
reload(module) # Might be out of date during tests
del sys.path[-1]
return module