The solution for Mercurial is an extension called record.
You enable the extension in your hgrc file. You would properly want to do it in the ~/.hgrc file to make it system wide.
Just add:
hgext.record =
Then you just write:
hg record
You might also consider these other extensions:
hgext.fetch =
hgext.churn =
hgext.mq =
hgext.patchbomb =
hgext.graphlog =
hgext.highlight =
bfiles = ~/path_to_bfiles