Fix sys.path for scripts in contrib.
Patch by: Jon Foster <jon.foster@cabot.co.uk>
The problem is that the programs in contrib automatically find the
cvs2svn libraries by taking the script path, then chopping off the
last directory component. If the full isn't specified, there isn't a
"last directory component" to chop off. The fix is just to insert a
call to abspath() in the appropriate place.
After fixing that, there's a similar-but-different bug when using
pychecker:
> ~/cvs2svn-trunk/contrib$ pychecker destroy_repository.py
> Processing destroy_repository...
> ImportError: No module named cvs2svn_lib.key_generator
In this case, the problem is that sys.argv[0] points to pychecker,
not destroy_repository.py. This can be fixed by using __file__
instead, which is a special Python variable that gives the path
to the current source file.
git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5083 be7e6eca-30d4-0310-a8e5-ac0d63af7087