docs/user-guide.rst
branchstable
changeset 1268 ba3ff8c00304
parent 1267 8cc6e90354a9
child 1269 250835154f8f
equal deleted inserted replaced
1267:8cc6e90354a9 1268:ba3ff8c00304
   246 usual end state for obsolete changesets. But many scenarios result in
   246 usual end state for obsolete changesets. But many scenarios result in
   247 obsolete changesets that are still visible, which indicates your
   247 obsolete changesets that are still visible, which indicates your
   248 history modification work is not yet done. We'll see examples of that
   248 history modification work is not yet done. We'll see examples of that
   249 later, when we cover advanced usage.
   249 later, when we cover advanced usage.
   250 
   250 
   251 Seeing hidden changesets
   251 
   252 ========================
   252 Understanding revision numbers and hidden changesets
   253 
   253 ====================================================
   254 TODO
   254 
       
   255 As the name implies, hidden changesets are normally not visible. If
       
   256 you run ``hg log`` on the repository from Figure 2, Mercurial will
       
   257 show revisions 0 and 3, but not 1 and 2. That's something you don't
       
   258 see with plain vanilla Mercurial—normally, revision *N* is always
       
   259 followed by revision *N* + 1.
       
   260 
       
   261 This is just the visible manifestation of hidden changesets. If
       
   262 revision 0 is followed by revision 3, that means there are two hidden
       
   263 changesets, 1 and 2, in between.
       
   264 
       
   265 To see those hidden changesets, use the ``--hidden`` option::
       
   266 
       
   267   $ hg --hidden log --graph --template '{rev}:{node|short}  {desc|firstline}\n'
       
   268   @  3:934359450037  implement feature Y
       
   269   |
       
   270   | x  2:6c5f78d5d467  temporary amend commit for fe0ecd3bd2a4
       
   271   | |
       
   272   | x  1:fe0ecd3bd2a4  implement feature Y
       
   273   |/
       
   274   o  0:08c4b6f4efc8  init
       
   275 
       
   276 Note that changeset IDs are still the permanent, immutable identifier
       
   277 for changesets. Revision numbers are, as ever, a handy shorthand that
       
   278 work in your local repository, but cannot be used across repositories.
       
   279 They also have the useful property of showing when there are hidden
       
   280 changesets lurking under the covers, which is why this document uses
       
   281 revision numbers.
       
   282 
   255 
   283 
   256 Under the hood: Prune an unwanted changeset
   284 Under the hood: Prune an unwanted changeset
   257 ===========================================
   285 ===========================================
   258 
   286 
   259 ``prune`` (example 4 above) is the simplest history modification
   287 ``prune`` (example 4 above) is the simplest history modification
   307 ======================
   335 ======================
   308 
   336 
   309 TODO
   337 TODO
   310 
   338 
   311 
   339 
   312 Understanding revision numbers
       
   313 ==============================
       
   314 
       
   315 If you're trying these examples on your own, especially using ``hg
       
   316 log`` without ``--hidden``, you have probably noticed some funny
       
   317 business going on with revision numbers: there are now gaps in the
       
   318 sequence. That's something you don't see with plain vanilla Mercurial;
       
   319 normally, revision N is always followed by revision N+1.
       
   320 
       
   321 This is just the visible manifestation of hidden changesets. If
       
   322 revision 95 is followed by revision 98, that means there are two
       
   323 hidden changesets, 96 and 97, in between.
       
   324 
       
   325 Note that changeset IDs are still the permanent, immutable identifier
       
   326 for changesets. Revision numbers are, as ever, a handy shorthand that
       
   327 work in your local repository, but cannot be used across repositories.
       
   328 They also have the useful property of showing when there are hidden
       
   329 changesets lurking under the covers, which is why this document uses
       
   330 revision numbers.
       
   331 
       
   332 
       
   333 Life with ``evolve`` (advanced usage)
   340 Life with ``evolve`` (advanced usage)
   334 -------------------------------------
   341 -------------------------------------
   335 
   342 
   336 Now that you've got a solid understanding of how ``evolve`` works in
   343 Now that you've got a solid understanding of how ``evolve`` works in
   337 concert with changeset obsolescence, let's explore some more advanced
   344 concert with changeset obsolescence, let's explore some more advanced