{"id":160001,"date":"2019-10-12T10:43:39","date_gmt":"2019-10-12T02:43:39","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=160001"},"modified":"2019-09-27T14:45:43","modified_gmt":"2019-09-27T06:45:43","slug":"fun-svn-conflict","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/fun-svn-conflict.html","title":{"rendered":"\u73a9\u8f6cSVN-\u89e3\u51b3\u51b2\u7a81"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nApache Subversion \u901a\u5e38\u88ab\u7f29\u5199\u6210 SVN\uff0c\u662f\u4e00\u4e2a\u5f00\u653e\u6e90\u4ee3\u7801\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0cSubversion \u5728 2000 \u5e74\u7531 CollabNet Inc \u5f00\u53d1\uff0c\u73b0\u5728\u53d1\u5c55\u6210\u4e3a Apache \u8f6f\u4ef6\u57fa\u91d1\u4f1a\u7684\u4e00\u4e2a\u9879\u76ee\uff0c\u540c\u6837\u662f\u4e00\u4e2a\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\u548c\u7528\u6237\u793e\u533a\u7684\u4e00\u90e8\u5206\u3002
\nSVN\u76f8\u5bf9\u4e8e\u7684RCS\u3001CVS\uff0c\u91c7\u7528\u4e86\u5206\u652f\u7ba1\u7406\u7cfb\u7edf\uff0c\u5b83\u7684\u8bbe\u8ba1\u76ee\u6807\u5c31\u662f\u53d6\u4ee3CVS\u3002\u4e92\u8054\u7f51\u4e0a\u514d\u8d39\u7684\u7248\u672c\u63a7\u5236\u670d\u52a1\u591a\u57fa\u4e8eSubversion\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u5047\u8bbe A\u3001B \u4e24\u4e2a\u7528\u6237\u90fd\u5728\u7248\u672c\u53f7\u4e3a 100 \u7684\u65f6\u5019\uff0c\u66f4\u65b0\u4e86 kingtuns.txt \u8fd9\u4e2a\u6587\u4ef6\uff0cA \u7528\u6237\u5728\u4fee\u6539\u5b8c\u6210\u4e4b\u540e\u63d0\u4ea4 kingtuns.txt \u5230\u670d\u52a1\u5668\uff0c \u8fd9\u4e2a\u65f6\u5019\u63d0\u4ea4\u6210\u529f\uff0c\u8fd9\u4e2a\u65f6\u5019 kingtuns.txt \u6587\u4ef6\u7684\u7248\u672c\u53f7\u5df2\u7ecf\u53d8\u6210 101 \u4e86\u3002\u540c\u65f6B\u7528\u6237\u5728\u7248\u672c\u53f7\u4e3a 100 \u7684 kingtuns.txt \u6587\u4ef6\u4e0a\u4f5c\u4fee\u6539\uff0c \u4fee\u6539\u5b8c\u6210\u4e4b\u540e\u63d0\u4ea4\u5230\u670d\u52a1\u5668\u65f6\uff0c\u7531\u4e8e\u4e0d\u662f\u5728\u5f53\u524d\u6700\u65b0\u7684 101 \u7248\u672c\u4e0a\u4f5c\u7684\u4fee\u6539\uff0c\u6240\u4ee5\u5bfc\u81f4\u63d0\u4ea4\u5931\u8d25\u3002<\/p>\n

\u6211\u4eec\u5df2\u5728\u672c\u5730\u68c0\u51fa runoob01 \u5e93\uff0c\u4e0b\u9762\u6211\u4eec\u5c06\u5b9e\u73b0\u7248\u672c\u51b2\u7a81\u7684\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n

\u6211\u4eec\u53d1\u73b0 HelloWorld.html \u6587\u4ef6\u5b58\u5728\u9519\u8bef\uff0c\u9700\u8981\u4fee\u6539\u6587\u4ef6\u5e76\u63d0\u4ea4\u5230\u7248\u672c\u5e93\u4e2d\u3002<\/p>\n

\u6211\u4eec\u5c06 HelloWorld.html \u7684\u5185\u5bb9\u4fee\u6539\u4e3a \"HelloWorld! http:\/\/www.runoob.com\/\"\u3002<\/p>\n

root@runoob:~\/svn\/runoob01\/trunk# cat HelloWorld.html \r\nHelloWorld! http:\/\/www.runoob.com\/<\/pre>\n

\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u67e5\u770b\u66f4\u6539\uff1a<\/p>\n

root@runoob:~\/svn\/runoob01\/trunk# svn diff \r\nIndex: HelloWorld.html\r\n===================================================================\r\n--- HelloWorld.html     (revision 5)\r\n+++ HelloWorld.html     (working copy)\r\n@@ -1,2 +1 @@\r\n-HelloWorld! http:\/\/www.runoob.com\/\r\n+HelloWorld! http:\/\/www.runoob.com\/!<\/pre>\n

\u5c1d\u8bd5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u63d0\u4ea4\u4ed6\u7684\u66f4\u6539\uff1a<\/p>\n

root@runoob:~\/svn\/runoob01\/trunk# svn commit -m \"change HelloWorld.html first\"\r\nSending        HelloWorld.html\r\nTransmitting file data .svn: E160028: Commit failed (details follow):\r\nsvn: E160028: File '\/trunk\/HelloWorld.html' is out of date<\/pre>\n

\u8fd9\u65f6\u6211\u53d1\u73b0\u63d0\u4ea4\u5931\u8d25\u4e86\u3002<\/p>\n

\u56e0\u4e3a\u6b64\u65f6\uff0cHelloWorld.html \u5df2\u7ecf\u88ab user02 \u4fee\u6539\u5e76\u63d0\u4ea4\u5230\u4e86\u4ed3\u5e93\u3002Subversion \u4e0d\u4f1a\u5141\u8bb8 user01(\u672c\u4f8b\u4f7f\u7528\u7684 svn \u8d26\u53f7)\u63d0\u4ea4\u66f4\u6539\uff0c\u56e0\u4e3a user02 \u5df2\u7ecf\u4fee\u6539\u4e86\u4ed3\u5e93\uff0c\u6240\u4ee5\u6211\u4eec\u7684\u5de5\u4f5c\u526f\u672c\u5df2\u7ecf\u5931\u6548\u3002<\/p>\n

\u4e3a\u4e86\u907f\u514d\u4e24\u4eba\u7684\u4ee3\u7801\u88ab\u4e92\u76f8\u8986\u76d6\uff0cSubversion \u4e0d\u5141\u8bb8\u6211\u4eec\u8fdb\u884c\u8fd9\u6837\u7684\u64cd\u4f5c\u3002\u6240\u4ee5\u6211\u4eec\u5728\u63d0\u4ea4\u66f4\u6539\u4e4b\u524d\u5fc5\u987b\u5148\u66f4\u65b0\u5de5\u4f5c\u526f\u672c\u3002\u6240\u4ee5\u4f7f\u7528 update \u547d\u4ee4\uff0c\u5982\u4e0b\uff1a<\/p>\n

root@runoob:~\/svn\/runoob01\/trunk# svn update\r\nUpdating '.':\r\nC    HelloWorld.html\r\nUpdated to revision 6.\r\nConflict discovered in file 'HelloWorld.html'.\r\nSelect: (p) postpone, (df) show diff, (e) edit file, (m) merge,\r\n        (mc) my side of conflict, (tc) their side of conflict,\r\n        (s) show all options: mc\r\nResolved conflicted state of 'HelloWorld.html'\r\nSummary of conflicts:\r\n  Text conflicts: 0 remaining (and 1 already resolved)<\/pre>\n

\u8fd9\u8fb9\u8f93\u5165\"mc\",\u4ee5\u672c\u5730\u7684\u6587\u4ef6\u4e3a\u4e3b\u3002\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5176\u9009\u9879\u5bf9\u51b2\u7a81\u7684\u6587\u4ef6\u8fdb\u884c\u4e0d\u540c\u7684\u64cd\u4f5c\u3002<\/p>\n

\u9ed8\u8ba4\u662f\u66f4\u65b0\u5230\u6700\u65b0\u7684\u7248\u672c\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u6307\u5b9a\u66f4\u65b0\u5230\u54ea\u4e2a\u7248\u672c<\/p>\n

svn update -r6<\/pre>\n

\u6b64\u65f6\u5de5\u4f5c\u526f\u672c\u662f\u548c\u4ed3\u5e93\u5df2\u7ecf\u540c\u6b65\uff0c\u53ef\u4ee5\u5b89\u5168\u5730\u63d0\u4ea4\u66f4\u6539\u4e86<\/p>\n

root@runoob:~\/svn\/runoob01\/trunk# svn commit -m \"change HelloWorld.html second\"\r\nSending        HelloWorld.html\r\nTransmitting file data .\r\nCommitted revision 7.<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u5047\u8bbe A\u3001B \u4e24\u4e2a\u7528\u6237\u90fd\u5728\u7248\u672c\u53f7\u4e3a 100 \u7684\u65f6\u5019\uff0c\u66f4\u65b0\u4e86 kingtuns.txt \u8fd9\u4e2a\u6587\u4ef6\uff0cA \u7528\u6237\u5728\u4fee\u6539 […]<\/p>\n","protected":false},"author":321,"featured_media":159975,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-160001","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/160001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/321"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=160001"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/160001\/revisions"}],"predecessor-version":[{"id":160004,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/160001\/revisions\/160004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/159975"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=160001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=160001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=160001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}