# HG changeset patch # User Arne Babenhauserheide # Date 1241183276 -7200 # Node ID 0364cfc0029515b4de96dd85ecd5206c42f7a526 # Parent 8d069bba8cce90d6e444d9b76b02dcf815488d9d learning in workflows: Added identify and update to 'null' diff -r 8d069bba8cce -r 0364cfc00295 text/learning_mercurial_in_workflows.txt --- 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.