PageRenderTime 26ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Version_Control/vcs1/vcs1.rst

https://github.com/FOSSEE/sdes-stscripts
ReStructuredText | 337 lines | 210 code | 127 blank | 0 comment | 0 complexity | 38d800ba469f47e22071f5cd27393b9a MD5 | raw file
  1. .. Prerequisites
  2. .. -------------
  3. .. None
  4. .. Author : Primal Pappachan
  5. Internal Reviewer : Kiran Isukapatla
  6. <<<<<<< HEAD
  7. Date: May 10 , 2012
  8. =======
  9. Date: May 10 2012
  10. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  11. --------
  12. Script
  13. --------
  14. .. L1
  15. {{{ Show the first slide containing title, name of the production team along
  16. with the logo of MHRD}}}
  17. .. R1
  18. Hello friends and welcome to the tutorial on 'Version Control with Hg'
  19. .. L2
  20. {{{Show the slide containing the objectives}}}
  21. .. R2
  22. At the end of this tutorial you will be able to
  23. 1. Understand what is Version Control.
  24. #. Identify the need for using Version Control.
  25. #. Install Mercurial.
  26. .. L3
  27. {{{Show the slide 'what is version control'}}}
  28. .. R3
  29. <<<<<<< HEAD
  30. First, let's understand what 'Version Control' is. 'Version control' is a way
  31. to track files over time and share them. This allows access to earlier
  32. versions of a file(s) if and when required. It therefore enables us to make
  33. changes to the content of a file, view it's change log and collaborate on a
  34. single piece of work with a team of people.
  35. =======
  36. First, let's understand what 'Version Control' is.
  37. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  38. 'Version control' is a way to track files over time and share them.
  39. This allows access to earlier versions of a file(s) if and when required.
  40. It therefore enables us to make changes to the content of a file, view it's
  41. change log and collaborate on a single piece of work with a team of people.
  42. .. L4
  43. {{{Show the slide 'Home-brewed'}}}
  44. .. R4
  45. <<<<<<< HEAD
  46. Let's look at an example of home-brewed Version Control system.
  47. Version control is a way of backing up files, before making changes.
  48. Most people would have cooked up their own version control system,
  49. without realizing, there were tools built by others,
  50. that performs the task in a more organized and systematic way.
  51. =======
  52. Lets look at an example of home-brewed Version Control system.Version control
  53. is a way of backing up files, before making changes. Most people would have
  54. cooked up their own version control system.
  55. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  56. .. L5
  57. {{{Show the next slide 'Home-brewed'}}}
  58. .. R5
  59. Listing the files in the folder we observe that after a point of time it
  60. becomes difficult to maintain proper names for different versions of a file.
  61. .. L6
  62. {{{Show the slide 'Problems'}}}
  63. .. R6
  64. Let's look at the various problems associated with this set-up.
  65. 1. Name and changes made are not related or linked.
  66. <<<<<<< HEAD
  67. #. Cant track sequence of changes made to a file.
  68. #. Does not scale.
  69. .. L6
  70. =======
  71. #. Can't track sequence of changes made to a file.
  72. #. Does not scale.
  73. To overcome this problems there are more general purpose tools which can
  74. do this task in an organized way.
  75. .. L7
  76. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  77. {{{Show the slide 'The need for Version Control'}}}
  78. .. R7
  79. Now, let's move to identifying the needs for a 'Version Control System'.
  80. <<<<<<< HEAD
  81. We have seen that one of the main motivations to use a Version Control system
  82. is the ability to go back to a working version of a file,
  83. when something goes wrong.
  84. Below are a few more advantages of using an automated version control system.
  85. 1. By tracking the history of a project, any person may see the evolution of
  86. a project.
  87. =======
  88. We have seen that one of the main motivations to use a Version Control system
  89. is the ability to go back to a working version of a file, when something
  90. goes wrong. Below are a few more advantages of using an automated version
  91. control system.
  92. 1. By tracking the history of a project, any person may see the evolution
  93. of a project.
  94. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  95. 2. Allows for effective collaboration on a project, as everything is shared.
  96. <<<<<<< HEAD
  97. #. Helps to identify which additions have broken down a project and thus
  98. aids in efficient tracking down of the bugs.
  99. #. It is good for a one man show as it is for a big group of people working
  100. on a project.
  101. =======
  102. 3. Helps to identify which additions have broken down a project and thus
  103. aids in efficient tracking down of the bugs.
  104. 4. It is good for a one man show as it is for a big group of people working
  105. on a project.
  106. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  107. .. L8
  108. {{{Show the slide 'How does it work? - Analogy}}}
  109. .. R8
  110. It is, in some ways, similar to playing a video game. We generally play games
  111. <<<<<<< HEAD
  112. in stages. While playing, we save the game at some instances as per our choice.
  113. We continue playing, but we could, if necessary, choose to go back to one of
  114. the saved states and start over. In this manner, we could change the state of
  115. =======
  116. in stages. While playing, we save the game at some instances as per our choice.
  117. We continue playing, but we could, if necessary, choose to go back to one of the
  118. saved states and start over. In this manner, we could change the state of
  119. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  120. the game.
  121. .. L9
  122. {{{Show the slide 'Mercurial or hg'}}}
  123. .. R9
  124. Some of the Version Control tools available and used widely are: cvs, svn,
  125. git and so on.
  126. Each of these tools have their own merits and demerits. In this tutorial we
  127. shall learn how to use mercurial or hg.
  128. Mercurial or hg is:
  129. 1. Easy to learn and use
  130. #. Lightweight
  131. #. Scales excellently
  132. #. Written in Python
  133. .. L10
  134. {{{Show the slide 'Installation'}}}
  135. <<<<<<< HEAD
  136. Each of these tools have their own merits and demerits.
  137. In this tutorial we shall learn how to use mercurial or hg.
  138. =======
  139. .. R10
  140. >>>>>>> d0c0139c362aa0d04073fbb901ee81b3c47bf158
  141. Let's now get into Installation
  142. .. L10
  143. {{{Switch to terminal}}}
  144. ::
  145. $sudo apt-get install mercurial
  146. .. R10
  147. Type sudo apt-get install mercurial
  148. Type hg
  149. .. L12
  150. ::
  151. $hg
  152. .. R12
  153. It will give you the list of basic commands.
  154. .. L13
  155. ::
  156. $hg version
  157. .. R13
  158. and 'hg version' gives the version number of mercurial you are presently using.
  159. .. L14
  160. {{{Show the 'summary' slide'}}}
  161. .. R14
  162. This brings us to the end of the tutorial. In this tutorial, we have
  163. learnt:
  164. 1. What is Version Control.
  165. #. Identify the need for using Version Control
  166. #. Install Mercurial.
  167. .. L15
  168. {{{Show self assessment questions slide}}}
  169. .. R15
  170. Here are some self assessment questions for you to solve
  171. 1. Is Mercurial a Centralized VCS or Distributed Version Control System?
  172. #. How can you retrive the version of Mercurial installed?
  173. .. L16
  174. {{{Show the solutions slide to self assessment questions }}}
  175. .. R16
  176. And the answers,
  177. 1. Mercurial is a Distributed Version Control system.
  178. #. hg version
  179. .. L17
  180. {{{ Show the SDES & FOSSEE slide }}}
  181. .. R17
  182. Software Development techniques for Engineers and Scientists - SDES, is an
  183. initiative by FOSSEE. For more information, please visit the given link.
  184. Free and Open-source Software for Science and Engineering Education - FOSSEE, is
  185. based at IIT Bombay which is funded by MHRD as part of National Mission on
  186. Education through ICT.
  187. .. L18
  188. {{{ Show the ``About the Spoken Tutorial Project'' slide }}}
  189. .. R18
  190. Watch the video available at the following link. It summarises the Spoken
  191. Tutorial project.If you do not have good bandwidth, you can download and
  192. watch it.
  193. .. L19
  194. {{{ Show the `` Spoken Tutorial Workshops'' slide }}}
  195. .. R19
  196. The Spoken Tutorial Project Team conducts workshops using spoken tutorials,
  197. gives certificates to those who pass an online test.
  198. For more details, contact contact@spoken-tutorial.org
  199. .. L20
  200. {{{ Show the ``Acknowledgements'' slide }}}
  201. .. R20
  202. Spoken Tutorial Project is a part of the "Talk to a Teacher" project.
  203. It is supported by the National Mission on Education through ICT, MHRD,
  204. Government of India. More information on this mission is available at the
  205. given link.
  206. .. L21
  207. {{{Show the thank you slide}}}
  208. .. R21
  209. Hope you have enjoyed this tutorial and found it useful.
  210. Thank you