Friday 31 October 2014

The Briefest-possible Beginner's Guide to Mercurial Distributed Version Control System

Mercurial commands

hg log 
show list of commits

hg diff
show lines which differ between tip and working copy

hg diff -c <commit number>
show diffs caused by commit number - commit number shown in log

hg update <commit number>
set working copy to state of given commit

hg update tip
update to latest commit

hg tag <tag-name> 
mark last commit with a tag - When you have a version you're happy with, tag it

hg update <tag-name>
retrieve tagged commit to working copy
i.e. "update your working copy to match a given previous version"
only possible if there are no uncommitted changes   

hg clone <working copy path>
places a clone of the the working copy in the current directory

i.e.
in Mercurial 



 

How to Switch off a second monitor

I wanted to switch off my second monitor on my Windows 7 Home Premium PC, so that I could connect in to my dev PC, using VNC on a Chromebook.

If I keep an extended desktop on the dev PC, then there is a lot of screen to scroll across on the Chromebook.

I wanted to preserve the settings for the second monitor, so that I did not have to spend a lot of time, re-configuring the second monitor to be just the way I liked it when I started using it again.

The answer turned out to be really simple.

How to turn off your second monitor in Windows 7, without losing the settings for it :

Windows key  + p
Change from "Extend" to "Duplicate" in the onscreen dialog.
Power off the second monitor.

To returnback to the original settings, simply
Windows key + p
Change from "Duplicate" to "Extend"
And remember to switch the monitor back on!  :-)