client = pysvn.Client();
client.callback_get_login = get_login ;
drList = re.findall(r"[A-Z]+:.*$",os.popen("mountvol /").read(),re.MULTILINE) ;
for rootDir in drList:
#for item in [os.path.join(rootdir, file ) for rootdir, sbuFolders, files in os.walk(rootDir, topdown=True) for d in rootdir if d not in config.get('inc_exc','exclude_prefixes') for file in files ]:
for rootdir, subFolders, files in os.walk(rootDir, topdown=True):
subFolders[:] = [d for d in subFolders if d not in config.get('inc_exc','exclude_prefixes')]
print ( rootdir );
print ( client.import_( rootdir , "http://localhost/svn/repo1" , 'checking' , recurse=False, ignore=False, autoprops=False ) );
代码成功导入数据,但由于重复重试导致导入重复文件错误
print ( client.import_( os.path.join ( rootdir , file ) , "http://localhost/svn/repo1" , 'checking' , recurse=False, ignore=False, autoprops=False ) );
失败并显示: pysvn._pysvn_3_6.ClientError:导入文件时需要新条目名称
print ( client.import_( os.path.abspath( os.path.join ( rootdir , file ) ) , "http://localhost/svn/repo1" , 'checking' , recurse=False, ignore=False, autoprops=False ) );
失败并返回pysvn._pysvn_3_6.ClientError:导入文件时需要新条目名称
任何见解都会受到高度赞赏。
发布于 2018-08-18 08:37:40
print ( client.import_( os.path.join(root, file) , "http://localhost/svn/repo1/" + root.replace ( os.path.sep , '/' ).replace(':','')+'/'+file , 'checking' , recurse=True, ignore=False, autoprops=False ) );
以下代码起作用了
https://stackoverflow.com/questions/51890282
复制相似问题