Certification 1 : Project Management
First Lecture Barcelona Fablab IAAC Janauary 29th 2014.
Design website HTML5 to cover who I am and a brief description of the project. I did use free template from design from HTML5webtemplates.co.uk
Mercurial Training
I have updated last year's tutorials and resources for getting started with Mercurial (aka Hg). They are located here: http://fabacademy.org/archives/2014/tutorials/index.html
A note to Windows users, although you can use Cygwin to emulate a Linux environment, I don't recommend it. It worked well for some of my students last year and for others it was a real headache. I have included my tutorial from last year - but I would advise installing Hg natively instead.
Here is the graphical interface that Neil mentioned, as it is not linked from the class page: http://tortoisehg.bitbucket.org/
Everyone should get Hg installed right away. Please read the overview guides that Neil mentioned during lecture. I have linked to them here
Step.1 - Download the keys form this email. You will find 2 files: academy academy.pub
Then just follow the steps below which were taken from Natalie Freed's tutorial and adapted to the Barcelona local hg (mercurial) repository, which is what you will be using (for now). Keep in mind that each line is a different "command" and should be followed by hitting enter and ignoring everything after #.
Everything shown in red means it will be specific to you, be it where the keys were downloaded to, your name and surname, directory where you want to store the archive or email address. Please input your own info.
Everything in black and after # is a comment, meaning its just there to help you understand why you are doing something or to explain a choice, please do not paste into the terminal. Also sometimes shortcuts like command+P for paste do not work in terminals. You might have to right click and select paste.
First of all please install mercurial on your system. On Mac just google mercurial, download and install. On Ubuntu you can use the following command on the terminal:
sudo apt-get install mercurial
If you need help finding the terminal in your OS, just use google or friend. OK, here we go:
mkdir ~/.ssh
mv ~/Downloads/academy.txt ~/Downloads/academy #(might be necessary if your academy private key was renamed by your OS to academy.txt, if not, skip.)
mv ~/Downloads/academy ~/.ssh
mv ~/Downloads/academy.pub ~/.ssh
sudo chmod 600 ~/.ssh/academy
echo -en "host fab.cba.mit.edu\nport 846" > ~/.ssh/config
#Change path in red below to wherever you would like to store the archive (or leave on Desktop):
mkdir ~/Desktop/Archive
hg clone -e "ssh -i ~/.ssh/academy" ssh://hg@fabacademy.org/academy.node.barcelona ~/Desktop/Archive
#Change to your name and email address, then paste the entire line into the terminal:
echo -en "\n\n[ui]\nusername = YOUR NAME
You are now setup. To test this, please open the terminal and navigate to the folder where you placed your local copy of the mercurial archive.
You can now use the following command to query the server and download the latest updates made to the archive:
hg pull
The next step will be to apply these new changes to your local copy using (no harm in doing it even if mercurial replies to the previous step with “no changes found”, this was you create the habit):
hg update
If all goes well you will not receive any strange responses from mercurial and you will be ready to go. You can now create your folder using the “last name dot first name” format and place your site in it.
After this, return to the terminal and repeat the previous steps of hg pull and hg update. The next step will be to tell mercurial you have made changes and would like them to be reflected on the copy in the server. We do this with:
hg addremove
There are other similar commands but this is the safest and most complete one. We will now indicate in the log what changes we have just made using:
hg commit -m “describe what you did”
Finally, we will push these changes to the server, making it the latest version.
hg push
Done!
It is very important to do these steps in the correct order. Trouble can arise if you don’t but anything can be solved.
You can make a small note somewhere for the first few days with the steps in the right order:
hg pull
hg update
hg addremove
hg commit -m “message”
hg push
If mercurial warns you that you are going to create a head if you push, don’t force the push. Contact me and we will figure it out.
We will go over all this in class today at 15:00 locally.
If you are in a remote site and have trouble please email me and we can setup a Skype meeting.
Your changes will be visible at the following address: http://fabacademy.org/archives/nodes/barcelona/