简体   繁体   中英

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?

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...").

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM