不把svn认证保存在本机

Caching passwords on disk?That’s terrible!You should never do that!”Subversion

开发者认识到这种担心的合理性,所以 Subversion 使用操作系统和环境提供的机制来减少泄露这些信息的风险。

下面是在大多数平台上的做法:

windows平台:

On Windows,the Subversion client stores passwords in the %APPDATA%/Subversion/auth/ directory.

On Windows 2000 and later,the standard Windows cryptography services are used toencrypt the password on disk.Because the encryption key is managed by Windows and is tied tothe user’s own login credentials,only the user can decrypt the cached password.(Note that if the user’s Windows account password is reset by an administrator,all of the cached passwords becomeundecipherable.The Subversion client will behave as though they don’t exist,prompting forpasswords when required.)

Mac OS平台:

Similarly,on Mac OS X,the Subversion client stores all repository passwords in the login keyring(managed by the Keychain service),which is protected by the user’s account password.Userpreference settings can impose additional policies,such as requiring that the user’s account passwordbe entered each time the Subversion password is used.

类unix平台:

For other Unix-like operating systems,no standard “keychain”services exist.However,the Subversionclient knows how to store password securely using the “GNOME Keyring”and “KDE Wallet”services.Also,before storing unencrypted passwords in the ~/.subversion/auth/caching area,theSubversion client will ask the user for permission to do so.Note that the auth/caching area is stillpermission-protected so that only the user (owner)can read data from it,not the world at large.The operating system’s own file permissions protect the passwords from other non-administrativeusers on the same system,provided they have no direct physical access to the storage media of thehome directory,or backups thereof.Of course,for the truly paranoid,none of these mechanisms meets the test of perfection.So forthose folks willing to sacrifice convenience for the ultimate in security,Subversion provides variousways of disabling its credentials caching system altogether.

你可以关闭凭证缓存,只需要一个简单的命令,使用参数–no-auth-cache:

$svn commit -F log_msg.txt –no-auth-cacheAuthentication realm:<svn://host.example.com:3690>example realmUsername:joePassword for ‘joe’:Adding newfileTransmitting file data .

通过配置文件禁用:
Or,if you want to disable credential caching permanently,you can edit the config file in yourruntime configuration area and set the store-auth-creds option to no.This will prevent thestoring of credentials used in any Subversion interactions you perform on the affected computer.Thiscan be extended to cover all users on the computer,too,by modifying the system-wide runtimeconfiguration area (described in 第 1.1 节 “配置区布局”).

[auth]store-auth-creds =no

svnbook-1.6-zh-r3600.pdf书摘

下载地址:http://code.google.com/p/i18n-zh/downloads/detail?name=svnbook-1.6-zh-r3600.pdf

用kindle touch摘书真是方便啊,就是有点小。

 

但是 Subversion 可以用来管理任何类型的数据 —图像,音乐,数据库,文档等等。对于 Subversion,数据就是数据而已。

并行版本系统(CVS) Concurrent Versions System

一个自上至下的学习者会喜欢略读文档,得到对系统工作原理的总体看法;然后她才会开始实际使用软件。而一个自下至上的学习者,是通过实践学习的人,她希望快速的开始使用软件,自己领会软件的使用,只在必要时读取相关章节。大多数图书会倾向于针对某一类读者,而本书毫无疑问倾向于自上至下的方法(如果你阅读了本节,那你也一定是一个自上至下的学习者!)。然而,如果你是自下至上的人,不要失望。本书以 Subversion 为主题的广泛观察进行组织,每个章节都包含了大量可以尝试的详细实例。如果你希望马上开工,没有耐心等待,你可以看附录 A,Subversion

许多人将版本控制系统当作一种神奇的“时间机器”。

他们不想在版本控制方法学中开垦处女地,他们只是希望修正CVS。他们决定Subversion应符合CVS的特性,并保留相同的开发模型,但不再重复CVS的一些显著缺陷。尽管 Subversion 并不需要成为 CVS 的完全替代品。

