Practical example of folding three commits into one. For this to work, commits should not have been pushed.
D:\test\hgt>hg init
D:\test\hgt>touch one
D:\test\hgt>hg add .
adding one
D:\test\hgt>hg commit -m one
D:\test\hgt>touch second
D:\test\hgt>hg add .
adding second
D:\test\hgt>hg commit -m second
D:\test\hgt>hg log
changeset: 1:6ac539119ec9
tag: tip
user: John
date: Mon Sep 05 00:06:03 2011 +0300
summary: second
changeset: 0:60aac1a7734b
user: John
date: Mon Sep 05 00:05:56 2011 +0300
summary: one
D:\test\hgt>ls
one second
D:\test\hgt>touch third
D:\test\hgt>hg add .
adding third
D:\test\hgt>hg commit -m third
D:\test\hgt>hg qimport -r0:tip
D:\test\hgt>hg qser
0.diff
1.diff
2.diff
D:\test\hgt>hg qpop -a
popping 2.diff
popping 1.diff
popping 0.diff
patch queue now empty
D:\test\hgt>hg qpush 0.diff
applying 0.diff
now at: 0.diff
D:\test\hgt>hg qfold 1.diff
D:\test\hgt>hg qfold 2.diff
D:\test\hgt>hg qser
0.diff
D:\test\hgt>hg qref -m "One,two and three"
D:\test\hgt>hg qfinish 0.diff
D:\test\hgt>hg log
changeset: 0:93524a39039d
tag: tip
user: John
date: Mon Sep 05 00:05:56 2011 +0300
summary: One,two and three