{"id":522,"date":"2012-11-07T22:54:43","date_gmt":"2012-11-07T13:54:43","guid":{"rendered":"http:\/\/www.techscore.com\/blog\/?p=522"},"modified":"2018-11-14T16:33:59","modified_gmt":"2018-11-14T07:33:59","slug":"%e3%81%82%e3%81%88%e3%81%a6%e8%a8%80%e3%81%86%e3%81%bb%e3%81%a9%e3%81%a7%e3%81%af%e3%81%aa%e3%81%84%e3%81%91%e3%82%8c%e3%81%a9%e3%82%82%e3%80%81svn-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.techscore.com\/blog\/2012\/11\/07\/%e3%81%82%e3%81%88%e3%81%a6%e8%a8%80%e3%81%86%e3%81%bb%e3%81%a9%e3%81%a7%e3%81%af%e3%81%aa%e3%81%84%e3%81%91%e3%82%8c%e3%81%a9%e3%82%82%e3%80%81svn-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89\/","title":{"rendered":"\u3042\u3048\u3066\u8a00\u3046\u307b\u3069\u3067\u306f\u306a\u3044\u3051\u308c\u3069\u3082\u3001svn \u30b3\u30de\u30f3\u30c9\u3042\u308b\u3042\u308b"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u9234\u6728\u3067\u3059\u3002<\/p>\n<p>\u3042\u3048\u3066\u8a00\u3046\u307b\u3069\u3067\u306f\u306a\u3044\u3051\u308c\u3069\u3082\u30b7\u30ea\u30fc\u30ba\u3067\u3059\u3002<\/p>\n<p>svn \u95a2\u4fc2\u306e\u826f\u304f\u4f7f\u3046\u30b3\u30de\u30f3\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a1\u30a4\u30eb\u306e\u8ffd\u52a0\u3001\u5909\u66f4<\/h2>\n<p>\u307e\u305a\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u8ffd\u52a0\u3001\u5909\u66f4\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u3044\u308d\u3044\u308d\u306a\u30d1\u30b9\u306b\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070 Rails \u306e scaffold \u3067\u30e2\u30c7\u30eb\u3001\u30d3\u30e5\u30fc\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3001\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u7b49\u3092\u307e\u3068\u3081\u3066\u751f\u6210\u3057\u305f\u5834\u5408\u3067\u3059\u3002<\/p>\n<p>\u4e00\u3064\u4e00\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3092 svn add \u3059\u308b\u306e\u306f\u9762\u5012\u306a\u306e\u3067\u3001\u305d\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u307e\u3068\u3081\u3066 svn add \u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u65b0\u898f\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u5168\u3066\u8ffd\u52a0 (svn add) \u3059\u308b. \r\nsvn status | grep ^? | awk '{print $2}' | xargs svn add<\/pre>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3057\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u306f\u3001svn status \u306e\u51fa\u529b\u3067\u300c? piyo.txt\u300d\u306e\u3088\u3046\u306b\u300c?\u300d\u304b\u3089\u59cb\u307e\u308b\u306e\u3067\u3001grep ^? \u3067\u300c?\u300d\u304b\u3089\u59cb\u307e\u308b\u884c\u306e\u307f\u62bd\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001awk '{print $2}' \u3067\u300c? piyo.txt\u300d\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u540d\uff08\u3064\u307e\u308a\u300cpiyo.txt\u300d\uff09\u3092\u5207\u308a\u51fa\u3057\u3001xargs \u3067 svn add \u306e\u5f15\u6570\u306b\u4e0e\u3048\u307e\u3059\u3002\u3053\u308c\u3067\u65b0\u898f\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u3066 svn add \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u540c\u69d8\u306b\u3001\u5909\u66f4\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u3066\u623b\u3059 (svn revert) \u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u5909\u66f4\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u3066 svn revert \u3059\u308b. \r\nsvn status | grep ^M | awk '{print $2}' | xargs svn revert<\/pre>\n<h2>\u5909\u66f4\u306e\u53d6\u308a\u6d88\u3057<\/h2>\n<p>\u300c\u9593\u9055\u3063\u305f\u4fee\u6b63\u3092\u30b3\u30df\u30c3\u30c8\u3057\u3066\u3057\u307e\u3063\u305f\uff01\u300d\u3068\u3044\u3046\u3053\u3068\u3002\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u9006\u65b9\u5411\u306b\u30de\u30fc\u30b8\u3057\u307e\u3059\uff08\u30ea\u30d3\u30b8\u30e7\u30f3\u306f -r100:99 \u306e\u3088\u3046\u306b FROM &gt; TO \u3068\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff09\u3002<\/p>\n<pre class=\"lang:sh decode:true\">svn merge -r100:99 .<\/pre>\n<h2>\u30b3\u30df\u30c3\u30c8\u30ed\u30b0\u306e\u8868\u793a<\/h2>\n<p>\u76f4\u8fd1 N \u4ef6\u3060\u3051\u78ba\u8a8d\u3057\u305f\u3044\u3001\u3068\u3044\u3046\u5834\u5408\u306f -l (--limit) \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u6700\u65b0 10 \u4ef6\u306e\u30b3\u30df\u30c3\u30c8\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b. \r\nsvn log --l 10<\/pre>\n<p>svn copy \u3067\u30b3\u30d4\u30fc\u3055\u308c\u305f\u5f8c\u306e\u30ed\u30b0\u3060\u3051\u898b\u305f\u3044\u3001\u3068\u3044\u3046\u5834\u5408\u306f --stop-on-copy \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u307e\u3059\u3002<br \/>\nsvn copy \u3067\u30d6\u30e9\u30f3\u30c1\u3092\u4f5c\u6210\u3057\u305f\u3082\u306e\u306e\u3001\u305d\u308c\u4ee5\u524d\u306e\u30ed\u30b0\u306f\u8868\u793a\u3057\u306a\u304f\u3066 OK \u3068\u3044\u3046\u5834\u5408\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># svn copy \u3067\u4f5c\u6210\u3055\u308c\u305f\u5f8c\u306e\u30ed\u30b0\u306e\u307f\u3092\u8868\u793a\u3059\u308b.\r\nsvn log --stop-on-copy<\/pre>\n<p>-v \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u30b3\u30df\u30c3\u30c8\u3067\u5909\u66f4\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u5909\u66f4\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u78ba\u8a8d\u3059\u308b.\r\nsvn log -v<\/pre>\n<p>-c \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30ea\u30d3\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u7279\u5b9a\u306e\u30b3\u30df\u30c3\u30c8\u3067\u5909\u66f4\u3055\u308c\u305f\u5185\u5bb9\u3092 diff \u5f62\u5f0f\u3067\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u30ea\u30d3\u30b8\u30e7\u30f3 777 \u306e\u5909\u66f4\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b.\r\nsvn diff -c777<\/pre>\n<h2>\u30d8\u30eb\u30d7<\/h2>\n<p>\u6700\u5f8c\u306b\u3001\u56f0\u3063\u305f\u3068\u304d\u306f\u30d8\u30eb\u30d7\u3067\u3059\uff01<\/p>\n<pre class=\"lang:sh decode:true\"># \u30d8\u30eb\u30d7\u3092\u8868\u793a.\r\nsvn help\r\n\r\n# \u7279\u5b9a\u306e\u30b3\u30de\u30f3\u30c9\u306e\u30d8\u30eb\u30d7\u3092\u8868\u793a.\r\nsvn help blame<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u9234\u6728\u3067\u3059\u3002<\/p>\n<p>\u3042\u3048\u3066\u8a00\u3046\u307b\u3069\u3067\u306f\u306a\u3044\u3051\u308c\u3069\u3082\u30b7\u30ea\u30fc\u30ba\u3067\u3059\u3002<\/p>\n<p>svn \u95a2\u4fc2\u306e\u826f\u304f\u4f7f\u3046\u30b3\u30de\u30f3\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\u30d5\u30a1\u30a4\u30eb\u306e\u8ffd\u52a0\u3001\u5909\u66f4<br \/>\n\u307e\u305a\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u8ffd\u52a0\u3001\u5909\u66f4\u304b\u3089\u3067\u3059\u3002<br \/><a href=\"https:\/\/www.techscore.com\/blog\/2012\/11\/07\/%e3%81%82%e3%81%88%e3%81%a6%e8%a8%80%e3%81%86%e3%81%bb%e3%81%a9%e3%81%a7%e3%81%af%e3%81%aa%e3%81%84%e3%81%91%e3%82%8c%e3%81%a9%e3%82%82%e3%80%81svn-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89\/\">\u7d9a\u304d\u3092\u8aad\u3080...<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[23,49,28],"_links":{"self":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/522"}],"collection":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/comments?post=522"}],"version-history":[{"count":1,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/522\/revisions"}],"predecessor-version":[{"id":18019,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/522\/revisions\/18019"}],"wp:attachment":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/media?parent=522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/categories?post=522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/tags?post=522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}