tests/test-rebase-scenario-global.t
changeset 35393 4441705b7111
parent 35385 469b06b4c3ca
child 36476 263368dc143f
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
    64   HG: Leave message empty to abort commit.
    64   HG: Leave message empty to abort commit.
    65   HG: --
    65   HG: --
    66   HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
    66   HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
    67   HG: branch 'default'
    67   HG: branch 'default'
    68   HG: added D
    68   HG: added D
    69   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob)
    69   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg
    70   $ cat D.orig
    70   $ cat D.orig
    71   collide
    71   collide
    72   $ rm D.orig
    72   $ rm D.orig
    73 
    73 
    74   $ hg tglog
    74   $ hg tglog
    99   $ cd a2
    99   $ cd a2
   100   $ echo collide > D
   100   $ echo collide > D
   101 
   101 
   102   $ HGEDITOR=cat hg rebase -s 3 -d 5 --config merge.checkunknown=ignore
   102   $ HGEDITOR=cat hg rebase -s 3 -d 5 --config merge.checkunknown=ignore
   103   rebasing 3:32af7686d403 "D"
   103   rebasing 3:32af7686d403 "D"
   104   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob)
   104   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg
   105   $ cat D.orig
   105   $ cat D.orig
   106   collide
   106   collide
   107   $ rm D.orig
   107   $ rm D.orig
   108 
   108 
   109   $ hg tglog
   109   $ hg tglog
   137 
   137 
   138   $ hg rebase -s 4 -d 7
   138   $ hg rebase -s 4 -d 7
   139   rebasing 4:9520eea781bc "E"
   139   rebasing 4:9520eea781bc "E"
   140   rebasing 6:eea13746799a "G"
   140   rebasing 6:eea13746799a "G"
   141   note: rebase of 6:eea13746799a created no changes to commit
   141   note: rebase of 6:eea13746799a created no changes to commit
   142   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob)
   142   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
   143   $ f E.orig
   143   $ f E.orig
   144   E.orig: file not found
   144   E.orig: file not found
   145 
   145 
   146   $ hg tglog
   146   $ hg tglog
   147   o  6: 9f8b8ec77260 'E'
   147   o  6: 9f8b8ec77260 'E'
   169   $ hg rebase -s 5 -d 4
   169   $ hg rebase -s 5 -d 4
   170   rebasing 5:24b6387c8c8c "F"
   170   rebasing 5:24b6387c8c8c "F"
   171   rebasing 6:eea13746799a "G"
   171   rebasing 6:eea13746799a "G"
   172   note: rebase of 6:eea13746799a created no changes to commit
   172   note: rebase of 6:eea13746799a created no changes to commit
   173   rebasing 7:02de42196ebe "H" (tip)
   173   rebasing 7:02de42196ebe "H" (tip)
   174   saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob)
   174   saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg
   175 
   175 
   176   $ hg tglog
   176   $ hg tglog
   177   @  6: e9240aeaa6ad 'H'
   177   @  6: e9240aeaa6ad 'H'
   178   |
   178   |
   179   o  5: 5d0ccadb6e3e 'F'
   179   o  5: 5d0ccadb6e3e 'F'
   196   $ hg clone -q -u . a a5
   196   $ hg clone -q -u . a a5
   197   $ cd a5
   197   $ cd a5
   198 
   198 
   199   $ hg rebase -s 6 -d 7
   199   $ hg rebase -s 6 -d 7
   200   rebasing 6:eea13746799a "G"
   200   rebasing 6:eea13746799a "G"
   201   saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-rebase.hg (glob)
   201   saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-rebase.hg
   202 
   202 
   203   $ hg tglog
   203   $ hg tglog
   204   o    7: 397834907a90 'G'
   204   o    7: 397834907a90 'G'
   205   |\
   205   |\
   206   | @  6: 02de42196ebe 'H'
   206   | @  6: 02de42196ebe 'H'
   227 
   227 
   228   $ hg rebase -s 5 -d 1
   228   $ hg rebase -s 5 -d 1
   229   rebasing 5:24b6387c8c8c "F"
   229   rebasing 5:24b6387c8c8c "F"
   230   rebasing 6:eea13746799a "G"
   230   rebasing 6:eea13746799a "G"
   231   rebasing 7:02de42196ebe "H" (tip)
   231   rebasing 7:02de42196ebe "H" (tip)
   232   saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob)
   232   saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg
   233 
   233 
   234   $ hg tglog
   234   $ hg tglog
   235   @  7: c87be72f9641 'H'
   235   @  7: c87be72f9641 'H'
   236   |
   236   |
   237   | o  6: 17badd73d4f1 'G'
   237   | o  6: 17badd73d4f1 'G'
   300 C onto A - rebase onto an ancestor:
   300 C onto A - rebase onto an ancestor:
   301 
   301 
   302   $ hg rebase -d 0 -s 2
   302   $ hg rebase -d 0 -s 2
   303   rebasing 2:5fddd98957c8 "C"
   303   rebasing 2:5fddd98957c8 "C"
   304   rebasing 3:32af7686d403 "D"
   304   rebasing 3:32af7686d403 "D"
   305   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob)
   305   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg
   306   $ hg tglog
   306   $ hg tglog
   307   o  7: c9659aac0000 'D'
   307   o  7: c9659aac0000 'D'
   308   |
   308   |
   309   o  6: e1c4361dd923 'C'
   309   o  6: e1c4361dd923 'C'
   310   |
   310   |
   344 Source phase greater or equal to destination phase: new changeset get the phase of source:
   344 Source phase greater or equal to destination phase: new changeset get the phase of source:
   345   $ hg id -n
   345   $ hg id -n
   346   5
   346   5
   347   $ hg rebase -s9 -d0
   347   $ hg rebase -s9 -d0
   348   rebasing 9:2b23e52411f4 "D" (tip)
   348   rebasing 9:2b23e52411f4 "D" (tip)
   349   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-rebase.hg (glob)
   349   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-rebase.hg
   350   $ hg id -n # check we updated back to parent
   350   $ hg id -n # check we updated back to parent
   351   5
   351   5
   352   $ hg log --template "{phase}\n" -r 9
   352   $ hg log --template "{phase}\n" -r 9
   353   draft
   353   draft
   354   $ hg rebase -s9 -d1
   354   $ hg rebase -s9 -d1
   355   rebasing 9:2cb10d0cfc6c "D" (tip)
   355   rebasing 9:2cb10d0cfc6c "D" (tip)
   356   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-rebase.hg (glob)
   356   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-rebase.hg
   357   $ hg log --template "{phase}\n" -r 9
   357   $ hg log --template "{phase}\n" -r 9
   358   draft
   358   draft
   359   $ hg phase --force --secret 9
   359   $ hg phase --force --secret 9
   360   $ hg rebase -s9 -d0
   360   $ hg rebase -s9 -d0
   361   rebasing 9:c5b12b67163a "D" (tip)
   361   rebasing 9:c5b12b67163a "D" (tip)
   362   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-rebase.hg (glob)
   362   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-rebase.hg
   363   $ hg log --template "{phase}\n" -r 9
   363   $ hg log --template "{phase}\n" -r 9
   364   secret
   364   secret
   365   $ hg rebase -s9 -d1
   365   $ hg rebase -s9 -d1
   366   rebasing 9:2a0524f868ac "D" (tip)
   366   rebasing 9:2a0524f868ac "D" (tip)
   367   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-rebase.hg (glob)
   367   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-rebase.hg
   368   $ hg log --template "{phase}\n" -r 9
   368   $ hg log --template "{phase}\n" -r 9
   369   secret
   369   secret
   370 Source phase lower than destination phase: new changeset get the phase of destination:
   370 Source phase lower than destination phase: new changeset get the phase of destination:
   371   $ hg rebase -s8 -d9
   371   $ hg rebase -s8 -d9
   372   rebasing 8:6d4f22462821 "C"
   372   rebasing 8:6d4f22462821 "C"
   373   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-rebase.hg (glob)
   373   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-rebase.hg
   374   $ hg log --template "{phase}\n" -r 'rev(9)'
   374   $ hg log --template "{phase}\n" -r 'rev(9)'
   375   secret
   375   secret
   376 
   376 
   377   $ cd ..
   377   $ cd ..
   378 
   378 
   397   |/
   397   |/
   398   o  0:cb9a public a
   398   o  0:cb9a public a
   399   
   399   
   400   $ hg rebase -s 1 -d 2
   400   $ hg rebase -s 1 -d 2
   401   rebasing 1:d2ae7f538514 "b"
   401   rebasing 1:d2ae7f538514 "b"
   402   saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/d2ae7f538514-2953539b-rebase.hg (glob)
   402   saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/d2ae7f538514-2953539b-rebase.hg
   403   $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n'
   403   $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n'
   404   o  2:c882 draft b
   404   o  2:c882 draft b
   405   |
   405   |
   406   @  1:d36c public c
   406   @  1:d36c public c
   407   |
   407   |
   630   $ cd ah5
   630   $ cd ah5
   631   $ hg rebase -r '6::' -d 2
   631   $ hg rebase -r '6::' -d 2
   632   rebasing 6:3d8a618087a7 "G"
   632   rebasing 6:3d8a618087a7 "G"
   633   rebasing 7:72434a4e60b0 "H"
   633   rebasing 7:72434a4e60b0 "H"
   634   rebasing 8:479ddb54a924 "I" (tip)
   634   rebasing 8:479ddb54a924 "I" (tip)
   635   saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-b4f73f31-rebase.hg (glob)
   635   saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-b4f73f31-rebase.hg
   636   $ hg tglog
   636   $ hg tglog
   637   o  8: fcb52e68a694 'I'
   637   o  8: fcb52e68a694 'I'
   638   |
   638   |
   639   o  7: 77bd65cd7600 'H'
   639   o  7: 77bd65cd7600 'H'
   640   |
   640   |
   665   rebasing 4:c01897464e7f "E"
   665   rebasing 4:c01897464e7f "E"
   666   rebasing 5:41bfcc75ed73 "F"
   666   rebasing 5:41bfcc75ed73 "F"
   667   rebasing 6:3d8a618087a7 "G"
   667   rebasing 6:3d8a618087a7 "G"
   668   rebasing 7:72434a4e60b0 "H"
   668   rebasing 7:72434a4e60b0 "H"
   669   rebasing 8:479ddb54a924 "I" (tip)
   669   rebasing 8:479ddb54a924 "I" (tip)
   670   saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-aae93a24-rebase.hg (glob)
   670   saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-aae93a24-rebase.hg
   671   $ hg tglog
   671   $ hg tglog
   672   o  8: 9136df9a87cf 'I'
   672   o  8: 9136df9a87cf 'I'
   673   |
   673   |
   674   o  7: 23e8f30da832 'H'
   674   o  7: 23e8f30da832 'H'
   675   |
   675   |
   734 (actual test)
   734 (actual test)
   735 
   735 
   736   $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)'
   736   $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)'
   737   rebasing 8:e7ec4e813ba6 "I"
   737   rebasing 8:e7ec4e813ba6 "I"
   738   rebasing 10:23a4ace37988 "K" (tip)
   738   rebasing 10:23a4ace37988 "K" (tip)
   739   saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-b06984b3-rebase.hg (glob)
   739   saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-b06984b3-rebase.hg
   740   $ hg log --rev 'children(desc(G))'
   740   $ hg log --rev 'children(desc(G))'
   741   changeset:   9:adb617877056
   741   changeset:   9:adb617877056
   742   parent:      6:eea13746799a
   742   parent:      6:eea13746799a
   743   user:        test
   743   user:        test
   744   date:        Thu Jan 01 00:00:00 1970 +0000
   744   date:        Thu Jan 01 00:00:00 1970 +0000
   801   $ hg rebase -b . -d 1 --traceback
   801   $ hg rebase -b . -d 1 --traceback
   802   rebasing 2:779a07b1b7a0 "first source commit"
   802   rebasing 2:779a07b1b7a0 "first source commit"
   803   current directory was removed (rmcwd !)
   803   current directory was removed (rmcwd !)
   804   (consider changing to repo root: $TESTTMP/cwd-vanish) (rmcwd !)
   804   (consider changing to repo root: $TESTTMP/cwd-vanish) (rmcwd !)
   805   rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip)
   805   rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip)
   806   saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-rebase.hg (glob)
   806   saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-rebase.hg
   807 
   807 
   808 Get back to the root of cwd-vanish. Note that even though `cd ..`
   808 Get back to the root of cwd-vanish. Note that even though `cd ..`
   809 works on most systems, it does not work on FreeBSD 10, so we use an
   809 works on most systems, it does not work on FreeBSD 10, so we use an
   810 absolute path to get back to the repository.
   810 absolute path to get back to the repository.
   811   $ cd $TESTTMP
   811   $ cd $TESTTMP
   852   rebasing 1:76035bbd54bd "B"
   852   rebasing 1:76035bbd54bd "B"
   853   rebasing 2:d84f5cfaaf14 "C"
   853   rebasing 2:d84f5cfaaf14 "C"
   854   rebasing 4:82ae8dc7a9b7 "E"
   854   rebasing 4:82ae8dc7a9b7 "E"
   855   rebasing 3:ab709c9f7171 "D"
   855   rebasing 3:ab709c9f7171 "D"
   856   rebasing 5:412b391de760 "F"
   856   rebasing 5:412b391de760 "F"
   857   saved backup bundle to $TESTTMP/order/.hg/strip-backup/76035bbd54bd-e341bc99-rebase.hg (glob)
   857   saved backup bundle to $TESTTMP/order/.hg/strip-backup/76035bbd54bd-e341bc99-rebase.hg
   858 
   858 
   859   $ hg tglog
   859   $ hg tglog
   860   o  6: 31884cfb735e 'F'
   860   o  6: 31884cfb735e 'F'
   861   |
   861   |
   862   o  5: 6d89fa5b0909 'D'
   862   o  5: 6d89fa5b0909 'D'