SlideShare una empresa de Scribd logo
1 de 28
SUBVERSION
 a.k.a SVN

              Under Linux



             By O. Teytaud
SUBVERSION
                  a.k.a SVN

  Earliest tools for version       Under Linux
control systems: the mid-70s.
                                  By O. Teytaud
  Stable tool: 1986, CVS.

 Now: SVN widely used for
  source code or text files.

Recent tools: git, mercurial...
SUBVERSION
              a.k.a SVN


   I will present the       Under Linux


“command line” version.
                           By O. Teytaud

No window, no mouse.

You can find graphical
interfaces as well; e.g.
     TortoiseSVN.
Various reasons for which
                    I use command line

              I know most of you (almost) never use
                        the command line.
                I use command line all the day long.

                    Reason 1: I am an old guy.
When I learnt computer science, there was no window on a computer,
   no mouse, and everything was done through command line.

        Reason 2: I work on High-Performance Computing.
       Many things on clusters are done without any window.

 Reason 3: For many things, you would be indeed faster if you
       were working in command line. Give it a try :-)
               In particular, for administration.
Why version control systems ?

                 Meeting 1: 3 persons A, B, C, decide
                    to work together on a project:
- A creates france.h and france.cpp;
- B creates taiwan.h and taiwan.cpp;
- C creates US.h and US.cpp.

        Meeting 2: They put all files in the same directory.
        It works.
Then all keep a copy of France + Taiwan + US;
then, each of them modifies some files.

A modifies france.cpp, and a little bit US.cpp.
B modifies taiwan.cpp, and a little bit US.cpp.
C modifies US.cpp.

        Meeting 3: They (try to) put all files in the same directory.
        Which US.cpp should they use ?
        ==> nothing works. They spend hours debugging.
Version control systems
                    is here for that !

                 Meeting 1: 3 persons A, B, C, decide
                    to work together on a project:
- A creates france.h and france.cpp;
- B creates taiwan.h and taiwan.cpp;
- C creates US.h and US.cpp.

        Meeting 2: They put all files in the same SVN-repository.
        It works.
Each of them modifies some files.

A modifies france.cpp, and a little bit US.cpp.
B modifies taiwan.cpp, and a little bit US.cpp.
C modifies US.cpp.       THEY ALL SEE MODIFICATIONS BY OTHERS !

       Meeting 3: They are very happy!
       Everything works.
Nowadays, no big
        Programming project
               without
   version control systems (VCS).

  CVS = good old system for VCS.
 SVN = CVS + some improvements.
     (tortoiseSVN for Windows)
GIT, MERCURIAL = for some specific
more complicated cases (many distinct
              versions).
       I recommend SVN as a first choice.
Nowadays, no big project in
      computer science without
    version control systems (VCS).

  CVS = good old system for VCS.
 SVN = CVS + some improvements.
GIT, MERCURIAL = for some specific
more complicated cases (many distinct
             versions).
        I recommend SVN as a first choice.



Also termed “source code management” systems.
Step 1: install SUBVERSION on your system.



                   No problem:
  Ubuntu Linux: sudo apt-get install subversion.
      Windows: use google, find subversion
        for Windows, download/install it.


         At many points when you use it,
         SVN will ask for a log message.

You just have, then, to explain what you are doing;
         this will be visible by other users.
Step 2: choosing where is the repository
  Here, John is the admin of the SVN repository.

   e.g. John will create the repository in his own directory.

cd /home/john
svnadmin create svn

   This is the svn root.
   Run by one user only ==> don't have one SVNROOT per user.

John will work with Paul and I-Chen. He creates a directory for this:

svn mkdir file:///home/john/svn/projectJPIC

He can create a “brother” directory for works with André and Olivier:

svn mkdir file:///home/john/svn/projectJAO

and so on – no problem.
Step 3: Take time for understanding :-)




John has his repository ready on his machine.
      But Paul and I-Chen do not work
           on the same machine.
                   So what ?
We will have to communicate through internet.
 The idea is to make the process automatic.
Step 4: putting the current files
                (if any) in the repository




Forget this step if you have no files for the moment.

cd /home/john/work/projectJPIC
                        ### assuming that the project
               ### is in /home/john/work/projectJPIC
svn import file:///home/john/svn/projectJPIC

          ==> ok, the files are installed!
Step 5: create working copies!

           You should never work in
          /home/john/svn/projectJPIC
              This is for SVN only.
       You should work on working copies.

  This is true for Paul, I-Chen, and also for John!

