tests/test-removeemptydirs.t
changeset 39462 e5449ff273d6
parent 38662 ad2aa4e85047
child 41966 42e2c7c52e1b
equal deleted inserted replaced
39461:7df9ae38c75c 39462:e5449ff273d6
    85   $ echo hi > somedir/baz
    85   $ echo hi > somedir/baz
    86   $ hg ci -qAm second_rebase_dest
    86   $ hg ci -qAm second_rebase_dest
    87   $ hg co -qr 'desc(first_rebase_source)'
    87   $ hg co -qr 'desc(first_rebase_source)'
    88   $ cd $TESTTMP/hgrebase/somedir
    88   $ cd $TESTTMP/hgrebase/somedir
    89   $ hg --config extensions.rebase= rebase -qr . -d 'desc(first_rebase_dest)'
    89   $ hg --config extensions.rebase= rebase -qr . -d 'desc(first_rebase_dest)'
    90   current directory was removed
    90   current directory was removed (rmcwd !)
    91   (consider changing to repo root: $TESTTMP/hgrebase)
    91   (consider changing to repo root: $TESTTMP/hgrebase) (rmcwd !)
    92   $ cd $TESTTMP/hgrebase/somedir
    92   $ cd $TESTTMP/hgrebase/somedir
    93 (The current node is the rebased first_rebase_source on top of
    93 (The current node is the rebased first_rebase_source on top of
    94 first_rebase_dest)
    94 first_rebase_dest)
    95 This should not output anything about current directory being removed:
    95 This should not output anything about current directory being removed:
    96   $ hg $NO_RM --config extensions.rebase= rebase -qr . -d 'desc(second_rebase_dest)'
    96   $ hg $NO_RM --config extensions.rebase= rebase -qr . -d 'desc(second_rebase_dest)'
   172 
   172 
   173   $ cd foo
   173   $ cd foo
   174 
   174 
   175 Histedit doing 'pick, pick, fold':
   175 Histedit doing 'pick, pick, fold':
   176 
   176 
   177   $ hg histedit --commands /dev/stdin <<EOF
   177 #if rmcwd
       
   178 
       
   179   $ hg histedit --commands - <<EOF
   178   > pick 6274c77c93c3 1 add bar
   180   > pick 6274c77c93c3 1 add bar
   179   > pick ff70a87b588f 0 add foo
   181   > pick ff70a87b588f 0 add foo
   180   > fold 9992bb0ac0db 2 add baz
   182   > fold 9992bb0ac0db 2 add baz
   181   > EOF
   183   > EOF
   182   abort: $ENOENT$
   184   abort: $ENOENT$
   193 
   195 
   194   $ hg log -T '{rev}:{node|short} {desc}\n'
   196   $ hg log -T '{rev}:{node|short} {desc}\n'
   195   2:94e3f9fae1d6 fold-temp-revision 9992bb0ac0db
   197   2:94e3f9fae1d6 fold-temp-revision 9992bb0ac0db
   196   1:5c806432464a add foo
   198   1:5c806432464a add foo
   197   0:d17db4b0303a add bar
   199   0:d17db4b0303a add bar
       
   200 
       
   201 #else
       
   202 
       
   203   $ cd $TESTTMP/issue5826_withrm
       
   204 
       
   205   $ hg histedit --commands - <<EOF
       
   206   > pick 6274c77c93c3 1 add bar
       
   207   > pick ff70a87b588f 0 add foo
       
   208   > fold 9992bb0ac0db 2 add baz
       
   209   > EOF
       
   210   saved backup bundle to $TESTTMP/issue5826_withrm/.hg/strip-backup/5c806432464a-cd4c8d86-histedit.hg
       
   211 
       
   212   $ hg log -T '{rev}:{node|short} {desc}\n'
       
   213   1:b9eddaa97cbc add foo
       
   214   ***
       
   215   add baz
       
   216   0:d17db4b0303a add bar
       
   217 
       
   218 #endif
   198 
   219 
   199 Now test that again with experimental.removeemptydirs=false:
   220 Now test that again with experimental.removeemptydirs=false:
   200   $ hg init issue5826_norm
   221   $ hg init issue5826_norm
   201   $ cd issue5826_norm
   222   $ cd issue5826_norm
   202 
   223 
   225 
   246 
   226   $ cd foo
   247   $ cd foo
   227 
   248 
   228 Histedit doing 'pick, pick, fold':
   249 Histedit doing 'pick, pick, fold':
   229 
   250 
   230   $ hg histedit --commands /dev/stdin <<EOF
   251   $ hg histedit --commands - <<EOF
   231   > pick 6274c77c93c3 1 add bar
   252   > pick 6274c77c93c3 1 add bar
   232   > pick ff70a87b588f 0 add foo
   253   > pick ff70a87b588f 0 add foo
   233   > fold 9992bb0ac0db 2 add baz
   254   > fold 9992bb0ac0db 2 add baz
   234   > EOF
   255   > EOF
   235   saved backup bundle to $TESTTMP/issue5826_withrm/issue5826_norm/.hg/strip-backup/5c806432464a-cd4c8d86-histedit.hg
   256   saved backup bundle to $TESTTMP/issue5826_withrm/issue5826_norm/.hg/strip-backup/5c806432464a-cd4c8d86-histedit.hg
   273   > n
   294   > n
   274   > y
   295   > y
   275   > y
   296   > y
   276   > a
   297   > a
   277   > EOF
   298   > EOF
       
   299 
       
   300 The split succeeds on no-rmcwd platforms, which alters the rest of the tests
       
   301 #if rmcwd
   278   $ cat ../split_commands | hg split
   302   $ cat ../split_commands | hg split
   279   current directory was removed
   303   current directory was removed
   280   (consider changing to repo root: $TESTTMP/hgsplit)
   304   (consider changing to repo root: $TESTTMP/hgsplit)
   281   diff --git a/otherfile_in_root b/otherfile_in_root
   305   diff --git a/otherfile_in_root b/otherfile_in_root
   282   new file mode 100644
   306   new file mode 100644
   290   +hi
   314   +hi
   291   record change 2/2 to 'somedir/foo'? [Ynesfdaq?] y
   315   record change 2/2 to 'somedir/foo'? [Ynesfdaq?] y
   292   
   316   
   293   abort: $ENOENT$
   317   abort: $ENOENT$
   294   [255]
   318   [255]
       
   319 #endif
   295 
   320 
   296 Let's try that again without the rmdir
   321 Let's try that again without the rmdir
   297   $ cd $TESTTMP/hgsplit/somedir
   322   $ cd $TESTTMP/hgsplit/somedir
   298 Show that the previous split didn't do anything
   323 Show that the previous split didn't do anything
   299   $ hg log -T '{rev}:{node|short} {desc}\n'
   324   $ hg log -T '{rev}:{node|short} {desc}\n'