Mercurial > hg-website
changeset 136:0364cfc00295
learning in workflows: Added identify and update to 'null'
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Fri, 01 May 2009 15:07:56 +0200 |
parents | 8d069bba8cce |
children | defbaee4011c |
files | text/learning_mercurial_in_workflows.txt |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/text/learning_mercurial_in_workflows.txt Fri May 01 14:32:23 2009 +0200 +++ b/text/learning_mercurial_in_workflows.txt Fri May 01 15:07:56 2009 +0200 @@ -107,7 +107,12 @@ $ hg update 3 -Now your code is back at revision 3, the fourth commit (Mercurial starts couting at 0). +Now your code is back at revision 3, the fourth commit (Mercurial starts counting at 0). +To check if you're really at that revision, you can use "identify -n". + +$ hg identify -n + +Note: "identify" without options gives you the short form of a unique revision ID. That ID is what Mercurial uses internally. If you tell someone about the version you updated to, you should use that ID, since the numbers can be different for other people. If you want to know the reasons behind that, please read up Mercurials [basic concepts](). To update to the most recent revision, you can use "tip" as revision name. @@ -117,6 +122,8 @@ Note: Instead of "hg update" you can also use the shorthand "hg up". Similarly you can abbreviate "hg commit" to "hg ci". +Note: To get a revision devoid of files, just "update" to "null" via "hg update null". That's the revision before any files were added. + ==== Fixing errors in earlier revisions ==== When you find a bug in some earlier revision you have two options: eaither you can fix it in the current code, or you can go back in history and fix the code exactly where you did it.