Remove sys.path manipulation (closes #113034)

This seems like legacy helper for development purpose. This create some issue in for actual deployment and are just a plain bad idea on a general basis.

authorPierre-Yves David <pierre-yves.david@logilab.fr>
changeset32d191e8504d
branchstable
phasepublic
hiddenno
parent revision#4ec02297286e [debian] cleanup old distrib and dependancy (closes #109809)
child revision#bd0d3832677b [readme] fix repository url, #300e00d5d93f merge with stable, #ea70cf18a307 [readme] fix repository url
files modified by this revision
hgext/hgview.py
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1354618141 -3600
# Tue Dec 04 11:49:01 2012 +0100
# Branch stable
# Node ID 32d191e8504d3984dc2cd5e2defbceb00df3c711
# Parent 4ec02297286e8af4af1c7ae638921e99d51d8424
Remove sys.path manipulation (closes #113034)

This seems like legacy helper for development purpose. This create some issue in
for actual deployment and are just a plain bad idea on a general basis.

diff --git a/hgext/hgview.py b/hgext/hgview.py
@@ -51,12 +51,10 @@
1          from hgconf.uname import hook
2          hook(ui, repo)
3      except ImportError:
4          pass
5 
6 -    import sys
7 -    sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
8      try:
9          from hgviewlib.application import start
10          def fnerror(text):
11              """process errors"""
12              raise(error.Abort(text))
@@ -85,12 +83,10 @@
13              sys.stdout.write(' '.join(cmd))
14              sys.stdout.write('\n')
15              sys.stdout.flush()
16          os.system(' '.join(cmd))
17 
18 -import sys
19 -sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
20  import hgviewlib.hgviewhelp as hghelp
21 
22  start_hgview.__doc__ = hghelp.long_help_msg
23 
24  cmdtable = {