Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SVNとGitを同期した話~Subgit~
Search
Skycat
September 20, 2017
Technology
1
1.7k
SVNとGitを同期した話~Subgit~
GitLab Meetup Fukuoka #1 でLTをさせていただいたときの資料です。
https://gitlab-jp.connpass.com/event/64349/
Skycat
September 20, 2017
Tweet
Share
More Decks by Skycat
See All by Skycat
秒速でFlutterプロジェクトのCI/CD環境を構築した話
skycat_me
2
4.2k
未経験からの挑戦!超速ネイティブアプリ開発
skycat_me
0
1.5k
Other Decks in Technology
See All in Technology
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
170
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
180
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
物価高なラスベガスでの過ごし方
zakky
0
390
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
520
VPC間の接続方法を整理してみた #自治体クラウド勉強会
non97
1
890
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
130
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
180
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
150
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
66
10k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
Why Our Code Smells
bkeepers
PRO
334
57k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
How to Ace a Technical Interview
jacobian
275
23k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
The Cult of Friendly URLs
andyhume
78
6k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Transcript
SVNͱGITΛಉظͨ͠ ʙ Subgit ʙ 2017/09/19
ࣗݾհ দຊ ▸ גࣜձࣾϋγΰ ▸ αʔόʔαΠυΤϯδχΞ ▸ Twitter: skycat_me
▸ Facebook: takuya.matsumoto.cat
ϓϩδΣΫτ ▸ SVNཧ ▸ ίʔυϨϏϡʔͭΒ͍ ▸ hook͕͑ͳ͍ʢେਓͷࣄ
ͳʹΑΓ Git ͰΓ͍ͨ GitlabͰιʔεϨϏϡʔΓ͍ͨ… GitlabCIͰࣗಈςετΓ͍ͨ… GitlabͷWebhookͰChatOpsతͳͷΓ͍ͨ…
ͰେਓͷࣄͰ શҠߦͰ͖ͳ͍
Subgit͕ͬͯͭΑͦ͞͏ʂ
શಉظʂ Subversion <=> Git
ίετ… খنͳνʔϜͳΒແྉʢSubgitࣗମͷ
ָͪΜಋೖ ▸ JavaͳͷͰJava͕ඞਢͰ͢ʂʂ ▸ vagrantbox ubuntu/trusty64ڥ # java8 install $
sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer # Subgit install $ wget https://subgit.com/download/subgit_3.2.4_all.deb $ sudo dpkg -i subgit_3.2.4_all.deb $ sudo apt-get install -f
ָͪΜಋೖ ▸ GitRepositoryΛੜͯ͠SubgitίϚϯυΛଧ͚ͭͩʂ $ subgit configure {svn_repository_url} {git_repository} # sugitσΟϨΫτϦ͕ੜ͞ΕΔʂ
# SVNͱGitͷϢʔβϚοϐϯάઃఆ $ vim {git_repository}/subgit/authors.txt matsumoto_takuya = skycat <
[email protected]
> # SVNಉظઃఆʢྫͩͱSVNͷtrunk͕GitͷmasterʹͳΓ·͢) $ vim {git_repository}/subgit/config trunk = :refs/heads/master branches = branches/*:refs/heads/feature/* # SVNΞΫηεใ sshKeyFile = svn private Key userName =UserName
ࡉ͔͍ઃఆ # SVNಉظઃఆʢྫͩͱSVNͷtrunk͕GitͷmasterʹͳΓ·͢) $ vim {git_repository}/subgit/config minimalRevision=630000 SVNͷϦϙδτϦ͕ංେԽͯ͠͠·͍ͬͯΔ߹ɺ ಛఆͷϦϏδϣϯ͔Βಉظ͢Δ͜ͱ͕Մೳʂ Revision630000Ҏ͔߱Βಉظʂ
Քಇʂ # SVNΠϯετʔϧ $ subgit install {git_repository}/subgit/config SVNͷϦϙδτϦ͕ංେԽͯ͠͠·͍ͬͯΔ߹ɺ ಛఆͷϦϏδϣϯ͔Βಉظ͢Δ͜ͱ͕Մೳʂ ޭͨ͠ΒDaemonىಈͯ͠ಉظ͠·͢ʂ
෭࢈͕ͨ͘͞Μʂ ▸ GitlabCEΛཱͯͯίʔυϨϏϡʔ(๑•̀ŷ•́)و✧ ▸ GitlabCIͰࣗಈςετ(๑•̀ŷ•́)و✧ ▸ WebhookͰChatOps(๑•̀ŷ•́)و✧ ▸ Gitͷڭ(๑•̀ŷ•́)و✧
ͨͩɺ͋Δʂ ▸ Subgit͕݁ߏϝϞϦΛ৯͏ʀɻʀ ▸ ϓϩδΣΫτͷ߹্ɺݱࡏ12ݸͷRepositoryΛಉظத ▸ ݱࡏɺGitlabʹRAMΛ8.5GׂΓ͋ͯͯΔ USER PID %CPU
%MEM VSZ RSS git 1628 0.2 2.0 4115984 176568 ? Ssl Aug03 140:12 git 2402 0.5 4.8 4121252 423556 ? Ssl Aug14 294:30 git 12876 0.2 2.6 4118180 232660 ? Ssl Aug03 149:18 git 19817 0.2 2.2 4118304 199232 ? Ssl Aug03 146:00 git 23842 0.2 2.6 4115984 229092 ? Ssl Aug03 145:12 git 24513 0.2 2.7 4115984 238928 ? Ssl Aug03 148:40 git 25977 0.2 3.1 4115984 274436 ? Ssl Aug03 145:21 git 26915 0.5 5.4 4121116 476892 ? Ssl Aug09 308:55 git 27631 0.6 6.9 4118032 603960 ? Ssl Sep15 34:56 git 31213 0.2 2.6 4115984 233760 ? Ssl Aug03 150:43 git 31714 0.6 4.9 4121408 432184 ? Ssl Aug14 326:45 git 32111 0.2 1.9 4115984 172748 ? Ssl Aug03 152:39
ͨͩɺ͋Δʂ ▸ SubgitͷDaemon͕ϝϞϦෆͰ͓ͳ͘ͳΓʹ ▸ ࢹͯ͠ࢮΜͰͨΒੜ͖ฦ͢Α͏ʹ͢Δ ▸ subgit install —recover {git_repository}
▸ ͍ͨͩͭ݁͜ߏ͕͔͔࣌ؒΔʀ ▸ ͦͷؒɺಉظ͕ࢭ·ͬͯ͠·͏ͷͰGitlabͰϚʔδ͕Ͱ ͖ͳ͘ͳͬͨΓɺPushΠϕϯτ͕͜ͳ͘ͳΔ ▸ ݱঢ়ϝϞϦageageͰઓͬͯΔ͚ͲɺͲ͏ʹ͔͍ͨ͠ƅ ƅ´ωAƅ ƅŇűƅŖ
ಋೖͯ͠Α͔ͬͨ͜ͱʂ ▸ Gitܦݧ͕ͳ͔ͬͨϝϯόʔ͕Gitʹ৮ΕΔ͍͍ػձ͕Ͱ͖ͨ ▸ શҠߦͰͳ͘ಉظͳͷͰɺಋೖίετ͕ͱͯগͳ͍ ▸ GitlabͰLGTMը૾ͰΈΜͳϫΠϫΠͬͯͯ࠷ߴʂ ▸ ΤϯδχΞͷίϛϡχέʔγϣϯ͕׆ൃʹʂ
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