Ben Carp
Ben Carp

Reputation: 26558

How to checkout branch on Mercurial SourceTree?

I'm using SourceTree for Mercurial version control. I know that when using Git I can checkout an old commit, simply to see files as they were in a previous commit. I'm not able to do that or find information about checking out an old commit when using Mercurial or using Mercurial with SourceTree. Is it possible to checkout a commit with mercurial? If it is how do I do it with SourceTree?

Upvotes: 0

Views: 615

Answers (2)

peak
peak

Reputation: 116730

Using SourceTree:

On the LHS there is a section devoted to branches. Click on the branch of interest, and then in the main pane, right-click on the commit of interest. The top-most item in the context menu is "Update to..." (for git, it's "Checkout...").

Upvotes: 1

arhak
arhak

Reputation: 2542

as @peak says, your right-click may bring the context menu with the top-most item being "Checkout..." as you can see in the screenshot at http://blog.sourcetreeapp.com/files/2013/10/customactions2.jpg

from the command line you can use hg update -r <revisionID> as @torek points out and also any of its aliases like hg co <revision> for instance

command update has several aliases: up, checkout, co (see hg help update for further details)

Upvotes: 0

Related Questions