Difference between revisions of "General day to day"

From SourceWiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Rough..This is for info on the principles of using version control day to day
+
[[Category:Version Control]]
  
=A Working Cycle=
+
=The Working Cycle=
  
When you are using a version control system, the first thing you will typically want to do is to obtain a copy of the latest version of your code.  You will then, no doubt, want to edit your local copy of the code and then test that your changes are doing what you wanted them to.  Finally, if you are staisfied, you will then want to incorporate your changes into a new latest version of the code.   
+
When using a version control system, the first thing you will typically want to do is to obtain a copy of the latest version of your code.  You will then, no doubt, want to edit your local copy of the code and then test that your changes are doing what you wanted them to.  Finally, if you are staisfied, you will then want to create a new latest version of the code which incorporates your changes.   
  
If you are working collaboratively, it is also a good idea to check that the latest version of the code is working correctly when take a local copyAlso, you may already have a local copy of the code.  You will want to update your local copy with any changes committed to the repository since you last updated.
+
If you are working collaboratively, it is also a good idea to check that the latest version of the code is working as it should '''before''' you make any changesThis has been found from experience, to greatly protect your sanity! 
 +
 
 +
If this is not your first time round this cycle, you will already have a local copy of your code as it was at some time in the past.  You will probably want to update your copy rather than obtain a completely new one.  An update will modify any files in your local copy that are newer in the repository.  This is an important efficiency point--only files which need updating will be changed.  All the others will be left as they were.  This saves a good deal of download time.
  
 
Thus, your normal working cycle will be:
 
Thus, your normal working cycle will be:
  
# checkout/update
+
<pre>
 +
# new copy/update
 
# test
 
# test
 
# edit
 
# edit
 
# test
 
# test
 
# commit
 
# commit
 +
</pre>
  
 
You can learn how to do this with Subversion by clicking here (link).
 
You can learn how to do this with Subversion by clicking here (link).

Latest revision as of 17:45, 8 February 2006


The Working Cycle

When using a version control system, the first thing you will typically want to do is to obtain a copy of the latest version of your code. You will then, no doubt, want to edit your local copy of the code and then test that your changes are doing what you wanted them to. Finally, if you are staisfied, you will then want to create a new latest version of the code which incorporates your changes.

If you are working collaboratively, it is also a good idea to check that the latest version of the code is working as it should before you make any changes. This has been found from experience, to greatly protect your sanity!

If this is not your first time round this cycle, you will already have a local copy of your code as it was at some time in the past. You will probably want to update your copy rather than obtain a completely new one. An update will modify any files in your local copy that are newer in the repository. This is an important efficiency point--only files which need updating will be changed. All the others will be left as they were. This saves a good deal of download time.

Thus, your normal working cycle will be:

# new copy/update
# test
# edit
# test
# commit

You can learn how to do this with Subversion by clicking here (link).