tests/test-rebase-rename.t
changeset 45792 1703a7f9d5b8
parent 45771 f90a5c211251
equal deleted inserted replaced
45791:1f9736eb0e65 45792:1703a7f9d5b8
   310   $ hg copy a b
   310   $ hg copy a b
   311   $ echo b > b
   311   $ echo b > b
   312   $ hg commit --message "File b created as copy of a and modified"
   312   $ hg commit --message "File b created as copy of a and modified"
   313   $ hg copy b c
   313   $ hg copy b c
   314   $ echo c > c
   314   $ echo c > c
   315   $ hg commit --message "File c created as copy of b and modified"
   315   $ hg commit --message "File c created as copy of b and modified" ##
   316   $ hg copy c d
   316   $ hg copy c d
   317   $ echo d > d
   317   $ echo d > d
   318   $ hg commit --message "File d created as copy of c and modified"
   318   $ hg commit --message "File d created as copy of c and modified (child of 327f772bc074)"
   319 
   319 
   320 Note that there are four entries in the log for d
   320 Note that there are four entries in the log for d
   321   $ hg tglog --follow d
   321   $ hg tglog --follow d
   322   @  3: 421b7e82bb85 'File d created as copy of c and modified'
   322   @  3: 6be224292cfa 'File d created as copy of c and modified (child of 327f772bc074)'
   323   |
   323   |
   324   o  2: 327f772bc074 'File c created as copy of b and modified'
   324   o  2: 327f772bc074 'File c created as copy of b and modified'
   325   |
   325   |
   326   o  1: 79d255d24ad2 'File b created as copy of a and modified'
   326   o  1: 79d255d24ad2 'File b created as copy of a and modified'
   327   |
   327   |
   340 
   340 
   341 Rebase the copies on top of the unrelated change.
   341 Rebase the copies on top of the unrelated change.
   342   $ hg rebase --source 1 --dest 4
   342   $ hg rebase --source 1 --dest 4
   343   rebasing 1:79d255d24ad2 "File b created as copy of a and modified"
   343   rebasing 1:79d255d24ad2 "File b created as copy of a and modified"
   344   rebasing 2:327f772bc074 "File c created as copy of b and modified"
   344   rebasing 2:327f772bc074 "File c created as copy of b and modified"
   345   rebasing 3:421b7e82bb85 "File d created as copy of c and modified"
   345   rebasing 3:6be224292cfa "File d created as copy of c and modified (child of 327f772bc074)"
   346   saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a2265555-rebase.hg
   346   saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a3e674e3-rebase.hg
   347   $ hg update 4
   347   $ hg update 4
   348   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   348   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   349 
   349 
   350 There should still be four entries in the log for d
   350 There should still be four entries in the log for d
   351   $ hg tglog --follow d
   351   $ hg tglog --follow d
   352   @  4: dbb9ba033561 'File d created as copy of c and modified'
   352   @  4: afbdde3a60d5 'File d created as copy of c and modified (child of af74b229bc02)'
   353   |
   353   |
   354   o  3: af74b229bc02 'File c created as copy of b and modified'
   354   o  3: af74b229bc02 'File c created as copy of b and modified'
   355   |
   355   |
   356   o  2: 68bf06433839 'File b created as copy of a and modified'
   356   o  2: 68bf06433839 'File b created as copy of a and modified'
   357   :
   357   :
   366   created new head
   366   created new head
   367   $ hg rebase -s 2 --dest 5 --collapse
   367   $ hg rebase -s 2 --dest 5 --collapse
   368   rebasing 2:68bf06433839 "File b created as copy of a and modified"
   368   rebasing 2:68bf06433839 "File b created as copy of a and modified"
   369   rebasing 3:af74b229bc02 "File c created as copy of b and modified"
   369   rebasing 3:af74b229bc02 "File c created as copy of b and modified"
   370   merging b and c to c
   370   merging b and c to c
   371   rebasing 4:dbb9ba033561 "File d created as copy of c and modified"
   371   rebasing 4:afbdde3a60d5 "File d created as copy of c and modified (child of af74b229bc02)"
   372   merging c and d to d
   372   merging c and d to d
   373   saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-rebase.hg
   373   saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-29d5057f-rebase.hg
   374   $ hg co tip
   374   $ hg co tip
   375   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   375   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   376 
   376 
   377 This should show both revision 3 and 0 since 'd' was transitively a
   377 This should show both revision 3 and 0 since 'd' was transitively a
   378 copy of 'a'.
   378 copy of 'a'.
   379 
   379 
   380   $ hg tglog --follow d
   380   $ hg tglog --follow d
   381   @  3: 5a46b94210e5 'Collapsed revision
   381   @  3: 75708a266e56 'Collapsed revision
   382   :  * File b created as copy of a and modified
   382   :  * File b created as copy of a and modified
   383   :  * File c created as copy of b and modified
   383   :  * File c created as copy of b and modified
   384   :  * File d created as copy of c and modified'
   384   :  * File d created as copy of c and modified (child of af74b229bc02)'
   385   o  0: b220cd6d2326 'File a created'
   385   o  0: b220cd6d2326 'File a created'
   386   
   386   
       
   387   $ hg log -G -Tcompact
       
   388   @  3[tip]   75708a266e56   1970-01-01 00:00 +0000   test
       
   389   |    Collapsed revision
       
   390   |
       
   391   o  2   15258cf0cf10   1970-01-01 00:00 +0000   test
       
   392   |    unrelated commit is unrelated
       
   393   |
       
   394   o  1   1d689898494b   1970-01-01 00:00 +0000   test
       
   395   |    Unrelated file created
       
   396   |
       
   397   o  0   b220cd6d2326   1970-01-01 00:00 +0000   test
       
   398        File a created
       
   399   
   387 
   400 
   388   $ cd ..
   401   $ cd ..