经过14个月的编码,2001年8月31日,Subversion 能够“自己管理自己”了,开发者停止使用CVS 保存 Subversion 的代码,而使用 Subversion 本身。

一切都要归结到一条重要的因素:用户交流。当用户交流贫乏,语法和语义的冲突就会增加,没有系统可以强制用户完美的交流,没有系统可以检测语义上的冲突,所以没有任何证据能够承诺锁定系统可以防止冲突,实践中,锁定除了约束了生产力,并没有做什么事。

svnsync

svn log 不会显示刚刚提交的内容

 

If you make a commit and immediately type svn log with no arguments, you may notice that your most recent commit doesn’t show up in the list of log messages. This is due to a combination of the behavior of svn commit and the default behavior of svn log. First, when you commit changes to the repository, svn bumps only the revision of files (and directories) that it commits, so usually the parent directory remains at the older revision (See 第 3.5.1 节 “更新和提交是分开的” for an explanation of why). svn log then defaults to fetching the history of the directory at its current revision, and thus you don’t see the newly committed changes. The solution here is to either update your working copy or explicitly provide a revision number to svn log by using the –revision (-r) option.

如果刚刚提交就用svn log命令,则不会显示刚刚提交的内容。因为svn commit操作与svn log操作之间的联系,当提交的时候,只会改变当前文件或目录的版本号,svn log会抓取当前版本,而不会管新提交的。可以先svn update 再查看或用类似svn log -r 8 -v来查看。

svn基本命令 svn help

查看了svn help对基本命令进行详述

root@debian:~# svn help

用法: svn <subcommand> [options] [args]Subversion 命令行客户端,版本 1.6.17。

使用“svn help <subcommand>” 显示子命令的帮助信息。

使用“svn –version”查看程序的版本号和版本库访问模块,或者使用“svn –version –quiet”只查看程序的版本号。

大多数的子命令可接受文件或目录参数,对目录进行递归处理。

如果没有指定参数,默认对当前目录(包含当前目录)递归处理。

可用的子命令(记得先切到工作副本):

svn add

svn blame (praise, annotate, ann)

cat  查看某文件过去一个版本的内容,如

svn cat --r 2 meizi.txt

svn changelist (cl)

svn checkout (co) 检出命令

svn co file:///opt/svnroot/dev-a/

检出具体版本

svn co -r 250 file:///opt/svnroot/dev-a/

svn cleanup

svn commit (ci)

svn copy (cp)

svn delete (del, remove, rm)   删除某个文件

svn del filename

svn diff (di)

svn export

svn help (?, h)

svn import

svn info查看当前副本的版本信息

# svn info
路径: .
URL: https://abc.com/svn/dev/trunk
版本库根: https://abc.com:808/svn/dev
版本库 UUID: db3333b9-a35c-4fsc-a3bb-9c2ee82ebb56
版本: 235
节点种类: 目录
调度: 正常
最后修改的作者: jpuyy
最后修改的版本: 235
最后修改的时间: 2012-09-29 13:19:18 +0800 (一, 2012-09-29)

svn list (ls) 可以在不下载文件的时候查看目录,查看远程目录的时候也很好用,如:

svn list svn://jpuyy.com:3690/projectA

svn lock

svn log
用法:svn log filename 某个文件的版本信息,如果不加

svn merge

svn mergeinfo

svn mkdir

svn mkdir file:///var/svnroot/nginxsub/testdir -m "试试创建目录"

move (mv, rename, ren)

svn propdel (pdel, pd)

svn propedit (pedit, pe)

svn propget (pget, pg)

svn proplist (plist, pl)

svn propset (pset, ps)

svn resolve

svn resolved

svn revert

status (stat, st)
用法:svn status
如果文件状态为? 则用命令:svn add filename //filename为具体的文件名
如果文件状态为M 表示这个文件被修改了

svn switch (sw)

svn unlock

svn update (up)