What for

在这里总结一些工作时使用svn遇到的一些异常,防止时间过长导致issue文档分散或者自己忘掉,方便日后查找。

异常情况

svn 命令行文件出现 !,但svn的所有操作均正常

使用svn --version检查svn客户端及服务器的版本,是否对应一致。不一致可能会导致所有操作均可进行,但.svn在对比文件差异时出现文件遗失的警告。需要手动对svn的客户端或服务器进行降svn版本操作(使用官方提供的python脚本,Mac下可以使用brew管理
官网对于此种情况的类似解释,原因如下:


自动脚本调用 svn无密码配置

如果使用的自动化脚本中存在对svn的部分操作,但svn又依赖每次用户密码的输入的话,就有可能导致自动化脚本的Authentication fail的报错。要处理这种情况,首先需要将~/.subversion/config中的store配置为yes,具体操作如下(省略部分注释):

### This file configures various client-side behaviors.
###
### The commented-out examples below are intended to demonstrate
### how to use this file.

### Section for authentication and authorization customizations.
###[auth]
### Set password stores used by Subversion. They should be
### delimited by spaces or commas. The order of values determines
### the order in which password stores are used.
### Valid password stores:
###   gnome-keyring        (Unix-like systems)
###   kwallet              (Unix-like systems)
###   gpg-agent            (Unix-like systems)
###   keychain             (Mac OS X)
###   windows-cryptoapi    (Windows)
password-stores = 未加密的password
store-passwords = yes
  1. store-passwords = yes 保证svn存储用户输入的密码。password-store 用来保存密码。
  2. 使用svn update更新仓库并保存输入,在询问是否存储非加密密码时输入yes,提示内容大致为:
-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <http://xx.x.x.xxx:xx> RepoName svn

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/Users/dh/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes

参考链接:



svn 版本管理

本博客所有文章除特别声明外,均采用 CC BY-SA 3.0协议 。转载请注明出处!