| 441 | |
| 442 | == 2012-03-09 == |
| 443 | |
| 444 | * 由於 trac 的 svn 裡有 hadoop4win-setup 目錄,而 sourceforge 的 svn 紀錄是新的,所以想試試看能否合併。 |
| 445 | * [參考] [http://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo#Filteringthedumpfileoptional SourceForge 的 SVN 匯入文件有提到 Filtering the dump file (optional)] |
| 446 | * [參考] [http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering SVNBOOK 也有提到 Filtering Repository History] |
| 447 | * 採用 SVNBOOK 的步驟,首先把 hadoop4win 的部份獨立成一個 Repository |
| 448 | {{{ |
| 449 | jazz@Wdebian:~/trac_pool/trac_pool/grid$ svnadmin dump svnroot/ > grid_svn_dumpfile |
| 450 | ....... |
| 451 | * Dumped revision 248. |
| 452 | jazz@Wdebian:~/trac_pool/trac_pool/grid$ svndumpfilter include --drop-empty-revs --renumber-revs hadoop4win-setup < grid_svn_dumpfile > hadoop4win_dumpfile |
| 453 | jazz@Wdebian:~/trac_pool/trac_pool/grid$ svnadmin create hadoop4win |
| 454 | jazz@Wdebian:~/trac_pool/trac_pool/grid$ svnadmin load --ignore-uuid hadoop4win < hadoop4win_dumpfile |
| 455 | ........ |
| 456 | ------- Committed revision 30 >>> |
| 457 | jazz@Wdebian:~/trac_pool/trac_pool/grid$ rm grid_svn_dumpfile hadoop4win_dumpfile |
| 458 | jazz@Wdebian:~/trac_pool/trac_pool/grid$ mv hadoop4win ~/hadoop4win_trac |
| 459 | }}} |
| 460 | * 做到這一步,我們可以拿到一個只有 hadoop4win-setup 這個目錄的 svnroot。(這裡我多用了 --drop-empty-revs 跟 --renumber-revs 兩個參數,如此可以讓原本 248 個 changeset 的 grid repository 過濾成只有 30 個 changeset 的 hadoop4win repository. |
| 461 | * 根據 sourceforge 的[http://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo 說明],可以用 rsync 方式取回 |
| 462 | {{{ |
| 463 | jazz@Wdebian:~$ mkdir -p hadoop4win_sf |
| 464 | jazz@Wdebian:~$ cd hadoop4win_sf/ |
| 465 | jazz@Wdebian:~/hadoop4win_sf$ rsync -av hadoop4win.svn.sf.net::svn/hadoop4win/* . |
| 466 | jazz@Wdebian:~/hadoop4win_sf$ cd |
| 467 | jazz@Wdebian:~$ svnadmin dump hadoop4win_sf/ > hadoop4win_sf_dumpfile |
| 468 | .......... |
| 469 | * Dumped revision 15. |
| 470 | jazz@Wdebian:~$ svnadmin load --ignore-uuid hadoop4win_trac/ < hadoop4win_sf_dumpfile |
| 471 | .......... |
| 472 | ------- Committed new rev 45 (loaded from original rev 15) >>> |
| 473 | }}} |
| 474 | * 做到這一步,算是完整地將整個專案 SVN 合併成一個。好在時間點兩個是相互錯開的,不然還真不知道怎麼根據時間點順序做合併呢! |
| 475 | * 接著把這個 SVN repository 用 svnadmin dump 指令先產生一個 hadoop4win_dumpfile 的檔案。然後 scp 到 shell.sf.net |
| 476 | {{{ |
| 477 | jazz@Wdebian:~$ svnadmin dump hadoop4win_trac/ > hadoop4win_dumpfile |
| 478 | .... |
| 479 | * Dumped revision 45. |
| 480 | jazz@Wdebian:~$ scp hadoop4win_dumpfile jazzwang,hadoop4win@shell.sf.net:. |
| 481 | }}} |
| 482 | * 登入 shell.sf.net |
| 483 | {{{ |
| 484 | jazz@Wdebian:~$ ssh -t jazzwang,hadoop4win@shell.sf.net create |
| 485 | [jazzwang@shell-24009 ~]$ adminrepo --checkout svn |
| 486 | [jazzwang@shell-24009 ~]$ rm -rf /svnroot/hadoop4win/* |
| 487 | [jazzwang@shell-24009 ~]$ svnadmin create /svnroot/hadoop4win |
| 488 | [jazzwang@shell-24009 ~]$ svnadmin load --ignore-uuid /svnroot/hadoop4win/ < hadoop4win_dumpfile |
| 489 | [jazzwang@shell-24009 ~]$ adminrepo --save svn |
| 490 | |
| 491 | **** Ignoring the contents of the hooks directory (hooks are managed via the web) **** |
| 492 | |
| 493 | Save and unlock the svn repository for hadoop4win? [ny] y |
| 494 | }}} |
| 495 | * 這樣就算是完整把整個開發過程移植到 sourceforge 去啦!!!!大功告成!!! |
| 496 | * 同步上去以後,ViewCV 的結果是正確的,不過 trac 不正確。出現底下的錯誤訊息,只好請 sourceforge 管理員幫忙了~[https://sourceforge.net/apps/trac/sourceforge/ticket/24763 開單] |
| 497 | {{{ |
| 498 | Warning: Can't synchronize with the repository (The 'repository_dir' has changed, |
| 499 | a 'trac-admin resync' operation is needed.). Look in the Trac log for more information. |
| 500 | }}} |
| 501 | |
| 502 | == 2012-03-12 == |
| 503 | |
| 504 | * 有讀寫權限取出 sf.net SVN repository 的指令: |
| 505 | {{{ |
| 506 | ~$ svn co https://hadoop4win.svn.sf.net/svnroot/hadoop4win hadoop4win |
| 507 | }}} |
| 508 | * 線上查 Hadoop4Win Trac SVN 歷史紀錄 |
| 509 | * http://sourceforge.net/apps/trac/hadoop4win/log/ |