SVN使用相关

///

关于在linux中使用svn add添加并上传文件到svn的时候,*.so *.bin 等文件被忽略的问题:

两个解决办法:

方法1: 每次添加文件的时候使用如下命令:

svn add  --no-ignore  文件夹

方法2:.编辑以下任一文件(linux的svn客户端的配置文件)
/etc/subversion/config   (针对服务器所有用户有效)
~/.subversion/config  (对当前用户有效,会覆盖上面“/etc/subversion/config”这个配置,而不是在上面原有的配置基础上增加)
将文件中包含“global-ignores = ”的行,取消注释,并把这个“=”之后的字符全部删除。要特别注意 global-ignores 前面不要留空格,紧挨着最前面就可以了,否则svn add的时候会出现以下错误:
svn: /etc/subversion/config:103: Option expected    。
保存config这个文件(保存文件之后,SVN就立即载入这个配置,然后立即就可以使用了),即可一劳永逸。永远都不会有漏传的文件了。

SVN的配置把.so文件给忽略了,我们只要把忽略取消就可以。

1,进入你本地的svn目录:

/Users/yourname/.subversion 

然后会看到:

README.txt  auth        config      servers

2,打开config文件:

找到下面这段话

# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo
#   *.rej *~ #*# .#* .*.swp .DS_Store

3,更改config文件:

更改成这段话

### global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo
###   *.rej *~ #*# .#* .*.swp .DS_Store
global-ignores = .*.swp .DS_Store

保存!

重新开启下SVN,你就会看到你的.SO文件已经加入版本库了。

/

# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__
#   *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db .vs Library obj Temp *.csproj *.sln *.userprefs

SVN报错:sqlite[S5]:database is locked
昨天下午修改几个冲突的jar包后提交svn后报错,接下来svn操作就失灵了,无论是clean up还是revert还是release lock都无济于事。解决办法:  首先下载sqlite3,我的是64位win7,无需去官网下载安装,直接下载sqlite3.exe即可,下载链接为http://download.csdn.net/detail/whyzzj/6346529。sqlite3.exe需要放到wc.db的同一目录才能用,这一点要注意。比如我的工程app_engine放在E盘的workspace里,而wc.db文件在appengine/.svn里(这里svn是隐藏目录,需要先取消隐藏才能看到),那么把sqlite3.exe放到.svn里。  先看下sqlite数据库里有没有待处理的任务:
E:\workspace\app_engine\.svn>sqlite3 wc.dbSQLite version3.7.15.2 2013-01-09 11:53:05Enter".help"forinstructionsEnter SQL statements terminated with a";"sqlite> select *from work_queue;sqlite>
上面这里看是没有,有的话删掉并退出:
sqlite>delete from work_queue;sqlite>.quitE:\workspace\app_engine\.svn>  这时再重新操作svn看看,如果还不行,那么需要重新生成wc.db
E:\workspace\app_engine\.svn>move wc.db wc.db.oldE:\workspace\app_engine\.svn>sqlite3 wc.db.oldSQLite version3.7.15.2 2013-01-09 11:53:05Enter".help"forinstructionsEnter SQL statements terminated with a";"sqlite>.backup main wc.dbsqlite>.exitE:\workspace\app_engine\.svn>
这里先把原来的wc.db重命名为wc.db.old,然后进入wc.db.old数据库执行备份,备份文件名为wc.db,然后退出数据库。这会儿再执行svn的update看看,应该不会再锁数据库了。如果还不行,那么我只能很遗憾的告诉你,我也没辙了。  发生这种问题的原因往往是Eclipse的SVN和本地TortoiseSVN冲突了,比如你开着Eclipse时又用TortoiseSVN更新并有文件冲突,这是冒出这个报错信息后先把Eclipse关了,用TortoiseSVN先clean再update一下,不行再用上面的方法。记得先关Eclipse。

/

SVN检出时报错:sqlite[S5]: database is locked
错误信息:另一个进程正在阻塞当前工作版本的数据库。
直接把的你的代码编辑器关掉即可。

sqlite[s5]:database is locked additional errors sqlite[s5]:database is locked Another process is blocking the working copy database,or the underlying filesystem does not support file locking;if the working copy is on a network filesystem,make sure file locking has been enabled on the file server

SVN : sqlite[S5]: database is locked error
Once in a while I get this error, happened due to network issue while a svn command is being executed but wasn't able to finish.

svn: E200033: Another process is blocking the working copy database, or the underlying filesystem does not support file locking; if the working copy is on a network filesystem, make sure file locking has been enabled on the file server 
svn: E200033: sqlite[S5]: database is locked 
svn: E200042: Additional errors: 
svn: E200033: sqlite[S5]: database is locked

Fix :

$ cd /my/repository/.svn 
$ mv wc.db wc.db.old 
$ sqlite3 wc.db.old 
sqlite> .backup main wc.db
sqlite> .exit

Afterwards, do a svn cleanup. Then, you're good to go.

If you are using Tortoise-SVN, sometimes it can go brain dead and the caching functionality gets stuck. Go into Task Manager and kill all instances of TortoiseSVN-Cache and try again.
Close all the files opened in the editors and run the clean up. It fixed the issue for me. I closed my Netbeans and executed the clean up command.
The internal working copy SQLite database is blocked (its in your working copy's hidden metadata pristine store: .svn/wc.db file). I'd start with checking your user account permissions. There is a great chance that you lack write access to the checkout target location.

It could be another SVN client instance that's by some reason is still running tasks with the WC. An antivirus or indexing service could also be the root cause -- it is a general recommendation to add antivirus and indexing exceptions to ensure that these tools do not touch the working copies.

SVN添加忽略后,解除被忽略的文件 右键 文件夹,选择菜单: TortoiseSVN -> Remove from ignore list (从忽略列表中删除)
Right click on [上一层 folder ] and go To properties. You will see list of all ignored files and externals.
Unversioned are the files which are either in source control nor in ignore list
each folder have your own configuration, to see all files ingnored type on shell/cmd svn pg -R svn:ignore . 
svn propdel svn:ignore . # For directory 
svn prodel svn:ignore -R # For recursive
svn propedit svn:ignore .
This will open up the default command line text editor. I use pico. Delete the ignore entries. Save it and commit.

//

svn add 命令 递归目录下所有文件
svn add . --no-ignore --force

vn中,将一个项目从trunk switch 到branch,如果有文件有冲突,这个文件很有可能在switch后不成功。
解决这个问题,可以在switch前将冲突mark resoved。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值