美文网首页cocoapods svn git
svn:This client is too old to w

svn:This client is too old to w

作者: JerryLOL | 来源:发表于2016-08-17 11:41 被阅读184次

    背景:我用Xcode8预览版能更新版本库,但是用Xcode7.3.1就更新不了版本库。所以就使用svn命令端更新项目,结果就遇到了这个问题。

    1.在terminal更新项目的时候,有点时候会发现svn会提示This client is too old to work with the working copy

    <pre><code>XXX-Mac-mini:XXX$ svn update
    svn: E155021: This client is too old to work with the working copy at
    '/Users/kankanliu/Documents/StarZone_Branch' (format 31).

    You need to get a newer Subversion client. For more details, see
    http://subversion.apache.org/faq.html#working-copy-format-change
    </code></pre>

    2.这篇文章会告诉你先使用change-svn-wc-format.py --help这个命令怎么使用这个脚本,那么就来看看怎么使用的
    <pre><code>
    XXX-Mac-mini:XXX$ /parent path/change-svn-wc-format.py --help
    usage: change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force] [--skip-unknown-format]
    change-svn-wc-format.py --help
    Change the format of a Subversion working copy to that of SVN_VERSION.
    --skip-unknown-format : skip directories with unknown working copy
    format and continue the update
    </code></pre>

    那么对上面两个看不懂的参数做下解释:
    a.WC_PATH: 项目路径
    b.SVN_VERSION:svn 版本号

    3.希望是不是又有了,试试接着看
    <pre><code>
    XXX-Mac-mini:XXX$ /parent path/change-svn-wc-format.py workingCopyPath "svn version" --verbose
    </code></pre>

    接下来会告诉你 这个命令只在1.4/1.5/1.6等版本适用。

    4.这个时候看看svn的版本号
    <pre><code>
    XXX-Mac-mini:XXX$ svn --version
    svn, version 1.7.22 (r1694152)
    compiled Feb 10 2016, 16:22:46

    Copyright (C) 2015 The Apache Software Foundation.
    This software consists of contributions made by many people; see the NOTICE
    file for more information.
    Subversion is open source software, see http://subversion.apache.org/
    The following repository access (RA) modules are available:

    • ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
      • handles 'http' scheme
      • handles 'https' scheme
    • ra_svn : Module for accessing a repository using the svn network protocol.
      • handles 'svn' scheme
    • ra_local : Module for accessing a repository on local disk.
      • handles 'file' scheme
    • ra_serf : Module for accessing a repository via WebDAV protocol using serf.
      • handles 'http' scheme
      • handles 'https' scheme
        </code></pre>

    然而我这里查到的svn版本号是1.7.22不适用,是不是绝望了~

    5.到这里我几乎都想放弃了,都开始吐槽svn了,不过,忽然想到,我自己电脑里装了几个Xcode,这个svn工具不是跟Xcode有关的吗,因为Xcode里面有commandLineTool工具,就集承了svn功能,会不会跟不同版本的Xcode有关,我电脑里Xcode是7.3.1版本的,有两个Xcode预览版的。

    6.我用Xcode8预览版能更新版本库,但是用Xcode7.3.1就更新不了版本库。所以我就查看了Xcode的偏好,看看commandLineTool能不能更新,从而解决问题,进去之后果然找到了,设置如下图:


    屏幕快照 2016-08-17 11.28.26.png

    7.只要把这里的commandLineTool选择Xcode8.0的就好,随后授权,返回commandLineTool去更新版本库就正常了,至此,问题就解决了。

    相关文章

      网友评论

        本文标题: svn:This client is too old to w

        本文链接:https://www.haomeiwen.com/subject/fxsmsttx.html