码迷,mamicode.com
首页 > 其他好文 > 详细

【SVN】自动添加多个文件

时间:2015-08-20 06:53:44      阅读:911      评论:0      收藏:0      [点我收藏+]

标签:svn add

// svn status

HuangChao-MacBookPro:stockemotion hchao$ svn status

M       code/app/Http/Controllers/AccountController.php

M       code/app/Http/Controllers/DownloadController.php

M       code/app/Http/Controllers/PickController.php

M       code/app/Http/Controllers/ShopController.php

M       code/app/Http/Controllers/StockController.php

M       code/app/Http/Controllers/UserController.php

M       code/app/Http/Middleware/AffordMiddleware.php

M       code/app/Http/routes.php

M       code/resources/download/StockTest.apk

?       code/resources/views/shop/buy.blade.php

M       code/resources/views/shop/index.blade.php

M       code/resources/views/stock/module.blade.php

M       code/resources/views/user/resetPassword.blade.php

?       code/storage/logs/alipay/2015-08-16.log

?       code/storage/logs/alipay/2015-08-17.log

?       code/storage/logs/alipay/2015-08-18.log

?       code/storage/logs/alipay/2015-08-19.log

M       code/storage/logs/laravel.log

?       code/storage/logs/weixin/2015-08-11.log

?       code/storage/logs/weixin/2015-08-12.log

?       code/storage/logs/weixin/2015-08-13.log

?       code/storage/logs/weixin/2015-08-14.log

?       code/storage/logs/weixin/2015-08-15.log

?       code/storage/logs/weixin/2015-08-16.log

?       code/storage/logs/weixin/2015-08-17.log

?       code/storage/logs/weixin/2015-08-18.log

?       code/storage/logs/weixin/2015-08-19.log

HuangChao-MacBookPro:stockemotion hchao$


// svn commit

HuangChao-MacBookPro:stockemotion hchao$ svn commit -m "version@20150818" .

Sending        code/app/Http/Controllers/AccountController.php

Sending        code/app/Http/Controllers/DownloadController.php

Sending        code/app/Http/Controllers/PickController.php

Sending        code/app/Http/Controllers/ShopController.php

Sending        code/app/Http/Controllers/StockController.php

Sending        code/app/Http/Controllers/UserController.php

Sending        code/app/Http/Middleware/AffordMiddleware.php

Sending        code/app/Http/routes.php

Sending        code/resources/download/StockTest.apk

Sending        code/resources/views/shop/index.blade.php

Sending        code/resources/views/stock/module.blade.php

Sending        code/resources/views/user/resetPassword.blade.php

Sending        code/storage/logs/laravel.log

Transmitting file data .............

Committed revision 20.

HuangChao-MacBookPro:stockemotion hchao$


// svn status

HuangChao-MacBookPro:stockemotion hchao$ svn status

?       code/resources/views/shop/buy.blade.php

?       code/storage/logs/alipay/2015-08-16.log

?       code/storage/logs/alipay/2015-08-17.log

?       code/storage/logs/alipay/2015-08-18.log

?       code/storage/logs/alipay/2015-08-19.log

?       code/storage/logs/weixin/2015-08-11.log

?       code/storage/logs/weixin/2015-08-12.log

?       code/storage/logs/weixin/2015-08-13.log

?       code/storage/logs/weixin/2015-08-14.log

?       code/storage/logs/weixin/2015-08-15.log

?       code/storage/logs/weixin/2015-08-16.log

?       code/storage/logs/weixin/2015-08-17.log

?       code/storage/logs/weixin/2015-08-18.log

?       code/storage/logs/weixin/2015-08-19.log

HuangChao-MacBookPro:stockemotion hchao$


// 没有加入的文件,怎么办? 一个一个添加????


// awk print

HuangChao-MacBookPro:stockemotion hchao$ svn status | awk ‘{if ($1 == "?") {print $2}}‘

code/resources/views/shop/buy.blade.php

code/storage/logs/alipay/2015-08-16.log

code/storage/logs/alipay/2015-08-17.log

code/storage/logs/alipay/2015-08-18.log

code/storage/logs/alipay/2015-08-19.log

code/storage/logs/weixin/2015-08-11.log

code/storage/logs/weixin/2015-08-12.log

code/storage/logs/weixin/2015-08-13.log

code/storage/logs/weixin/2015-08-14.log

code/storage/logs/weixin/2015-08-15.log

code/storage/logs/weixin/2015-08-16.log

code/storage/logs/weixin/2015-08-17.log

code/storage/logs/weixin/2015-08-18.log

code/storage/logs/weixin/2015-08-19.log

HuangChao-MacBookPro:stockemotion hchao$


// xargs

HuangChao-MacBookPro:stockemotion hchao$ svn status | awk ‘{if ($1 == "?") {print $2}}‘ | xargs svn add

A         code/resources/views/shop/buy.blade.php

A         code/storage/logs/alipay/2015-08-16.log

A         code/storage/logs/alipay/2015-08-17.log

A         code/storage/logs/alipay/2015-08-18.log

A         code/storage/logs/alipay/2015-08-19.log

A         code/storage/logs/weixin/2015-08-11.log

A         code/storage/logs/weixin/2015-08-12.log

A         code/storage/logs/weixin/2015-08-13.log

A         code/storage/logs/weixin/2015-08-14.log

A         code/storage/logs/weixin/2015-08-15.log

A         code/storage/logs/weixin/2015-08-16.log

A         code/storage/logs/weixin/2015-08-17.log

A         code/storage/logs/weixin/2015-08-18.log

A         code/storage/logs/weixin/2015-08-19.log

HuangChao-MacBookPro:stockemotion hchao$


// svn commit

HuangChao-MacBookPro:stockemotion hchao$ svn commit -m "version@20150818" .

Adding         code/resources/views/shop/buy.blade.php

Adding         code/storage/logs/alipay/2015-08-16.log

Adding         code/storage/logs/alipay/2015-08-17.log

Adding         code/storage/logs/alipay/2015-08-18.log

Adding         code/storage/logs/alipay/2015-08-19.log

Adding         code/storage/logs/weixin/2015-08-11.log

Adding         code/storage/logs/weixin/2015-08-12.log

Adding         code/storage/logs/weixin/2015-08-13.log

Adding         code/storage/logs/weixin/2015-08-14.log

Adding         code/storage/logs/weixin/2015-08-15.log

Adding         code/storage/logs/weixin/2015-08-16.log

Adding         code/storage/logs/weixin/2015-08-17.log

Adding         code/storage/logs/weixin/2015-08-18.log

Adding         code/storage/logs/weixin/2015-08-19.log

Transmitting file data ..............

Committed revision 21.

HuangChao-MacBookPro:stockemotion hchao$


// 大招

$ svn status | awk ‘{if ($1 == "?") {print $2}}‘ | xargs svn add

本文出自 “黄超的IT笔记” 博客,请务必保留此出处http://huangchao.blog.51cto.com/10446378/1686200

【SVN】自动添加多个文件

标签:svn add

原文地址:http://huangchao.blog.51cto.com/10446378/1686200

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!