svn tutorial windows
Post on 07-Apr-2018
233 Views
Preview:
TRANSCRIPT
-
8/3/2019 SVN Tutorial Windows
1/13
SVNTutorialforWindowsUsers
-
8/3/2019 SVN Tutorial Windows
2/13
DownloadandInstallSVNClient
DownloadtheTortoiseSVNclientfromh;p://tortoisesvn.net/
Dependingonyouroperangsystem,youmightchoosethe32-bitor64-bitversions.
Install,restart. RightclickontheStartbu;on(XPusers)orclickonthe
Exploreicononthetaskbar(Windows7users)
-
8/3/2019 SVN Tutorial Windows
3/13
Createalocalrepository Createanewdirectoysomewhere(perhapsunderMy
Documents).IcalledmineSVN_Repo.
Right-clickontheSVN_Repofolder.Themenuthatpopsupwillhaveacoupleofnewitems:theSVNCheckoutand
TortoiseSVN.ChooseTortoiseSVN.
ClickonCreaterepositoryherefromthemenuthatpopsup.
-
8/3/2019 SVN Tutorial Windows
4/13
DothefirstCheckOut Oncetherepositoryissuccessfully
created,right-clickontheSVN_Repodirectoryagain,andchooseSVNCheckout
Theprogramwillaskyoufortherepoaddress.FortheLA-SiGMAproject,itish;ps://svn.cct.lsu.edu/repos/proposals/epscor09
Entertheuser-idandpasswordprovidedbyCCT.
Thecheckoutprocessnowstarts,andcreatesanexactreplicaoftheSVNfilesystemonyourlocaldrive.Youshoulddothisstepwhileconnectedtoafast
connecon,becauseourrepohasbecomequitelarge.
Youshouldallowafairamoutofme.[Ididthisathome,ona54Mbpswireless,andittookabout2.5hours.]
-
8/3/2019 SVN Tutorial Windows
5/13
DirectoryStructure
Aerasuccessfulcheckout,youwillseethatseveralfoldershaveappearedunderSVN_Repo.Mineisshownonle.
Notethered!(exclamaon)andthegreencheckmarksappearingonthedirectoryicons.
Theredsymbolonthetopleveldirectory(epscor09)meansthatoneormoreofthesubdirectoriescontainafilethatIhavechanged,makingmylocalversiondifferentfromthecopyontheSVN.
Thegreencheckmarksindicatethatallthefilesinthosefoldershavenotbeenchangedlocallysincethelastupdate.
-
8/3/2019 SVN Tutorial Windows
6/13
WorkingwiththeSVN:UpdateandCommit
WhenworkingwiththeSVNonadailybasis,therearejusttwothings
toremember:update,andcommit.
BeforeyoustartworkingonanyfileintheSVN,itisimportanttomake
sureyouhavethemostup-to-date
versionsofallfiles.Forthis,youwoulddoanupdatefromtheSVN
menu:rightclickonthedirectory
icon,andchooseSVNUpdate.
Theupdateprocesscopiesonlythefilesthathavechangedsincethelast
update.
Thecommitprocesscopiesfilesyoumayhavechangedlocallytothe
centralSVN(sothatotherscangetit
byupdang).
-
8/3/2019 SVN Tutorial Windows
7/13
Thescreen-shotofanupdateprocess
I had deliberately deleted four files from my local SVN repository prior to thisupdate. You can see that the update process restored those files from the
central SVN. Note that we are now at revision # 1049.
-
8/3/2019 SVN Tutorial Windows
8/13
Commingchanges-1 Ifyoumakechangestoafile,orif
youcreateanewfile,itneedstobecommi;ed(notinthepsychiatric
senseinmostcases)sothatothers
canseeit.
Inthescreenshottotheright,Ihavedeliberatelymodifiedoneof
thefiles.Notethatitismarkedbyaredexclamaonmarkalltheway
upthedirectorytreetothetop
level.
Notethatalltheotherfiles(andsub-folder)havegreencheck
marks,indicangthattheir
contentsareconsistentwiththe
centralSVN.
Ifyoucreateanewfile,itwillnothaveanymarkonit,whichisaclue
thatthecentralSVNknowsnothing
aboutthatfilesexistence.
-
8/3/2019 SVN Tutorial Windows
9/13
CommingChanges-2
ThescreenshotshowsthatIamabouttocommitthefile
thatIchanged.
-
8/3/2019 SVN Tutorial Windows
10/13
Comming
Changes-3WhenyouchoosetheSVN
Commitmenu,awindowpopsup
inwhichyoucantypeanotethat
explainswhatyouhavechanged.
Thisnotewillbecomepartofthe
SVNchangelogand,iftheSVNise-mailenabled,anautomace-
mailisgeneratedtoallauthorized
usersalerngthemofyour
change.
Now we are at revision #
1050.
-
8/3/2019 SVN Tutorial Windows
11/13
Onemoreslideoncommit
Ifallgoeswellwiththecommit,
whenIrefreshmydirectory,thered
exclamaonmarkwillchangetoa
greencheckmark,tellingmethatI
haveachievedaharmoniousunion
withthegreatmotherSVN.
Youmaynotethatthereissllared
exclamaonmarkonthehighlevel
directoryepscor09.Thisnever
goesawayonmydesktopmachine.
Ithinkitisanarfactofmy64-bit
clientnotinteracngwiththecentralSVN.Irunthe32-bitclient
applicaononmylaptopanditdoes
nothavethisproblem.
-
8/3/2019 SVN Tutorial Windows
12/13
Cleanup
Somemes,thingsgowrong,andconflictsarise.
OnewaytoresolvetheconflictistousetheCleanupmenufrom
TortoiseSVN.
Ifthatdoesnotwork,youshouldcopytheconflictedfiles(notethe
yellowtrianglemarks)toanother
directory,deletethemfromthe
localSVNRepo,anddoan
Update.
-
8/3/2019 SVN Tutorial Windows
13/13
Thatsit!Havefun.
top related