tests/test-add.t
changeset 37756 e7bf5a73e4e1
parent 36939 45bfcd16f27e
child 37778 f10cb49951e1
equal deleted inserted replaced
37755:886754323bed 37756:e7bf5a73e4e1
   270   $ hg forget not_exist -n
   270   $ hg forget not_exist -n
   271   not_exist: $ENOENT$
   271   not_exist: $ENOENT$
   272   [1]
   272   [1]
   273 
   273 
   274   $ cd ..
   274   $ cd ..
       
   275 
       
   276 test --confirm option in forget
       
   277 
       
   278   $ hg init forgetconfirm
       
   279   $ cd forgetconfirm
       
   280   $ echo foo > foo
       
   281   $ hg commit -qAm "foo"
       
   282   $ echo bar > bar
       
   283   $ hg commit -qAm "bar"
       
   284   $ hg forget foo --dry-run --confirm
       
   285   abort: cannot specify both --dry-run and --confirm
       
   286   [255]
       
   287 
       
   288   $ hg forget foo --config ui.interactive=True --confirm << EOF
       
   289   > ?
       
   290   > n
       
   291   > EOF
       
   292   forget foo [Ynsa?] ?
       
   293   y - yes, forget this file
       
   294   n - no, skip this file
       
   295   s - skip remaining files
       
   296   a - include all remaining files
       
   297   ? - ? (display help)
       
   298   forget foo [Ynsa?] n
       
   299 
       
   300   $ hg forget foo bar --config ui.interactive=True --confirm << EOF
       
   301   > y
       
   302   > n
       
   303   > EOF
       
   304   forget bar [Ynsa?] y
       
   305   forget foo [Ynsa?] n
       
   306   removing bar
       
   307   $ hg status
       
   308   R bar
       
   309   $ hg up -qC .
       
   310 
       
   311   $ hg forget foo bar --config ui.interactive=True --confirm << EOF
       
   312   > s
       
   313   > EOF
       
   314   forget bar [Ynsa?] s
       
   315   $ hg st
       
   316   $ hg up -qC .
       
   317 
       
   318   $ hg forget foo bar --config ui.interactive=True --confirm << EOF
       
   319   > a
       
   320   > EOF
       
   321   forget bar [Ynsa?] a
       
   322   removing bar
       
   323   removing foo
       
   324   $ hg status
       
   325   R bar
       
   326   R foo
       
   327   $ hg up -qC .
       
   328 
       
   329   $ cd ..