Getting a previous version of a file

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Tue Jul 15 15:56:27 CDT 2008


On Tue, Jul 15, 2008 at 10:37 PM, Dean Schulze <dean_w_schulze at yahoo.com> wrote:
>
> This is a simple question, but none of the hg docs address it.
>
> How do I check out a previous version of a file?  hg update seems to only
> want to work on entire directories.

You cannot check it out in isolation. But you can use `hg cat` to list
any specific version of a file. Or `hg cat -r therev thefile >thefile`
to restore just one file to a previous revision. But it will be
modified, then.
-parren


More information about the Mercurial mailing list