Paul, I-Chen and John all go to the directory
in which they want to work, and do:
svn checkout file:///home/john/svn/projectJPIC

==> this creates a working copy.
==> you can modify it as much as you want.
Step 6: understanding !




   John's
                                              Paul's
working copy.                              working copy.



                    Paul's SVN
                    repository

                                          Never modify Paul's
                                          SVN repository
                                          directly !

                    I-Chen's              SVN would become
                  working copy.           crazy.
Step 7: sending your modifications.

                   I edit France.cpp.
             I like my changes, I want to
                  make them available
                      for B and C.

      When you want to send your version to the
                    SVN repository:
                svn commit France.cpp
                         or just
                      svn commit
(will send all your modifications, not just France.cpp)
      Or:
      svn commit -m “major bugfix in France.cpp”
                to choose the message
Step 8: receiving others' modifications

    svn update taiwan.cpp
 ==> will just update Taiwan.cpp
            svn update
    ==> will update everything.

SVN will not accept to commit a file
       if it's not up-to-date
 ==> always “svn update” before
            “svn commit”.
Step 9: adding new files


      svn add belgium.cpp
  ==> I tell SVN that the new file
   “Belgium.cpp” is now under
          Version control
     svn commit belgium.cpp
==> will send belgium.cpp to others.
Step 10: get information!

               svn info
==> will tell you various global info.

        svn log france.cpp
       ==> will tell you what
      happened to france.cpp

     svn blame france.cpp
  ==> will tell you, for each line,
      where it comes from.
Step 11a: conflicts




     If I modify line 10,
 from “x++;” to “++x;”
     whereas you write:
   from “x++;” to x=x+1;”.

then SVN will have a trouble.
Step 11b: conflicts




Such a trouble is termed a conflict:
      svn update taiwan.cpp
      replies “C taiwan.cpp”
 which means “There is a conflict
  in taiwan.cpp, please solve.”

         ==> edit the file.
Step 11c: conflicts


            ==> edit the file.

  <<<<<<< .mine
  x=x+1;
  =======
  ++x;
  >>>>>>> .r6

 ==> write what you really want,
    and remove “<<<”, “===”,”>>>”
==> svn resolved taiwan.cpp
Step 12: many others!




   svn revert ==> removes your modifications

svn diff ==> checks differences between versions.

           svn rm ==> removes a file
Step 13: without shared disk space ?




            We have used “file:///”
which means that you have access to a shared
  disk (Paul, I-Chen and John write/read the
                  same disk).

       This is not necessarily the case.

             Then replace “file:///”
               by “svn+ssh://”
            and install “svnserve”.
Summary:

- All big projects now under version
    management systems.

- The administration of a SVN can be a bit tricky,
   but as a user it's quite easy; in everyday life, you
   will use essentially:
      - svn update
      - svn commit
      - ...and sometimes (unfortunately) svn resolved

- When no common disk space, you need “ssh”; a bit
   more tricky, as an admin, but not that much.
Home work:

1) Make groups (~3/4 persons, A B C and D).
2) Install the SVN together; set it up with
     - one file “readme”
     - one directory “plane”
3) A, B, C and D all put one image in the “plane”
     Directory, described in the readme
4) Collect the following info:
    svn info
    svn log
    svn status
    svn blame readme
Decentralized versions ?

   SVN style                         GIT style:
                                     you get the patches
WC1                   WC2            you want from who
                                     you want
            SVN
         repository            WC1                WC2


         WC3

More possibilities with Git;           WC3
 but far less convenient
I hate administration.
      How can I use “git” or “svn” or cvs” ?
                                                 Alioth
      BerliOS
                                                 Assembla
      GitHub
                                                 BerliOS
      Gitorious
                                                 Betavine
                                                                  Svn
      JavaForge (with pull requests to control
      source code contribution)                  Freepository
                                                 Google Code
Git   SourceForge
      GNU Savannah                               SourceForge
      Google Code
      Bitbucket                          Thanks Wikipedia for
                                               providing a
                                         list of free websites.
Multimedia
                Browser   Java IDE                Java DK
                                      player


Mercurial users: Mozilla, NetBeans, Xine, Xen, OpenJDK,
OpenOffice.org, OpenSolaris, wmii, MoinMoin, Linux-HA, Python
==> many sources consider Mercurial as better than git (same
syntax, better doc)

