正在 OSX 命令行项目中更新 SVN
Updating SVN in OSX command line project
我需要 运行 并使用 Objective C 提交 SVN
运行 SVN 命令的代码就像这样使用 命令行应用程序
NSString *command = @"svn add folder; svn commit -m \"Test Add\""
NSArray *arguments = [NSArray arrayWithObjects:@"-c",command, nil];
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/bin/sh"];
[task setArguments:arguments];
NSPipe *pipe = [NSPipe pipe];
[task setStandardOutput:pipe];
NSFileHandle *file = [pipe fileHandleForReading];
[task launch];
NSData *data = [file readDataToEndOfFile];
NSString *output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"Output %@",output);
但我收到此错误
svn: E155021: This client is too old to work with the working copy at ...
You need to get a newer Subversion client. For more details, see
http://subversion.apache.org/faq.html#working-copy-format-change
我尝试更新命令行工具但没有成功
在初始阶段,我尝试使用终端提交 SVN,但它也显示了相同的错误,因此基于此 link 我也使用终端更新了 SVN,但它仍然在 运行 上显示错误宁代码
我还使用新的 SVN 更新了 /bin/sh 但确实有效(也尝试使用 /bin/bash)
关于避免此错误并将其提交到存储库的任何建议??
终于找到解决方案
我使用了which svn命令来查找svn的安装位置
现在,当 运行 从 Xcode 中的 运行 按钮发出命令时,它给出的位置是 /Applications/Xcode.app/Contents/Developer/usr/bin/svn
但终端正在使用该位置
/usr/local/bin/svn
所以在 Xcode 下转到 Products 文件夹并复制 Application Name.app 文件并将其粘贴到桌面并双击 运行 它现在它可以正常工作了
但是如果你需要解决这个问题,我就是这样做的
风险自负
转到/Applications/Xcode.app/Contents/Developer/usr/bin/复制所有以svn title开头的文件作为备份。(请记住你复制的文件)
转到 /usr/local/bin/svn 并将 svn 文件从此处复制并替换到 /Applications/Xcode.app/Contents/Developer/usr/bin/
现在运行它你不会得到任何版本错误
干杯! :)
我需要 运行 并使用 Objective C 提交 SVN 运行 SVN 命令的代码就像这样使用 命令行应用程序
NSString *command = @"svn add folder; svn commit -m \"Test Add\""
NSArray *arguments = [NSArray arrayWithObjects:@"-c",command, nil];
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/bin/sh"];
[task setArguments:arguments];
NSPipe *pipe = [NSPipe pipe];
[task setStandardOutput:pipe];
NSFileHandle *file = [pipe fileHandleForReading];
[task launch];
NSData *data = [file readDataToEndOfFile];
NSString *output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"Output %@",output);
但我收到此错误
svn: E155021: This client is too old to work with the working copy at ...
You need to get a newer Subversion client. For more details, see
http://subversion.apache.org/faq.html#working-copy-format-change
我尝试更新命令行工具但没有成功
在初始阶段,我尝试使用终端提交 SVN,但它也显示了相同的错误,因此基于此 link 我也使用终端更新了 SVN,但它仍然在 运行 上显示错误宁代码
我还使用新的 SVN 更新了 /bin/sh 但确实有效(也尝试使用 /bin/bash)
关于避免此错误并将其提交到存储库的任何建议??
终于找到解决方案
我使用了which svn命令来查找svn的安装位置 现在,当 运行 从 Xcode 中的 运行 按钮发出命令时,它给出的位置是 /Applications/Xcode.app/Contents/Developer/usr/bin/svn
但终端正在使用该位置 /usr/local/bin/svn
所以在 Xcode 下转到 Products 文件夹并复制 Application Name.app 文件并将其粘贴到桌面并双击 运行 它现在它可以正常工作了
但是如果你需要解决这个问题,我就是这样做的
风险自负
转到/Applications/Xcode.app/Contents/Developer/usr/bin/复制所有以svn title开头的文件作为备份。(请记住你复制的文件)
转到 /usr/local/bin/svn 并将 svn 文件从此处复制并替换到 /Applications/Xcode.app/Contents/Developer/usr/bin/
现在运行它你不会得到任何版本错误
干杯! :)