tests/test-evolve-content-divergent-corner-cases.t
branchstable
changeset 4507 de9089514833
parent 4493 32446b7a6e7c
child 4513 d70db7e455dc
child 4576 96ce1030d2fb
equal deleted inserted replaced
4486:099e0ca8285e 4507:de9089514833
   317   @  8:83b1664a580f updated e
   317   @  8:83b1664a580f updated e
   318   |   () [default] draft
   318   |   () [default] draft
   319   ~
   319   ~
   320 
   320 
   321   $ cd ..
   321   $ cd ..
       
   322 
       
   323 Check that canceling of file deletion are merge correctly
       
   324 ---------------------------------------------------------
       
   325 
       
   326 File addition/deletion tend to have special processing. So we better test them directory
       
   327 
       
   328   $ hg init non-public
       
   329   $ cd non-public
       
   330   $ echo a > a
       
   331   $ echo b > b
       
   332   $ echo c > c
       
   333   $ echo d > d
       
   334   $ hg ci -Aqm initial
       
   335 
       
   336 oops, we meant to delete just 'a', but we deleted 'b' and 'c' too
       
   337 
       
   338   $ hg rm a b c
       
   339   $ hg ci -m 'delete a'
       
   340   $ hg revert -r .^ b
       
   341   $ hg amend
       
   342 
       
   343 create some content divergence
       
   344 
       
   345   $ hg co dff6e52f5e41 --hidden
       
   346   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   347   updated to hidden changeset dff6e52f5e41
       
   348   (hidden revision 'dff6e52f5e41' was rewritten as: 0825dcee2670)
       
   349   working directory parent is obsolete! (dff6e52f5e41)
       
   350   (use 'hg evolve' to update to its successor: 0825dcee2670)
       
   351   $ hg revert -r .^ c
       
   352   $ hg amend
       
   353   2 new content-divergent changesets
       
   354   $ hg glog --hidden
       
   355   @  3:92ecd58f9b05 delete a
       
   356   |   () [default] draft
       
   357   | *  2:0825dcee2670 delete a
       
   358   |/    () [default] draft
       
   359   | x  1:dff6e52f5e41 delete a
       
   360   |/    () [default] draft
       
   361   o  0:75d2b02c4a5c initial
       
   362       () [default] draft
       
   363 
       
   364 Resolve the divergence, only "a" should be removed
       
   365 
       
   366   $ hg evolve --content-divergent
       
   367   merge:[3] delete a
       
   368   with: [2] delete a
       
   369   base: [1] delete a
       
   370   merging "other" content-divergent changeset '0825dcee2670'
       
   371   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   372   working directory is now at 7ca6a9fafcf6
       
   373   $ hg glog
       
   374   @  4:7ca6a9fafcf6 delete a
       
   375   |   () [default] draft
       
   376   o  0:75d2b02c4a5c initial
       
   377       () [default] draft
       
   378 
       
   379   $ hg diff --change .
       
   380   diff --git a/a b/a
       
   381   deleted file mode 100644
       
   382   --- a/a
       
   383   +++ /dev/null
       
   384   @@ -1,1 +0,0 @@
       
   385   -a