SVN users: ASF, SourceForge, FreeBSD, Google Code, KDE, GCC,
Ruby, Mono, PuTTY, Zope, Xiph, GnuPG, CUPS, Wireshark, TWiki,
Django, available on CodePlex, and many organizations worldwide
(for simple standard use, SVN is probably the best choice)

Git users: Linux kernel, GNOME, Perl 5, X.Org, Cairo,
Qt Development Frameworks, Samba, OpenEmbedded,
Ruby on Rails, Wine, Fluxbox, Openbox, Compiz Fusion,
XCB, ELinks, XMMS2, e2fsprogs, GNU Core Utilities,
DokuWiki (plenty of “geek-style” GNU/Linux stuff)
==> becomes a standard... but more tricky than SVN.

Más contenido relacionado

La actualidad más candente

TYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CITYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CIderdanne
 
Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)chenghlee
 
Corwin on Containers
Corwin on ContainersCorwin on Containers
Corwin on ContainersCorwin Brown
 
Apache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuApache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuSlim Baltagi
 
The Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentThe Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentJérôme Petazzoni
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with SubversionGuy K. Kloss
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshopTrafeX
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90minsLarry Cai
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Deploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfDeploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfKarsten Dambekalns
 
Making%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20WindowsMaking%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20Windowstutorialsruby
 
Drupal in Libraries
Drupal in LibrariesDrupal in Libraries
Drupal in LibrariesCary Gordon
 
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)Massimo Menichinelli
 
All of Your Network Monitoring is (probably) Wrong
All of Your Network Monitoring is (probably) WrongAll of Your Network Monitoring is (probably) Wrong
All of Your Network Monitoring is (probably) Wrongice799
 
Dev-Jam 2019 - Developing & Contributing to OpenNMS
Dev-Jam 2019 - Developing & Contributing to OpenNMSDev-Jam 2019 - Developing & Contributing to OpenNMS
Dev-Jam 2019 - Developing & Contributing to OpenNMSRonny Trommer
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization HacksNiel Bornstein
 

La actualidad más candente (20)

Docker & ci
Docker & ciDocker & ci
Docker & ci
 
TYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CITYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CI
 
Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)
 
Corwin on Containers
Corwin on ContainersCorwin on Containers
Corwin on Containers
 
Cvs
CvsCvs
Cvs
 
Apache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuApache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini Palthepu
 
The Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentThe Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deployment
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with Subversion
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90mins
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Deploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfDeploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using Surf
 
Making%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20WindowsMaking%20R%20Packages%20Under%20Windows
Making%20R%20Packages%20Under%20Windows
 
Drupal in Libraries
Drupal in LibrariesDrupal in Libraries
Drupal in Libraries
 
Power Of Zero
Power Of ZeroPower Of Zero
Power Of Zero
 
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
 
Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
 
All of Your Network Monitoring is (probably) Wrong
All of Your Network Monitoring is (probably) WrongAll of Your Network Monitoring is (probably) Wrong
All of Your Network Monitoring is (probably) Wrong
 
Dev-Jam 2019 - Developing & Contributing to OpenNMS
Dev-Jam 2019 - Developing & Contributing to OpenNMSDev-Jam 2019 - Developing & Contributing to OpenNMS
Dev-Jam 2019 - Developing & Contributing to OpenNMS
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization Hacks
 

Similar a An introduction to SVN

Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopigopinathkarangula
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .UnixTrong Dinh
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .UnixTrong Dinh
 
Installing OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xInstalling OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xNader Karimi
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Levente Kurusa
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP DevelopersLorna Mitchell
 
SVN Tutorial
SVN TutorialSVN Tutorial
SVN TutorialenggHeads
 
5 minute intro to virtualenv
5 minute intro to virtualenv5 minute intro to virtualenv
5 minute intro to virtualenvamenasse
 
Subversion
SubversionSubversion
Subversionthebdot1
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingPhilip Johnson
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0CTruncer
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxkarlhennesey
 
Nuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationNuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationPASCAL Jean Marie
 

Similar a An introduction to SVN (20)

subversion.ppt
subversion.pptsubversion.ppt
subversion.ppt
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
 
Subversion Saves The Day
Subversion Saves The DaySubversion Saves The Day
Subversion Saves The Day
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Installing OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xInstalling OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.x
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP Developers
 
Version Management with CVS
Version Management with CVSVersion Management with CVS
Version Management with CVS
 
SVN Tutorial
SVN TutorialSVN Tutorial
SVN Tutorial
 
5 minute intro to virtualenv
5 minute intro to virtualenv5 minute intro to virtualenv
5 minute intro to virtualenv
 
