2014-08-24(日) [長年日記]
_ ports 版 Using git-svn (FreeBSD committers only)
Using git-svn (FreeBSD committers only) を参考にして ports に対してオペレーションしてみました。tota@f34d:/usr % sudo mkdir ports tota@f34d:/usr % sudo chown -R tota:wheel ports tota@f34d:/usr % git clone git@github.com:freebsd/freebsd-ports.git ports Cloning into 'ports'... Enter passphrase for key '/home/tota/.ssh/id_dsa': remote: Counting objects: 3569984, done. remote: Compressing objects: 100% (971/971), done. remote: Total 3569984 (delta 255), reused 0 (delta 0) Receiving objects: 100% (3569984/3569984), 774.54 MiB | 2.48 MiB/s, done. Resolving deltas: 100% (1881904/1881904), done. Checking connectivity... done. Checking out files: 100% (119492/119492), done. tota@f34d:/usr % cd ports tota@f34d:/usr/ports % git svn init -Thead svn+ssh://svn.freebsd.org/ports . Enter passphrase for key '/home/tota/.ssh/id_dsa': tota@f34d:/usr/ports % git update-ref refs/remotes/origin/trunk `git show-ref origin/svn_head|cut -d" " -f1` tota@f34d:/usr/ports % git svn fetch Enter passphrase for key '/home/tota/.ssh/id_dsa': r365858 = c252f8d45e60c7be9d63bcda4d42abd9b4618012 r365859 = 9662be4cb4af690f0e59f8aaad06ff2c5c05d715 r365860 = 44d4c34460ff9e02040f6dd6ff9dc5106039e740 Done rebuilding .git/svn/refs/remotes/origin/trunk/.rev_map.35697150-7ecd-e111-bb59-0022644237b5 Index mismatch: a35c34aba742350ee252b1f6776476bd9cf24804 != a84a8a51b05d3392426619c4bd142ffe26568c4e rereading 44d4c34460ff9e02040f6dd6ff9dc5106039e740 M print/rubygem-afm/Makefile M print/rubygem-afm/distinfo r365861 = e1338392c94b06c7c2894b0237124b65cb450c08 (refs/remotes/origin/trunk) M databases/rubygem-memcache/Makefile M databases/rubygem-memcache/distinfo r365862 = 0d7f326f13a7b065296c62964ecfd52be28077ee (refs/remotes/origin/trunk) A net/quiterss/pkg-plist A net/quiterss/Makefile A net/quiterss/distinfo A net/quiterss/pkg-descr A net/quiterss/files/patch-lang-lang.pri M net/Makefile r365863 = d83e98975cba1ef77b093850ba4603d7736ed28e (refs/remotes/origin/trunk) tota@f34d:/usr/ports % git checkout trunk Note: checking out 'trunk'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 44d4c34... www/rubygem-underscore-rails: update to 1.6.0 tota@f34d:/usr/ports % git branch -D master Deleted branch master (was c4c374c). tota@f34d:/usr/ports % git checkout -b master trunk Switched to a new branch 'master' tota@f34d:/usr/ports % git svn rebase Enter passphrase for key '/home/tota/.ssh/id_dsa': Current branch master is up to date.Wiki では
$ git update-ref refs/remotes/trunk `git show-ref origin/svn_head|cut -d" " -f1`
となっていますが,refs/remotes/origin/trunk にしないと SNV repo の revision 1 から fetch する羽目になり莫大な時間を要します。_ リモートリポジトリの名前変更
freebsd/freebsd-ports を Fork して tota/freebsd-ports を作っていたので,origin を tota/freebsd-ports にして,freebsd/freebsd-ports には freebsd という名前を付けるように変更します。tota@f34d:/usr/ports % git remote rename origin freebsd tota@f34d:/usr/ports % git remote add origin git@github.com:tota/freebsd-ports.git tota@f34d:/usr/ports % git fetch origin Enter passphrase for key '/home/tota/.ssh/id_dsa': remote: Counting objects: 36, done. remote: Compressing objects: 100% (34/34), done. remote: Total 36 (delta 4), reused 21 (delta 2) Unpacking objects: 100% (36/36), done. From github.com:tota/freebsd-ports * [new branch] gitlab-shellSpike -> origin/gitlab-shellSpike * [new branch] gitlabSpike -> origin/gitlabSpike * [new branch] master -> origin/master * [new branch] misc/rubygem-rabbit -> origin/misc/rubygem-rabbit * [new branch] tota -> origin/tota * [new branch] www/testlink -> origin/www/testlink tota@f34d:/usr/ports % git branch -r freebsd/HEAD -> freebsd/master freebsd/branches/2014Q1 freebsd/branches/2014Q2 freebsd/branches/2014Q3 freebsd/branches/RELEASE_8_4_0 freebsd/branches/RELENG_2_1_0 freebsd/branches/RELENG_2_2 freebsd/branches/RELENG_9_1_0 freebsd/branches/RELENG_9_2_0 freebsd/master freebsd/svn_head freebsd/trunk origin/gitlab-shellSpike origin/gitlabSpike origin/master origin/misc/rubygem-rabbit origin/tota origin/www/testlink trunk