Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: get contents of a specific revision of a file

Tags:

mercurial

I need to get contents of a specific revision/node of a file in a local repository and write it to a temporary file.

I know it is possible to do through the internal Mercurial API.

Is there a built-in command or an extension?

like image 632
utapyngo Avatar asked Sep 12 '11 08:09

utapyngo


1 Answers

You can use hg cat:

hg cat -r revisionid filename > tmpfile
like image 52
VonC Avatar answered Sep 20 '22 15:09

VonC