Docker
DockerDocker
Docker
 
SVN essentials
SVN essentialsSVN essentials
SVN essentials
 
J+s
J+sJ+s
J+s
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Subversion
SubversionSubversion
Subversion
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project Hosting
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
 
Nuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationNuxeo5 - Continuous Integration
Nuxeo5 - Continuous Integration
 

Último

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

An introduction to SVN

  • 1. SUBVERSION a.k.a SVN Under Linux By O. Teytaud
  • 2. SUBVERSION a.k.a SVN Earliest tools for version Under Linux control systems: the mid-70s. By O. Teytaud Stable tool: 1986, CVS. Now: SVN widely used for source code or text files. Recent tools: git, mercurial...
  • 3. SUBVERSION a.k.a SVN I will present the Under Linux “command line” version. By O. Teytaud No window, no mouse. You can find graphical interfaces as well; e.g. TortoiseSVN.
  • 4. Various reasons for which I use command line I know most of you (almost) never use the command line. I use command line all the day long. Reason 1: I am an old guy. When I learnt computer science, there was no window on a computer, no mouse, and everything was done through command line. Reason 2: I work on High-Performance Computing. Many things on clusters are done without any window. Reason 3: For many things, you would be indeed faster if you were working in command line. Give it a try :-) In particular, for administration.
  • 5. Why version control systems ? Meeting 1: 3 persons A, B, C, decide to work together on a project: - A creates france.h and france.cpp; - B creates taiwan.h and taiwan.cpp; - C creates US.h and US.cpp. Meeting 2: They put all files in the same directory. It works. Then all keep a copy of France + Taiwan + US; then, each of them modifies some files. A modifies france.cpp, and a little bit US.cpp. B modifies taiwan.cpp, and a little bit US.cpp. C modifies US.cpp. Meeting 3: They (try to) put all files in the same directory. Which US.cpp should they use ? ==> nothing works. They spend hours debugging.
  • 6. Version control systems is here for that ! Meeting 1: 3 persons A, B, C, decide to work together on a project: - A creates france.h and france.cpp; - B creates taiwan.h and taiwan.cpp; - C creates US.h and US.cpp. Meeting 2: They put all files in the same SVN-repository. It works. Each of them modifies some files. A modifies france.cpp, and a little bit US.cpp. B modifies taiwan.cpp, and a little bit US.cpp. C modifies US.cpp. THEY ALL SEE MODIFICATIONS BY OTHERS ! Meeting 3: They are very happy! Everything works.
  • 7. Nowadays, no big Programming project without version control systems (VCS). CVS = good old system for VCS. SVN = CVS + some improvements. (tortoiseSVN for Windows) GIT, MERCURIAL = for some specific more complicated cases (many distinct versions). I recommend SVN as a first choice.
  • 8. Nowadays, no big project in computer science without version control systems (VCS). CVS = good old system for VCS. SVN = CVS + some improvements. GIT, MERCURIAL = for some specific more complicated cases (many distinct versions). I recommend SVN as a first choice. Also termed “source code management” systems.
  • 9. Step 1: install SUBVERSION on your system. No problem: Ubuntu Linux: sudo apt-get install subversion. Windows: use google, find subversion for Windows, download/install it. At many points when you use it, SVN will ask for a log message. You just have, then, to explain what you are doing; this will be visible by other users.
  • 10. Step 2: choosing where is the repository Here, John is the admin of the SVN repository. e.g. John will create the repository in his own directory. cd /home/john svnadmin create svn This is the svn root. Run by one user only ==> don't have one SVNROOT per user. John will work with Paul and I-Chen. He creates a directory for this: svn mkdir file:///home/john/svn/projectJPIC He can create a “brother” directory for works with André and Olivier: svn mkdir file:///home/john/svn/projectJAO and so on – no problem.
  • 11. Step 3: Take time for understanding :-) John has his repository ready on his machine. But Paul and I-Chen do not work on the same machine. So what ? We will have to communicate through internet. The idea is to make the process automatic.
  • 12. Step 4: putting the current files (if any) in the repository Forget this step if you have no files for the moment. cd /home/john/work/projectJPIC ### assuming that the project ### is in /home/john/work/projectJPIC svn import file:///home/john/svn/projectJPIC ==> ok, the files are installed!
  • 13. Step 5: create working copies! You should never work in /home/john/svn/projectJPIC This is for SVN only. You should work on working copies. This is true for Paul, I-Chen, and also for John! Paul, I-Chen and John all go to the directory in which they want to work, and do: svn checkout file:///home/john/svn/projectJPIC ==> this creates a working copy. ==> you can modify it as much as you want.
  • 14. Step 6: understanding ! John's Paul's working copy. working copy. Paul's SVN repository Never modify Paul's SVN repository directly ! I-Chen's SVN would become working copy. crazy.
  • 15. Step 7: sending your modifications. I edit France.cpp. I like my changes, I want to make them available for B and C. When you want to send your version to the SVN repository: svn commit France.cpp or just svn commit (will send all your modifications, not just France.cpp) Or: svn commit -m “major bugfix in France.cpp” to choose the message
  • 16. Step 8: receiving others' modifications svn update taiwan.cpp ==> will just update Taiwan.cpp svn update ==> will update everything. SVN will not accept to commit a file if it's not up-to-date ==> always “svn update” before “svn commit”.
  • 17. Step 9: adding new files svn add belgium.cpp ==> I tell SVN that the new file “Belgium.cpp” is now under Version control svn commit belgium.cpp ==> will send belgium.cpp to others.
  • 18. Step 10: get information! svn info ==> will tell you various global info. svn log france.cpp ==> will tell you what happened to france.cpp svn blame france.cpp ==> will tell you, for each line, where it comes from.
  • 19. Step 11a: conflicts If I modify line 10, from “x++;” to “++x;” whereas you write: from “x++;” to x=x+1;”. then SVN will have a trouble.
  • 20. Step 11b: conflicts Such a trouble is termed a conflict: svn update taiwan.cpp replies “C taiwan.cpp” which means “There is a conflict in taiwan.cpp, please solve.” ==> edit the file.
  • 21. Step 11c: conflicts ==> edit the file. <<<<<<< .mine x=x+1; ======= ++x; >>>>>>> .r6 ==> write what you really want, and remove “<<<”, “===”,”>>>” ==> svn resolved taiwan.cpp
  • 22. Step 12: many others! svn revert ==> removes your modifications svn diff ==> checks differences between versions. svn rm ==> removes a file
  • 23. Step 13: without shared disk space ? We have used “file:///” which means that you have access to a shared disk (Paul, I-Chen and John write/read the same disk). This is not necessarily the case. Then replace “file:///” by “svn+ssh://” and install “svnserve”.
  • 24. Summary: - All big projects now under version management systems. - The administration of a SVN can be a bit tricky, but as a user it's quite easy; in everyday life, you will use essentially: - svn update - svn commit - ...and sometimes (unfortunately) svn resolved - When no common disk space, you need “ssh”; a bit more tricky, as an admin, but not that much.
  • 25. Home work: 1) Make groups (~3/4 persons, A B C and D). 2) Install the SVN together; set it up with - one file “readme” - one directory “plane” 3) A, B, C and D all put one image in the “plane” Directory, described in the readme 4) Collect the following info: svn info svn log svn status svn blame readme
  • 26. Decentralized versions ? SVN style GIT style: you get the patches WC1 WC2 you want from who you want SVN repository WC1 WC2 WC3 More possibilities with Git; WC3 but far less convenient
  • 27. I hate administration. How can I use “git” or “svn” or cvs” ? Alioth BerliOS Assembla GitHub BerliOS Gitorious Betavine Svn JavaForge (with pull requests to control source code contribution) Freepository Google Code Git SourceForge GNU Savannah SourceForge Google Code Bitbucket Thanks Wikipedia for providing a list of free websites.
  • 28. Multimedia Browser Java IDE Java DK player Mercurial users: Mozilla, NetBeans, Xine, Xen, OpenJDK, OpenOffice.org, OpenSolaris, wmii, MoinMoin, Linux-HA, Python ==> many sources consider Mercurial as better than git (same syntax, better doc) SVN users: ASF, SourceForge, FreeBSD, Google Code, KDE, GCC, Ruby, Mono, PuTTY, Zope, Xiph, GnuPG, CUPS, Wireshark, TWiki, Django, available on CodePlex, and many organizations worldwide (for simple standard use, SVN is probably the best choice) Git users: Linux kernel, GNOME, Perl 5, X.Org, Cairo, Qt Development Frameworks, Samba, OpenEmbedded, Ruby on Rails, Wine, Fluxbox, Openbox, Compiz Fusion, XCB, ELinks, XMMS2, e2fsprogs, GNU Core Utilities, DokuWiki (plenty of “geek-style” GNU/Linux stuff) ==> becomes a standard... but more tricky than SVN.