From 0c566fca18049b40bae8ee8d5c26577c99b8dd7b Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Sat, 20 Apr 2013 16:28:44 -0400 Subject: [PATCH] Challenges for SVN intro --- svn.html | 142 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 112 insertions(+), 30 deletions(-) diff --git a/svn.html b/svn.html index fe01b5f..494145c 100644 --- a/svn.html +++ b/svn.html @@ -103,14 +103,15 @@

Learning Objectives:

@@ -682,6 +683,56 @@ $ svn diff -r HEAD +
+

Diffing Other Files

+ +

+ svn diff mimics the behavior of + the Unix diff command, + which can be used to compare any two files. + Given these two files: +

+ + + + + + + + + + +
left.txtright.txt
+
hydrogen
+lithium
+sodium
+magnesium
+rubidium
+
+
hydrogen
+lithium
+beryllium
+sodium
+potassium
+strontium
+
+ +

+ diff's output is: +

+
+$ diff left.txt right.txt
+2a3
+> beryllium
+4,5c5,6
+< magnesium
+< rubidium
+---
+> potassium
+> strontium
+
+
+

This is a very common workflow, and is the basic heartbeat of most developers' days. @@ -756,15 +807,47 @@ $ svn diff -r HEAD

Challenges

+
  1. + Using the repository URL, user ID, and password provided by the instructor, + perform the following actions: +
      +
    1. + Check out a working copy of the repository. +
    2. +
    3. + Create a text file called your_id.txt + (using your user ID instead of your_id) + and write a three-line biography of yourself in it. +
    4. +
    5. + Add this file to your working copy. +
    6. +
    7. + Commit your changes to the repository. +
    8. +
    9. + Update your working copy to get other people's biographies. +
    10. +
    11. + Examine the change log to see + the order in which people added their biographies + to the repository. +
    12. +
  2. + What does the command svn diff -r 14 do? + What does it do if there have only been 10 changes to the repository?
  3. + By default, + Unix diff and svn diff compare files line by line. + Why doesn't this work for MP3 audio files?
@@ -1715,28 +1798,27 @@ done -
+
+

Summing Up

-

Summing Up

- -

- Correlation does not imply causality, - but there is a very strong correlation between - using version control - and doing good computational science. - There's an equally strong correlation - between not using it and wasting effort, - so today (the middle of 2012), - I will not review a paper if the software used in it - is not under version control. - Its authors' work might be interesting, - but without the kind of record-keeping that version control provides, - there's no way to know exactly what they did and when. - Just as importantly, - if someone doesn't know enough about computing to use version control, - the odds are good that they don't know enough - to do the programming right either. -

+

+ Correlation does not imply causality, + but there is a very strong correlation between + using version control + and doing good computational science. + There's an equally strong correlation + between not using it and either wasting effort or getting things wrong. + Today (the middle of 2013), + I will not review a paper if the software used in it + is not under version control. + The work it reports might be interesting, + but without the kind of record-keeping that version control provides, + there's no way to know exactly what its authors did. + Just as importantly, + if someone doesn't know enough about computing to use version control, + the odds are good that they don't know enough + to do the programming right either. +

-
+
{% endblock content %} -- 2.26.2