#!/bin/bash # Do all the work in /tmp $ cd /tmp # Testing presence of Mercurial $ hg --version re: Mercurial Distributed SCM \(version [\d.]+\) (see http://mercurial.selenic.com for more information) re: Copyright \(C\) [\d-]+ Matt Mackall and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # Creating a repository $ mkdir foo $ cd foo $ pwd /tmp/foo $ hg init $ echo "this is a file" > content $ cat content this is a file $ hg add content $ hg st A content $ hg commit -m "created repo and added a file" # Checking that everything looks good $ hg log re: changeset: 0:[a-f0-9]{12} tag: tip user: Fabrice Gabolde re: date: .* summary: created repo and added a file