Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It it possible to update specific directory to old revision in Mercurial?

Tags:

mercurial

I tried to update some files to old revision in many ways, but I haven't found yet. (not permanently, just temporarily updating for testing)

For example, the following is OK in SVN.

svn up -r 100 foo.cpp
U    foo.cpp

But in Mercurial, 'up' command doesn't permit file name argument.

Only is it possible to update entire source tree in Mercurial?

like image 298
JaycePark Avatar asked Jan 19 '23 17:01

JaycePark


1 Answers

You'd have to use hg revert:

hg revert -r 100 foo.cpp

Note that this gives you local changes, as can be seen by running hg diff.

See hg help revert for more info.

like image 135
Tom Avatar answered May 21 '23 18:05

Tom