diff options
-rw-r--r-- | Latex/Latex1/latex_install_script.rst | 51 | ||||
-rw-r--r-- | Latex/Latex2/latex_intro_script.rst | 64 | ||||
-rw-r--r-- | Latex/Latex3/latex_basics_and_structure_script.rst | 119 | ||||
-rw-r--r-- | Latex/Latex6/latex_math_biblo_beamer_script.rst | 67 | ||||
-rw-r--r-- | TDD/getting_started_with_tdd/tdd1.tex | 69 | ||||
-rwxr-xr-x | TDD/getting_started_with_tdd/tdd1_script.rst | 8 | ||||
-rw-r--r-- | TDD/using_python_framework_for_tdd/tdd2.tex | 20 | ||||
-rwxr-xr-x | TDD/using_python_framework_for_tdd/tdd2_script.rst | 51 | ||||
-rw-r--r-- | Version_Control/vcs3/vcs3.rst | 115 | ||||
-rw-r--r-- | Version_Control/vcs4/vcs4.rst | 137 |
10 files changed, 398 insertions, 303 deletions
diff --git a/Latex/Latex1/latex_install_script.rst b/Latex/Latex1/latex_install_script.rst index 2013e40..bae8060 100644 --- a/Latex/Latex1/latex_install_script.rst +++ b/Latex/Latex1/latex_install_script.rst @@ -1,16 +1,29 @@ +.. Objectives +.. ---------- + +.. At the end of this tutorial, you will + +.. Install LaTeX on your computer. +.. Learn how to install a plug-in for a TeX editor. +.. Configure the TeX editor with the LaTeX plug-in. +.. Useful information on some LaTeX packages. +.. Compile a TeX file to pdf. + .. Prerequisites .. ------------- -.. 1. You'll need a TeX distribution. -... A good text editor and a DVI or PDF viewer. -... Updated Linux distribution as Operating System. -... Working internet connection (for installation over the network). +.. You'll need a TeX distribution. +.. A good text editor and a DVI or PDF viewer. +.. Updated Linux distribution as Operating System. +.. Working internet connection (for installation over the network). -.. Author: Kiran Isukapatla < kiran [at] fossee [dot] in > -.. Internal Reviewer: -.. Check-list OK?: <put date stamp here, if OK> --------- +.. Author : Kiran Isukapatla < kiran [at] fossee [dot] in > + Internal Reviewer : Kiran Isukapatla < kiran [at] fossee [dot] in > + External Reviewer : + Langauge Reviewer : + Checklist OK? : 25-Feb-2012 + Script -------- @@ -28,13 +41,13 @@ Hello friends, welcome to the tutorial on 'LaTeX Installation'. .. R2 -At the end of this tutorial you will be able to: +At the end of this tutorial you will be able to -.. 1. Install LaTeX on your computer. -.. #. Learn how to install a plug-in for a TeX editor. -.. #. Configure the TeX editor with the LaTeX plug-in. -.. #. Useful information on some LaTeX packages. -.. #. Compile a TeX file to pdf. +1. Install LaTeX on your computer. +#. Learn how to install a plug-in for a TeX editor. +#. Configure the TeX editor with the LaTeX plug-in. +#. Useful information on some LaTeX packages. +#. Compile a TeX file to pdf. .. L3 @@ -111,11 +124,11 @@ This produces an output file, in the pdf format. This brings us to the end of the tutorial. In this tutorial, we have learnt to, -.. 1. Install LaTeX on your computer. -.. #. How to install a plug-in for a TeX editor. -.. #. Configure the TeX editor with the LaTeX plug-in. -.. #. Choose a LaTeX packages as per requirement. -.. #. Compile a TeX file to pdf. +1. Install LaTeX on your computer. +#. How to install a plug-in for a TeX editor. +#. Configure the TeX editor with the LaTeX plug-in. +#. Choose a LaTeX packages as per requirement. +#. Compile a TeX file to pdf. .. L11 diff --git a/Latex/Latex2/latex_intro_script.rst b/Latex/Latex2/latex_intro_script.rst index e9ca8c3..a5cdc57 100644 --- a/Latex/Latex2/latex_intro_script.rst +++ b/Latex/Latex2/latex_intro_script.rst @@ -23,7 +23,7 @@ Internal Reviewer : Kiran Isukapatla < kiran [at] fossee [dot] in > External Reviewer : Langauge Reviewer : - Checklist OK? : <put date stamp here, if OK> + Checklist OK? : 25-Feb-2012 Script ------ @@ -35,7 +35,7 @@ team along with the logo of MHRD }}} .. R1 -Hello Friends and welcome to the tutorial on introduction to LaTeX. +Hello Friends and welcome to the tutorial on 'Introduction to LaTeX'. .. L2 @@ -49,7 +49,7 @@ At the end of this tutorial, you will #. Know why we prefer LaTeX? #. Know the advantages and disadvantages of typesetting documents using the LaTeX approach. -#. Have a description, of a typical work flow; which uses LaTeX to typeset +#. Have a description of a typical work flow; which uses LaTeX to typeset documents. #. Recognize and differentiate between LaTeX commands, LaTeX comments and special characters, spacing and actual document content. @@ -61,8 +61,8 @@ At the end of this tutorial, you will .. R3 -Before beginning this tutorial, we would suggest having a working installation of -LaTeX on your computer. You can do this by completing the tutorial titled +Before beginning this tutorial, we would suggest having a working installation +of LaTeX on your computer. You can do this by completing the tutorial on "Installing LaTeX". .. L4 @@ -75,10 +75,10 @@ LaTeX began as TeX, a computer program originally created by Donald E. Knuth. Its was designed mainly to aid typesetting of text and mathematical formulae. -LaTeX is a typesetting program that produces excellently typeset documents. +It is a typesetting program that produces excellently typeset documents. Typesetting is placing text onto a page with all the style formatting defined, -so that content looks as intended. It is extensively used for producing high -quality scientific and mathematical documents. It may also be used for +so that the content looks as intended. It is extensively used for producing +high quality scientific and mathematical documents. It may also be used for producing other kinds of documents, ranging from simple one page articles to complete books. @@ -92,10 +92,10 @@ technology. .. R5 -Below are some of the reasons we prefer LaTeX +Why we prefer LaTeX? (a) LaTeX offers excellent visual quality. -(b) It handles typesetting and lets you focus on content. -(c) Its makes writing complex math equation extremely simple. +(b) Handles typesetting and lets you focus on content. +(c) Makes writing complex math equation extremely simple. (d) It is also a standard used widely, especially by the scientific community. .. L6 @@ -107,10 +107,10 @@ Below are some of the reasons we prefer LaTeX We can define LaTex as a document based markup language. This sentence is deceptively simple, as it reveals a lot about LaTex. We now break this sentence up as follows -Mark-up — a system of annotating text, adding extra information to -specify structure and presentation of text -Document based markup - you don’t have to worry about each -element individually. +Mark-up: a system of annotating text, adding extra information to specify +structure and presentation of text. +Document based markup: you don’t have to worry about each element individually. + This is essentially a fancy way of saying,LaTeX handles typesetting and lets you focus on content. @@ -136,7 +136,7 @@ of the document. .. R8 -Some of the disadvantages of using LaTeX approach to typesetting is +Some of the disadvantages of using LaTeX approach to typesetting are (1) Designing a whole new layout is difficult. (2) LaTeX is not a word processor, that is the document author is not expected to worry about presentation details like the size of font, for example. @@ -169,7 +169,7 @@ The resultant PDF files can be viewed using standard tools on most platforms .. R10 LaTeX, like most utilities in Linux, LaTeX is case sensitive. Commands begin -with a backslash.LaTeX environments have a begin and end marker. The begin and +with a backslash. LaTeX environments have a begin and end marker. The begin and end document commands, mark the beginning and the end of the content of the LaTeX document. The text in between the begin and end commands is typeset in the output document.Any content after \end{document} is ignored. The type of @@ -181,9 +181,7 @@ command and ends with an end command. So, as expected LaTeX ignores anything that is written after the \end{document} command. Essentially, anything written after the \end{document} command turns -out to be a comment. But, how do we write comments with in the document. % is -the character to indicate comments. Anything written after a % symbol in a -line, is ignored. +out to be a comment. .. L11 @@ -191,11 +189,14 @@ line, is ignored. .. R11 +But, how do we write comments with in the document. % is +the character to indicate comments. Anything written after a % symbol in a +line, is ignored. But what if we wanted to insert the % symbol in the document? We can do so by escaping it with a \ (backslash). % is one of the many special characters in -LaTeX. The others are, ~ # $ ^ & _ { } \. All of them, except the \ itself, can -be inserted by escaping it with a \. To insert a \ in our document, we use the -command \textbackslash. +LaTeX. The others are shown on the screen. All of them, except the \ itself, +can be inserted by escaping it with a \. To insert a \ in our document, we use +the command \textbackslash. What would happen if we escape a \ with a \? A double backslash is actually another command. It inserts a new line in the @@ -203,7 +204,8 @@ typeset document. Normally LaTeX automatically spaces the given input optimally. But, sometimes we have to insert manual line breaks. The \\ command or \newline command is used to insert a newline in the output document. Line breaks in the input document, do not translate into line breaks in the output document. A -single line break in the input document, doesn't cause any change in the output. +single line break in the input document, doesn't cause any change in the +output document. A single empty line causes a change in paragraphs in the output. (Multiple empty lines are equivalent to a single empty line.) Similarly, multiple spaces @@ -215,7 +217,7 @@ are treated as a single space. .. R12 -Now, we try to create a simple LaTeX document. Pause the tutorial and type the +Now, try to create a simple LaTeX document. Pause the tutorial and type the content shown on the screen in a text editor. Save the file as temp.tex .. L13 @@ -234,8 +236,7 @@ file temp.tex into a DVI file, we use the following command latex temp.tex. -The output file would be temp.dvi.On Gnu/Linux use a program like xdvi to view -the output file. +The output file would be temp.dvi. .. L14 @@ -249,9 +250,6 @@ file temp.tex into a PDF file, we use the following command pdflatex temp.tex -The output file would be temp.pdf.On Gnu/Linux use a program like evince to -view the output file. - Please note that, throughout this course we shall be using pdflatex to compile our documents. @@ -296,11 +294,9 @@ same. And the answers, -1. We can use the following command to convert temp.dvi to temp_1.ps -dvips -o temp_1.ps temp.dvi +1. dvips -o temp_1.ps temp.dvi -2. We can use the following command to convert temp.dvi to temp_1.pdf -dvipdfm -o temp_1.pdf temp.dvi +2. dvipdfm -o temp_1.pdf temp.dvi .. L18 diff --git a/Latex/Latex3/latex_basics_and_structure_script.rst b/Latex/Latex3/latex_basics_and_structure_script.rst index 24a618e..d1db08b 100644 --- a/Latex/Latex3/latex_basics_and_structure_script.rst +++ b/Latex/Latex3/latex_basics_and_structure_script.rst @@ -6,10 +6,10 @@ .. 1. Understand basic structure of a LaTeX document, its various document .. classes and loading packages that add new features to the LaTeX system. .. #. Create a LaTeX document with a title and an abstract. -.. #. Create numbered and non-numbered sections and subsections in a LaTeX +.. #. Create numbered and non-numbered sections and sub-sections in a LaTeX .. document. .. #. Create an appendix in a LaTeX document. -.. #. Create a table of content in a LaTeX document. +.. #. Create a 'table of contents' in a LaTeX document. .. Prerequisites .. ------------- @@ -18,22 +18,22 @@ .. Author : Harish Badrinath < harish [at] fossee [dot] in > - Internal Reviewer : + Internal Reviewer : Kiran Isukapatla < kiran [at] fossee [dot] in > External Reviewer : Langauge Reviewer : - Checklist OK? : <put date stamp here, if OK> + Checklist OK? : 26-Feb-2012 Script ------ .. L1 -{{{ Show the first slide containing title, name of the production +{{{ Show the first slide containing the title, name of the production team along with the logo of MHRD }}} .. R1 -Hello friends and welcome to the tutorial titled "Basics of LaTeX and its +Hello friends and welcome to the tutorial on "Basics of LaTeX and its document structure". .. L2 @@ -49,7 +49,7 @@ At the end of this tutorial, you will be able to #. Create a LaTeX document with a title and an abstract. #. Create numbered and non-numbered sections and subsections in a LaTeX document. -#. Create an appendix in a LaTeX document. +#. Create an 'appendix' in a LaTeX document. #. Create a table of content in a LaTeX document. .. L3 @@ -58,8 +58,8 @@ At the end of this tutorial, you will be able to .. R3 -Before beginning this tutorial,we would suggest having a working installation of -LaTeX and suggest you to complete the tutorial titled "Introduction to LaTeX". +Before beginning this tutorial, we would suggest having a working installation +of LaTeX and also complete the tutorial "Introduction to LaTeX". .. L4 @@ -68,7 +68,7 @@ LaTeX and suggest you to complete the tutorial titled "Introduction to LaTeX". .. R4 We begin this tutorial with an example introduced in the previous tutorial. -The text in the document is illustrative and can be replaced replaced by a +The text in the document is illustrative and can be replaced by a single alpha-numeric character, for example. When done so, the resulting document could be described as the shortest possible LaTeX input document, that creates an output file. It consists of 3 LaTeX commands and one line/character @@ -91,7 +91,7 @@ The first line reads .. R5 -which more generally can be written as +documentclass article, which more generally can be written as .. L6 @@ -99,13 +99,15 @@ which more generally can be written as .. R6 +documentclass parameters DocumentClass. Where documentclass is a LaTeX command. Parameters specify if you want to use a non default font size, for example. More specifically the parameters can be used to alter things like font size of the document, paper size, two sided or single sided printing, etc, for each class, that is supported by LaTeX. -The supported classes have a few differences, in how the content of the document is typeset. +The supported classes have a few differences, in how the content of the document +is typeset. .. L7 @@ -116,7 +118,7 @@ The supported classes have a few differences, in how the content of the document We now look at a hypothetical documentclass command. The command being shown on the screen, instructs LaTeX to Create a new document of class report. The available classes are article, proc, -report, book, slides, letter. +report, book, slides and letter. 12 pt: sets the font size of main font. Other are relatively adjusted. 10pt is the default. a4paper: specifies the paper size @@ -129,10 +131,11 @@ with a square in the margin .. R8 -This statement can be used optionally and is used to include packages, which are -used to extend the LaTeX's capabilities. There are a number of packages that are -included by default with LaTeX2 base distribution. You can use the texdoc -command for accessing package documentation. +The usepackage command is called with package name argument, prepended with +optional parameters. It is included optionally in a LaTeX document, to include +packages, which further extend the LaTeX's capabilities. There are a number of +packages that are included by default with LaTeX2 base distribution. You can use +the texdoc command for accessing package documentation. .. L9 @@ -142,7 +145,7 @@ command for accessing package documentation. We add the title, the author and the date to the document before the \begin{document} directive. We compile the document to see if the details -appear in the document, but they donot. +appear in the document, but they do not. .. L10 @@ -151,8 +154,10 @@ appear in the document, but they donot. .. R10 The command \maketitle adds title, authors name and date to the output file. -Of these only the date is optional. If date command is specified, then the given -date is used else today's date is used. +Of these only the date is optional. The date command can be called with an +optional parameter. If the optional parameter is not provided, the date of +compilation of the LaTeX document is used. The parameter, if specified is used +to override this value. .. L11 @@ -160,10 +165,10 @@ date is used else today's date is used. .. R11 -The abstract command is used to insert abstract of a document, into the output -file.Place it in the location, where you want your abstract to present in -the document. It is available for the document classes article and report, but -not book +The abstract command is used to insert the abstract of a document, into the +output file.Place it in the location, where you want your abstract to present +in the document. It is available for the document classes article and report, +but not for the book class. .. L12 @@ -174,9 +179,9 @@ not book Titles chapters and sections are used to help the user find his or her way through your work. The following commands are available in the article class: section, subsection, subsubsection, paragraph and sub paragraph. The default -behavior is to use numbered sections. We can use un-numbered sections appending -* to section command. If you want to split your document without influencing the -section or chapter numbering use the part command. +behavior is to use numbered sections. We can use un-numbered sections by +appending * to section command. If you want to split your document without +influencing the section or chapter numbering, use the part command. .. L13 @@ -194,8 +199,8 @@ file shown in the slide we notice that subsections are not numbered. .. R14 -We can change this behavior with the command setcounter , calling it as shown -in the slide. +We can change this behavior with the setcounter command, calling it with +parameters shown on the slide. .. L15 @@ -203,12 +208,13 @@ in the slide. .. R15 -Appendix can be added to the document using \appendix command. any content after -\appendix will be added to the appendix. In the report or book class, we have to -use \chapter to indicate that the chapters are to be numbered as appendices. +Appendix can be added to the document using \appendix command. Any content +after the \appendix command will be added to the appendix. In the report or +book class, we have to use \chapter command to indicate that the chapters are +to be numbered as appendices. -similarly for the article class we have to use the section command to indicate -that sections are to be numbered as appendices. +Similarly for the article class, we have to use the \section command to indicate +the sections that are to be numbered as appendices. .. L16 @@ -216,19 +222,15 @@ that sections are to be numbered as appendices. .. R16 -Lets add a Table of content to the document. The LaTeX command to add a TOC to a -document is using \tableofcontents command and is placed at the point at which -the table of content is to be placed. - -Now, compile the document and look at the output document. It does not have the table of contents! - -We compile our LaTeX file as usual. On the first compilation only the "Contents" -heading appears in the document, but the actual table does not appear. You will -need to compile your document once more, for the actual table to appear in your -document. On the first run, LaTeX has gone through your document and generated -a temporary file (.toc), with the entries that should go into the table of -contents. These entries are made, when you compile your document for the second -time. +We use the \tableofcontents command to add a TOC to a document is and is placed +at the point at which the table of content is to be placed. It must be noted +that \tableofcontents command requires the LaTeX input file to be compiled +twice. On the first compilation only the "Contents" heading appears in the +document, but the actual table does not appear. LaTeX has now gone through +the input document and generated a temporary file (.toc), with the entries that +should go into the table of contents. When the input document is compiled for +the second time, these entries are made and the actual table will appear in +your output document. Note that any section/block that has been numbered automatically appears in the table of contents. It is possible to get un-numbered sections, for instance a @@ -241,9 +243,9 @@ Preface or a Foreword section to appear in the Table of Contents. .. R17 Un-numbered sections are added to TOC using \addcontentsline command. -For example we use the command -\addcontentsline{toc}{section}{Intro} -where "Intro" is the text that you want to appear in the Table of contents. +For example we use the addcontentsline command called with the parameters +"{toc}{section}{Intro}", for the text "Intro" to appear in the Table of +contents. .. L18 @@ -251,8 +253,8 @@ where "Intro" is the text that you want to appear in the Table of contents. .. R18 -Write a LaTeX script that creates a document of type article, which contains both -a table of content and an appendix. The table of content should be at the +Write a LaTeX script that creates a document of type article, which contains +an appendix and a table of contents. The table of content should be at the beginning of the document and the appendix at the end. The book should contain two chapters, with the first chapter containing two @@ -299,9 +301,9 @@ Here are some self assessment questions for you to solve and produces the intended result, that is to produce a book with two chapters and an appendix. - 2. subsection command can be placed at any arbitrary level. If they get numbered -by default using the appropriate setcounter command and secnumdepth parameter, -do they automatically appear in the table of content ?? + 2. subsection command can be placed at any arbitrary level. If they get +numbered by default using the appropriate setcounter command and secnumdepth +parameter, do they automatically appear in the table of content ?? .. L22 @@ -311,9 +313,10 @@ do they automatically appear in the table of content ?? And the answers, -1. Although the given file looks syntactically valid, the output file is not what -we expected. This is mainly because we are trying to use the section command to -create sections in the appendix, for a document whose type is given as a book. +1. Although the given file looks syntactically valid, the output file is not +what we expected. This is mainly because we are trying to use the section +command to create sections in the appendix, for a document whose type is given +as a book. 2. No, the \tableofcontents command normally shows only numbered section headings, and only down to the level defined by the tocdepth counter. diff --git a/Latex/Latex6/latex_math_biblo_beamer_script.rst b/Latex/Latex6/latex_math_biblo_beamer_script.rst index de88c6a..a1de297 100644 --- a/Latex/Latex6/latex_math_biblo_beamer_script.rst +++ b/Latex/Latex6/latex_math_biblo_beamer_script.rst @@ -67,19 +67,20 @@ In general, it is advisable to use the AMS-LaTeX bundle to typeset mathematics in LaTeX. AMS-LaTeX is a collection of packages and classes for mathematical typesetting. -We can load amsmath by issuing the \usepackage{amsmath} in the preamble.It must +We can load amsmath by issuing the \usepackage{amsmath} in the preamble.It must be noted that amsmath is included in the base distribution of LaTex, in atleast the most recent versions. -Math formulae can be embedded in two ways, - “inline” or “text style ” method, which is done by enclosing the - required command and text within two dollar signs or between an backslash - opening bracket and backslash closing bracket. +Math formulae can be embedded in one of two ways. The first is, “inline” or +“text style ” method, which is done by enclosing the required commands and +text within two dollar signs or between an backslash opening bracket and +backslash closing bracket. - By enclosing them in a dedicated environment respectively/displayed style. +The second method is by enclosing them in a dedicated environment respectively, +this is also called displayed style. The most common LaTeX environment used to typeset mathematical formulae is -from equation family. +from the equation family. .. L5 @@ -89,8 +90,8 @@ from equation family. .. R5 An environment like bmatrix for example, is used to render a matrix. The syntax -for specifying a matrix is similar to that used in the tabular environment. The -& symbol is used for demarcating columns and \\ is used to demarcate rows. +for specifying a matrix is similar to that used for the tabular environment. +The & symbol is used for demarcating columns and \\ is used to demarcate rows. There are 5 other matrix environments and each have different/no type of delimiters. A table showing the data is being shown on the screen. The matrix @@ -102,7 +103,7 @@ and its allied environments are defined by the amsmath package. .. R6 -The screen shows the an example, that renders different types of matrices using +The screen shows the example, that renders different types of matrices using LaTeX. It also shows the two ways in which mathmatical formulae can be embedded into @@ -118,11 +119,11 @@ Please pause the tutorial and go through the example shown on the screen. .. R7 To typeset superscripts in LaTeX, the carat character is used. The carat -operator just acts on the next character. +operator just acts on the immediate next character. To typeset subscripts in LaTeX, the underscore character is used. The carat -operator just acts on the next character. -Multiple characters and ambiguity is resolved by grouping them using opening -and closing curly brackets. +operator just acts on the immediate next character. +Multi character grouping and ambiguity is resolved by grouping them using +opening and closing curly brackets. .. L8 @@ -130,10 +131,10 @@ and closing curly brackets. .. R8 -To typeset the summation symbol, use the sum command. Similarly, the integral -symbol is obtained using the int command. The upper and lower limits, for both -the sum and int command are specified using the carat and underscore characters -, respectively. +To typeset the summation symbol, we use the sum command. Similarly, the +integral symbol is obtained using the int command. +The upper and lower limits, for both the sum and int command are specified +using the carat and underscore characters, respectively. .. L9 @@ -141,12 +142,12 @@ the sum and int command are specified using the carat and underscore characters .. R9 -We now move onto using the equation environment to render mathematical formulae, -which are numbered. Another environment called equation star environment renders +We now move onto using the equation environment to render mathematical formulae +which are numbered. Another allied environment called equation star renders unnumbered equations. -Backslash and opening square bracket and its counterpart the backslash -closing square bracket is a short hand for equation star environment. +Backslash opening square bracket and its counterpart the backslash closing +square bracket is a short hand for equation star environment. There is no similar shorthand for equation environment (i.e, the numbered equation environment). @@ -174,11 +175,12 @@ ampersand symbol. .. R11 -To typeset fractions use the frac command. To typeset surds, we use the sqrt -command with the optional paramter of [n]. +To typeset fractions we use the frac command and to typeset surds, we use the +sqrt command with the optional paramter of [n]. The optional parameter for the +sqrt command is used to render roots not equal to 2. -Please note that there is a special command dfrac, that can be used to render -fractions as if its placed in display mode and is meant to be used even in +Please note that there is a special command dfrac that can be used to render +fractions, as if its placed in display mode and is meant to be used even in inline mode. .. L12 @@ -210,13 +212,13 @@ Each entry of the bibliography begins with the command bibitem. It takes an optional parameter called label and a name for the entry.The label option replaces the numbers from the auto enumeration with the labels given. -The to cite the bibliography item within the document, we use the cite command, +Then to cite the bibliography item within the document we use the cite command, containing name as a parameter. We start the bibliography environment with a numerical parameter. This defines how much space is to be reserved for all the labels. If for example, we have less than 10 items in the Bibliography we would begin -the bibliography environment with an parameter, whose value is 9. +the bibliography environment with a parameter, whose value is 9. .. L14 @@ -226,9 +228,9 @@ the bibliography environment with an parameter, whose value is 9. .. R14 It is highly recommended to use beamer to create presentations, especially when -you are using LaTeX typesetting your report. This is mainly because, it would be -really easy to reuse the LaTeX that you have used for the report/document for -the presentation as well. +you are using LaTeX typesetting your report. This is mainly because it would be +really easy to reuse the LaTeX content that you have already used for the +report/document for, the presentation as well. We begin a beamer document with the documentclass being set to beamer. @@ -253,7 +255,8 @@ We must also note that the title page of the presentation can be set like any other LaTeX document. If we have to use fragile environemts like verbatim or lstlisting inside a -slide, then we have to pass an additional parameter to begin frame, fragile. +slide, then we have to pass an additional parameter to begin frame, namely +fragile. Overlays and simple animation can be achieved using the pause command. diff --git a/TDD/getting_started_with_tdd/tdd1.tex b/TDD/getting_started_with_tdd/tdd1.tex index f056ce5..042c5c4 100644 --- a/TDD/getting_started_with_tdd/tdd1.tex +++ b/TDD/getting_started_with_tdd/tdd1.tex @@ -254,7 +254,7 @@ def fibonacci(n): \begin{itemize} -\item Undestand the basic steps involved in Test driven development. +\item Understand the basic steps involved in Test driven development. \item Design a TDD approach for a given \texttt{fibonacci} function. \end{itemize} @@ -267,20 +267,75 @@ def fibonacci(n): \begin{enumerate} -\item ? +\item Design a TDD approach for a \texttt{factorial} function. \vspace{8pt} -\item ? +\item Design a TDD approach for an \texttt{armstrong} function. \end{enumerate} \end{frame} -\begin{frame} + +\begin{frame}[fragile] \frametitle{Solutions} \label{sec-10} +\begin{enumerate} +\vspace{15pt} +\item +{\tiny +\begin{lstlisting} +def factorial(n): + if n < 0 : + return None; + if n == 1: + return 1 + else: + return n * factorial (n - 1) +if __name__ == '__main__': + f = factorial(3) + if f != 6 : + print 'Test Failed...' + exit (1) + f = factorial(-5) + if f != None : + print 'Test Failed...' + exit (1) + print 'All tests passed...' +\end{lstlisting} +} +\end{enumerate} +\end{frame} - +\begin{frame}[fragile] +\frametitle{Solutions} +\label{sec-10} \begin{enumerate} -\item \vspace{15pt} -\item +\item +{\tiny +\begin{lstlisting} +def armstrong(n): + sum = 0 + temp = 0 + remainder = 0 + temp = n + while temp > 0 : + remainder = temp % 10 + sum = sum + remainder * remainder * remainder + temp = temp / 10 + if n == sum: + return True + else: + return False +if __name__ == '__main__': + is_armstrong = armstrong(0) + if is_armstrong != True: + print "this is not armstrong" + exit(1) + is_armstrong = armstrong(371) + if is_armstrong == True: + print "this is armstrong" + exit(1) + print 'All tests passed...' +\end{lstlisting} +} \end{enumerate} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/TDD/getting_started_with_tdd/tdd1_script.rst b/TDD/getting_started_with_tdd/tdd1_script.rst index 9da1613..88c1227 100755 --- a/TDD/getting_started_with_tdd/tdd1_script.rst +++ b/TDD/getting_started_with_tdd/tdd1_script.rst @@ -175,9 +175,9 @@ This brings us to the end of the tutorial.In this tutorial, .. R14 Here are some self assessment questions for you to solve - 1. - 2. + 1. Design a TDD approach for a factorial function. + 2. Design a TDD approach for an armstrong function. .. L14 @@ -186,9 +186,9 @@ Here are some self assessment questions for you to solve .. R15 And the answers are, - 1. + 1. {{{ show answer slide-1 }}} - 2. + 2. {{{ show answer slide-2 }}} .. L15 diff --git a/TDD/using_python_framework_for_tdd/tdd2.tex b/TDD/using_python_framework_for_tdd/tdd2.tex index 561f4a2..1aa409f 100644 --- a/TDD/using_python_framework_for_tdd/tdd2.tex +++ b/TDD/using_python_framework_for_tdd/tdd2.tex @@ -294,7 +294,7 @@ if __name__ == '__main__': \item Allows us to pick and choose which tests to run \item Helps output the test-results and aggregate them in various formats - \item Not part of the Python distribution itself + \item Not part of the Python distribution itself \footnote{$http://packages.python.org/distribute/easy$\textunderscore$install.html$} \begin{lstlisting} $ easy_install nose \end{lstlisting} %$ @@ -328,9 +328,19 @@ $ nosetests \begin{enumerate} -\item ? +\item An underlying assumption of TDD is that you have a testing framework available to you.\\ + \begin{enumerate} + \item True + \item False + \end{enumerate} \vspace{8pt} -\item ? +\item Test-Driven Development is an advanced technique of using automated \_\_\_\_\_\_\_\_\_ tests to drive the design of software and force deoupling of dependecies.\\ + \begin{enumerate} + \item Incremental + \item Unit + \item Programming + \item Object + \end{enumerate} \end{enumerate} \end{frame} \begin{frame} @@ -339,9 +349,9 @@ $ nosetests \begin{enumerate} -\item +\item True \vspace{15pt} -\item +\item Unit \end{enumerate} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/TDD/using_python_framework_for_tdd/tdd2_script.rst b/TDD/using_python_framework_for_tdd/tdd2_script.rst index d90c5eb..b775b01 100755 --- a/TDD/using_python_framework_for_tdd/tdd2_script.rst +++ b/TDD/using_python_framework_for_tdd/tdd2_script.rst @@ -155,7 +155,7 @@ tests into collections and improves reporting. .. L11 -{{{ Switch to slide-11, Unittest }}} +{{{ Switch to slide-11(stay for 5 seconds) and switch to slide 12 }}} .. R12 @@ -170,7 +170,7 @@ files too. .. L12 -{{{ Show slide13, unittesting fibonacci.py }}} +{{{ Show slide13(stay for 3 seconds) and switch to slide14 }}} .. R13 @@ -183,10 +183,31 @@ and closes ``fibonacci_testcases.dat`` file. .. L13 -{{{ Show slide13(stay for 3 seconds) and switch to slide14 }}} +{{{ Show slide 15, test_fibonacci.py }}} + + +.. R14 + +Individual unittests and doctests may not be fiseable to use when +multiple files are to be tested. For this purpose we have a python +utility called Nose. Nose test aggregates unittests and doctests. Nose +test utility can be installed by using the following command +``$ easy_install nose``. It can be run by issuing the command ``$ nosetests`` +in the root level of the directory containing all your python files to be tested. + +.. L14 + +{{{ Show slide15(for 5 seconds), nose tests }}} + +{{{ Follow the commands in terminal. }}} +:: + + $ easy_install nose + $ nosetests + +.. R15 -.. R23 This brings us to the end of the tutorial.In this tutorial, we have learnt to, @@ -195,38 +216,38 @@ we have learnt to, #. Design a Test driven approach for a given ``fibonacci`` function. -.. L23 +.. L15 -{{{ switch to slide-13,Summary }}} +{{{ switch to slide-17,Summary }}} -.. R14 +.. R16 Here are some self assessment questions for you to solve 1. 2. -.. L14 +.. L16 -{{{ switch to slide-14, Evaluation }}} +{{{ switch to slide-18, Evaluation }}} -.. R15 +.. R17 And the answers are, 1. 2. -.. L15 +.. L17 -{{{ switch to slide-15 ,Solutions}}} +{{{ switch to slide-19 ,Solutions}}} -.. R16 +.. R18 Hope you have enjoyed this tutorial and found it useful. Thank you! -.. L16 +.. L18 -{{{ Switch to slide-16, Thank you}}} +{{{ Switch to slide-20, Thank you}}} diff --git a/Version_Control/vcs3/vcs3.rst b/Version_Control/vcs3/vcs3.rst index 3913dc9..cd659ec 100644 --- a/Version_Control/vcs3/vcs3.rst +++ b/Version_Control/vcs3/vcs3.rst @@ -1,6 +1,6 @@ --------------------------------- -Version Control using Hg Part 3 +Version Control using Hg - Part 3 --------------------------------- .. Prerequisites @@ -9,8 +9,8 @@ Version Control using Hg Part 3 .. Version Control with hg - Part 1,2 .. Author : Primal Pappachan - Internal Reviewer : - Date: Jan 27, 2012 + Internal Reviewer : Kiran Isukapatla + Date: Feb 21, 2012 -------- @@ -19,12 +19,12 @@ Script .. L1 -*{{{ Show the first slide containing title, name of the production team along +*{{{ Show the first slide containing the title, name of the production team along with the logo of MHRD}}}* .. R1 -Hello friends and welcome to the tutorial on 'Version Control with Hg' +Hello friends and welcome to the third part of the tutorial on 'Version Control with Hg' .. L2 @@ -33,7 +33,7 @@ Hello friends and welcome to the tutorial on 'Version Control with Hg' .. R2 Please make sure that you have gone through the following tutorials before you -continue on this tutorial +continue on this tutorial. .. L3 @@ -43,9 +43,9 @@ continue on this tutorial At the end of this tutorial you will be able to -1. Learn how to view and revert changes made to files in a repository. +1. Learn how to 'view' and 'revert' changes made to files in a repository. -#. Learn how to share repositories and deal with simultaneous conflicting change +#. Learn how to 'share' repositories and deal with 'simultaneous conflicting change'. .. L4 @@ -53,7 +53,7 @@ At the end of this tutorial you will be able to .. R4 -Let's first try to find out why we should commit inspite of the additional +Let's first try to find out why we should commit, inspite of the additional operational costs and loss of time? .. L4 @@ -62,9 +62,9 @@ operational costs and loss of time? .. R4 -While you were wondering, let's say your friend walks in and together you make -a lot of changes. 1. You replace all the occurrences of & in chapter1.txt with -and. 2. You delete the chapter3.txt file. +While you were wondering, let's say your friend walks in, and together you make +a lot of changes. 1. You replace all the occurrences of '&' in 'chapter1.txt' with +'and'. 2. You delete the 'chapter3.txt' file. .. L5 @@ -78,17 +78,17 @@ and. 2. You delete the chapter3.txt file. .. R6 -But after a while, you realize that these changes are unwarranted. You want to -go back to the previous state, undoing all the changes that you made, after -your friend arrived. +But after a while, you realize that these changes are 'unwarranted'. You want to +go back to the previous state, undoing all the changes that were made after +your friend's arrival. -The undo in your editor may allow undoing some changes(if you haven't closed it -after making the changes) but there's no way of getting back deleted files -using your editor. That's where mercurial comes to the rescue. +The 'undo' in your editor may allow undoing some changes. However +there is no way of getting back deleted files using this feature. +This is where 'Mercurial' comes to the rescue. -We shall use the revert command of hg to undo all the changes after the last -commit. If we want to undo all the changes, we use the revert command with the ---all argument, else use revert command with specific filename as argument. +We shall use the 'revert' command of hg to undo all the changes after the last +commit. We use the revert command with the '--all' argument for undoing +all changes, else use revert command with 'specific filename' as argument. .. L5 @@ -108,14 +108,14 @@ commit. If we want to undo all the changes, we use the revert command with the .. R5 -After running this command, you can see that all deleted files have been -restored. But hg has generated new files with .orig extension. Mercurial -actually doesn't like to delete any of the changes that you have made. So, it -makes a back-up of the already existing files in the present state and gives -you back the old file. +After running this command, you can see that all the deleted files have been +restored. However, hg has generated new files with '.orig' extension. Mercurial +actually doesn't like to delete any of the changes that you've made. So, it +makes a backup of the already existing files in the present state and gives +you the old file. -If we now decide, that we want to redo the changes that we had done to the -existing file, we can just overwrite it with the backed up file. +If we now decide that we want to redo the changes that we had done to the +existing file, we can overwrite it with the backed up file. .. L6 @@ -131,9 +131,9 @@ existing file, we can just overwrite it with the backed up file. .. R6 -Let's say we now want to commit these changes, but we are not sure of all the -changes that we have made to the file, since it's been a while after we made -the changes. We could use the diff command to see all the changes that have +Now, let's say we want to commit all the changes. We are not sure of all the +changes done, since it's been a while after we made the changes. +We could use the 'diff' command to see all the changes that have been made in the file. .. L8 @@ -142,13 +142,13 @@ been made in the file. .. R7 -You see some cryptic output, but it's essentially giving you the list of -changes made to the file. All the lines that were deleted are preceded by a - -and all the new-lines are preceded by a +. You can see that the & occurrences -have been replaces with and. +You see some 'cryptic' output, but it's essentially giving you the list of +changes made to the file. All the lines that were deleted are preceded by 'a -' +and all the new lines are preceded by 'a +'. You can see that the '&' occurrences +have been replaced with 'and'. -We should note here that, the diff wouldn't make much sense, if we had some -binary files like .jpg or .pdf files. We would see some gibberish in the +We should note that, the 'diff' wouldn't make much sense, if we had some +binary files like '.jpg' or '.pdf' files. We would see some gibberish in the output. Let's now commit this change. .. L9 @@ -159,7 +159,7 @@ output. Let's now commit this change. .. R8 -We can pass an additional argument, -v or --verbose, to hg log to get the whole +We can pass an additional argument, '-v' or 'verbose', to 'hg log' to get the whole commit message, instead of just the summary. .. L10 @@ -168,7 +168,7 @@ commit message, instead of just the summary. .. R9 -Also, we are not always, interested to see the whole history of the project. It +Also, we may not always want to see the whole history of the project. It would often suffice to see the last few commits. .. L11 @@ -177,8 +177,8 @@ would often suffice to see the last few commits. .. R10 -To limit the output of hg log, we could use the -l or --limit argument. Now it -will print only last three commits. +To limit the output of hg log, we could use the '-l' or 'limit argument'. Now '-l3' +will print only the last three commits. .. L12 @@ -187,10 +187,10 @@ will print only last three commits. .. R11 Often, the level of detail provided by the commit messages is also not enough. -We would want to see what exactly changed with a commit, probably as a diff. We -could do that using revision numbers. +We may want to see what exactly changed with a commit, probably as a 'diff'. We +could do that using 'revision numbers'. -Use the log command to get a brief description of all the changes made, by +Use the 'log' command to get a brief description of all the changes made, by showing us the summary line of all the commits. Look at the changeset line in the output of the command. It shows a number followed by a semi-colon and some long hexa-decimal string. The number is called the revision number. It is an @@ -204,9 +204,9 @@ the revision number, if required. .. R12 -The revision number can also be passed as an argument to many commands. Let's -say we wish to see the changes between revision 1 and revision 2. We shall use -the diff command to do this. +The 'revision number' can also be passed as an argument to many commands. Let's +say we wish to see the changes between 'revision 1' and 'revision 2'. We shall use +the 'diff' command to do this. .. L14 @@ -214,7 +214,7 @@ the diff command to do this. .. R13 -The diff command takes two revision numbers as arguments and gives the changes +The 'diff' command takes two revision numbers as arguments and gives the changes made from revision in the first argument to revision in the second argument. .. R14 @@ -246,8 +246,7 @@ To see changes made to a particular file, in the speciifed range of commits, .. R17 -This brings us to the end of the tutorial. In this tutorial, we have -seen, +This brings us to the end of the tutorial. .. L18 @@ -256,9 +255,9 @@ seen, .. R18 In this tutorial, we have learnt to, - #. Undo changes to the repository using hg revert, - #. View changes done to the repository using hg diff - #. Use revision numbers as arguments to different hg commands + #. Undo changes to the repository using 'hg revert', + #. View changes done to the repository using 'hg diff', + #. Use 'revision numbers' as arguments to different 'hg commands'. .. L19 @@ -266,10 +265,10 @@ In this tutorial, we have learnt to, .. R19 -Here are some self assessment questions for you to solve +Here are some self assessment questions for you to solve: -#. How to accomplish not saving backup files using hg revert command? -#. Get the history of revisions 2 to 4 without having to list each revision? +#. How to you avoid saving 'backup files' while using 'hg revert' command? +#. How do we get the history of revisions 2 to 4 without having to list each revision? #. Print the description and content of a change. Hint: Use --patch option .. L20 @@ -293,8 +292,8 @@ And the answers, .. R21 Hope you have enjoyed this tutorial and found it useful. Feel free to play -around with Mercurial and read the documentation given by hg help command. When -you are ready to move on, please proceed to the third tutorial on 'Version +around with Mercurial and read the documentation given by 'hg help' command. When +you are ready to move on, please proceed to the fourth tutorial on 'Version Control using Hg' Thank you! diff --git a/Version_Control/vcs4/vcs4.rst b/Version_Control/vcs4/vcs4.rst index 3da2901..b5da2c1 100644 --- a/Version_Control/vcs4/vcs4.rst +++ b/Version_Control/vcs4/vcs4.rst @@ -6,12 +6,12 @@ Version Control using Hg Part 4 .. Prerequisites .. ------------- -.. Version Control using Hg Part 1, 2, 3 +.. Version Control using Hg, Part 1, 2, 3 .. Author : Primal Pappachan - Internal Reviewer : - Date: Jan 27, 2012 + Internal Reviewer : Kiran Isukapatla + Date: Feb 20, 2012 ====== Script @@ -24,7 +24,7 @@ with the logo of MHRD}}}* .. R1 -Hello friends and welcome to the fourth part of tutorial on 'Version Control wit +Hello friends and welcome to the fourth part of tutorial on 'Version Control with hg'. .. L2 @@ -33,7 +33,7 @@ Hello friends and welcome to the fourth part of tutorial on 'Version Control wit .. R2 Please make sure that you have gone through the following tutorials before you -continue on this tutorial +continue on this tutorial. .. L3 @@ -44,7 +44,7 @@ continue on this tutorial At the end of this tutorial you will be able to #. Clone existing repositories #. Share your repositories with peers - #. use version control for collaborating with your peers + #. use 'version control' for collaborating with your peers .. L4 @@ -54,28 +54,26 @@ At the end of this tutorial you will be able to When motivating the use of version control systems, we spoke a lot about collaboration and sharing our changes with our peers. Let us now see how we can -share our project with our peers and collaborate with them. +share a project with our peers and collaborate with them. -For this purpose let us create a central repository, a copy of our repository, -which is different from the one in which we are working. The clone command is +For this purpose, let us create a 'central repository' and a copy of 'our repository', +which is different from the one in which we are working. The 'clone' command is used to clone or replicate an existing repository. .. L5 -``$hg clone SOURCE [DEST]`` - ``$ hg clone book book-repo`` .. R5 -The syntax of the clone command is -- hg clone SOURCE [DEST], where the -optional argument DEST is being represented in brackets. The clone command can +The syntax of the 'clone' command is -- hg clone SOURCE [DEST], where DEST is an + optional argument, represented in brackets. The 'clone' command can be used to replicate already existing repositories, either on your own machine -or on some remote machine somewhere on the network. Since, hg maintains a copy +or on a remote machine. Since, hg maintains a copy of the full repository with every copy of the repository, the two copies that we have are exactly equivalent. -In this example book-repo shall be our central repository we are sharing with +In this example 'book-repo' shall be our central repository being shared with peers. .. L6 @@ -84,20 +82,19 @@ peers. .. R6 -A mercurial repository can be shared in multiple ways. We shall use the http -protocol to share the repository. Mercurial comes inbuilt with a tiny server +A mercurial repository can be shared in multiple ways. Mercurial comes inbuilt with a tiny server that can be used to share your repository over the network. To start sharing -the repository, we say +the repository, we go to the repository and say 'hg serve'. .. L7 -``$cd ../book-repo`` +``$cd book-repo`` ``$hg serve`` .. R7 -This will start serving the repository on the network on the port 8000. Anybody +This will start serving the repository on the network on the port 8000. .. L8 @@ -105,7 +102,7 @@ Open the url http://localhost:8000 in browser. .. R8 -Now if your friend John wishes to clone the repository, use +Now if your friend 'John' wishes to clone the repository, he uses: .. L9 @@ -114,10 +111,10 @@ Now if your friend John wishes to clone the repository, use .. R9 -By this process, we share a central repository; work on our local copies. It +By this process, we share a central repository and work on our local copies. It doesn't make much sense to allow anybody to make changes to a public -repository, by default. We will need to make changes to the settings of the -repository to allow this. To set the write permissions, add the following lines +repository by default. To allow this, we need to make few changes to the settings of the +repository. To set the write permissions, we add the following lines in .hg/hgrc .. L10 @@ -130,8 +127,8 @@ in .hg/hgrc .. R10 -This will allow anybody to push to the repository, now. John can now push and -his changes will appear in the central repository. +This will allow anybody to push to the repository. Now, John can push +his changes which will then appear in the central repository. .. L11 @@ -140,8 +137,8 @@ his changes will appear in the central repository. .. R11 -Use hg push to push your commits (changesets) to the central repository. The -changes made by Primal will appear in the central repository. +Use 'hg push' to push your commits (changesets) to the central repository. The +changes made by John will appear in the central repository. .. L12 @@ -157,9 +154,9 @@ Let's now see how to get the changes from central repository. .. R13 -Before pulling the changes, we can use the command hg incoming to see the -changes that have been made to the repository after our last pull and the -changesets that will be coming into our repository after we do a pull. +Before pulling the changes, we may use the command 'hg incoming'. This shows the +changes that have been made to the repository, after our last pull and the +changesets that will be coming into our repository, after we do a pull. .. L14 @@ -167,7 +164,7 @@ changesets that will be coming into our repository after we do a pull. .. R14 -If you wish pull those changes shown by hg incoming, we use the pull command. +If you wish to pull those changes shown by 'hg incoming', we use the 'hg pull' command. .. L15 @@ -176,7 +173,7 @@ If you wish pull those changes shown by hg incoming, we use the pull command. .. R15 These changes do not affect our working directory. To see this, we could use -the hg parent command. +the 'hg parent' command. .. L16 @@ -184,8 +181,8 @@ the hg parent command. .. R16 -As pulling in the changes, the parent will still be the last commit, and the -changes are still not in your working directory. +After pulling the changes, the parent will still be the last commit, and the +changes are still not in the working directory. .. L17 @@ -193,7 +190,7 @@ changes are still not in your working directory. .. R17 -To get these changes we do the update as suggested by hg. +To get these changes, we do the update as suggested by hg. .. L18 @@ -201,11 +198,11 @@ To get these changes we do the update as suggested by hg. .. R18 -The update command updates the parent to the latest changes that we +The update command updates the parent to the latest changes that we have just pulled from the remote repository. #. Updates to the tip if no revision is specified - #. tip is the most recently added changeset + #. Tip is the most recently added changeset #. Can specify revision number to update to You can try @@ -216,7 +213,7 @@ You can try .. R19 -hg tip shows the tip of the repository +'hg tip' shows the tip of the repository .. L20 @@ -224,8 +221,8 @@ hg tip shows the tip of the repository .. R20 -What happens when two users have made simultaneous changes to the same file, -by editing different parts at the same time. +Let see what happens when two users make simultaneous changes to the same file, +by editing different (or) same parts of the file. .. L21 @@ -236,12 +233,11 @@ by editing different parts at the same time. With simultaneous changes, following things happen #. The logs of both repositories will be different #. The repositories have diverged - #. hg push fails, in such a scenario - + #. 'hg push' fails, in such a scenario Don't take the advice given by mercurial. Using the -f would be disastrous. We -will leave out a discussion of that, for this course. +will leave out a discussion on that, for this course. .. L22 @@ -262,7 +258,7 @@ use following commands in order .. R24 We have now pulled the changes from the central repository and merged them with -the changes in our repository. As hg warns u, do not forget to commit. +the changes in our repository. As hg warns you, do not forget to commit. .. L25 @@ -270,8 +266,8 @@ the changes in our repository. As hg warns u, do not forget to commit. .. R25 -The changes can be pushed to the central repository now. We could also check -the changes that will be pushed, before pushing them, using the hg outgoing +Now, the changes can be pushed to the central repository. We could also check +the changes before pushing them, using the 'hg outgoing' command. .. L26 @@ -286,17 +282,17 @@ command. .. R26 -The changes have now been successfully pushed! Let us look at the web interface -of the repo, to see that the changes have actually taken place. +The changes have now been successfully pushed! Let us look at the 'web interface' +of the repository, to see that the changes have actually taken place. .. L27 -Show the Change graph in browser. +Show the 'Change graph' in the browser. .. R27 -What will happen if we edited the same portion of the file, at the same time? -How would merges work? This will be the last thing that we are going to see in +What will happen if we edit the same portion of the file, at the same time? +How would merge work? This will be the last thing that we are going to see in this part of the spoken tutorial. .. L28 @@ -331,7 +327,7 @@ conflicts occur. If you get a 3 pane view, the first pane is the actual file, where you make changes, to resolve the conflicts. The second pane shows the changes that you made, to the file. The last pane shows the changes that you pulled from the -original repo. Once you are satisfied with the changes, save and quit. +original repository. Once you are satisfied with the changes, save and quit. Once you are done, you need to tell mercurial that you have resolved the conflicts manually. @@ -342,7 +338,7 @@ conflicts manually. .. R30 -You will now need to commit your changes, just like the simple merge that we per +You will now need to commit your changes, just like the simple merge. .. L31 @@ -383,14 +379,14 @@ organize your work and projects, better. In this tutorial, we have learnt to, -#. Clone repositories, using hg clone, -#. Serve our repositories via http using hg serve, -#. push changes to a repository using hg push, -#. check the changesets in a repository after last pull, using hg incoming, -#. pull changes from a repository using hg pull , -#. update the working directory, using hg update, -#. merge two heads, using hg merge, -#. and resolve conflicts using hg resolve. +#. Clone repositories, using 'hg clone', +#. Serve our repositories via http using 'hg serve', +#. push changes to a repository using 'hg push', +#. check the changesets in a repository after last pull, using 'hg incoming', +#. pull changes from a repository using 'hg pull' , +#. update the working directory, using 'hg update', +#. merge two heads, using 'hg merge', +#. and resolve conflicts using 'hg resolve'. .. L36 @@ -399,8 +395,11 @@ In this tutorial, we have learnt to, .. R36 Here are some self assessment questions for you to solve - #. Mention the easiest way to get started on sharing your repository by providi - #. Suppose Joey and Melissa have made simultaneous changes to the same file in + #. Mention the easiest way to get started on sharing your repository by + providing a web interface. + #. Suppose Melissa made some changes to files in the central repository. Would + Joey's local repository be automatically updated with these changes after he + has executed 'hg pull' command? #. What are the commands involved in the process of merging changes? .. L37 @@ -412,7 +411,8 @@ Here are some self assessment questions for you to solve And the answers, #. hg serve - #. No, whenever we've done a merge, hg parents will display two parents until w + #. No, Joey has to execute 'hg update' to apply the pulled + changes to his repository. #. hg pull, hg merge, hg commit -m "Merged Remote changes" .. L38 @@ -436,11 +436,6 @@ you are comfortable with using Mercurial on a day-to-day basis. .. R39 -Hope you have enjoyed this tutorial and found it useful. Feel free to play -around with Mercurial and read the documentation given by hg help command. When -you are ready to move on, please proceed to the third tutorial on 'Version -Control using Hg' +Hope you have enjoyed this tutorial and found it useful. Thank you! - - |