RE: [PATCH] Scripts in contrib/ and relative paths
Jon Foster <[email protected]> Fri, 26 Mar 2010 11:55:32 -0000
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Michael Haggerty wrote: > I see that in your patch you added the abspath() but didn't > switch to using __file__ instead of sys.argv[0]. Is there a > reason for that? You mean in the renumber_branch.py patch? I'd only found one of the two problems when I sent that one. It should be updated to match, so here's an updated patch. Kind regards, Jon ********************************************************************** This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd. If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Cabot Communications Limited Verona House, Filwood Road, Bristol BS16 3RY, UK +44 (0) 1179584232 Co. Registered in England number 02817269 Please contact the sender if you believe you have received this email in error. ********************************************************************** ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2465401 To unsubscribe from this discussion, e-mail: [[email protected]].
cvs2svn_contrib_path_fix_patch_2.txt
(text/plain, 2.8 KB)
Index: contrib/shrink_test_case.py =================================================================== --- contrib/shrink_test_case.py (revision 5081) +++ contrib/shrink_test_case.py (working copy) @@ -38,7 +38,7 @@ import optparse from cStringIO import StringIO -sys.path.insert(0, os.path.dirname(os.path.dirname(sys.argv[0]))) +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from cvs2svn_lib.key_generator import KeyGenerator Index: contrib/destroy_repository.py =================================================================== --- contrib/destroy_repository.py (revision 5081) +++ contrib/destroy_repository.py (working copy) @@ -108,7 +108,7 @@ import shutil import re -sys.path.insert(0, os.path.dirname(os.path.dirname(sys.argv[0]))) +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from cvs2svn_lib.key_generator import KeyGenerator import cvs2svn_rcsparse Index: contrib/rcs_file_filter.py =================================================================== --- contrib/rcs_file_filter.py (revision 5081) +++ contrib/rcs_file_filter.py (working copy) @@ -22,7 +22,7 @@ import os import time -sys.path.insert(0, os.path.dirname(os.path.dirname(sys.argv[0]))) +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import cvs2svn_rcsparse Index: contrib/find_illegal_filenames.py =================================================================== --- contrib/find_illegal_filenames.py (revision 5081) +++ contrib/find_illegal_filenames.py (working copy) @@ -27,7 +27,7 @@ import sys import os -sys.path.insert(0, os.path.dirname(os.path.dirname(sys.argv[0]))) +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from cvs2svn_lib.common import FatalError from cvs2svn_lib.collect_data import verify_filename_legal Index: contrib/renumber_branch.py =================================================================== --- contrib/renumber_branch.py (revision 5081) +++ contrib/renumber_branch.py (working copy) @@ -44,7 +44,7 @@ import sys import os -sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))) +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import cvs2svn_rcsparse from rcs_file_filter import WriteRCSFileSink, FilterSink Index: contrib/show_db.py =================================================================== --- contrib/show_db.py (revision 5081) +++ contrib/show_db.py (working copy) @@ -8,7 +8,7 @@ import cPickle as pickle from cStringIO import StringIO -sys.path.insert(0, os.path.dirname(os.path.dirname(sys.argv[0]))) +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from cvs2svn_lib import config from cvs2svn_lib.context import Ctx