tests/test-uncommit.t
changeset 45840 527ce85c2e60
parent 45827 8d72e29ad1e0
child 45853 b4694ef45db5
equal deleted inserted replaced
45839:ebee234d952a 45840:527ce85c2e60
   166   $ hg status
   166   $ hg status
   167   M files
   167   M files
   168   $ hg uncommit
   168   $ hg uncommit
   169   abort: uncommitted changes
   169   abort: uncommitted changes
   170   (requires --allow-dirty-working-copy to uncommit)
   170   (requires --allow-dirty-working-copy to uncommit)
   171   [255]
   171   [20]
   172   $ hg uncommit files
   172   $ hg uncommit files
   173   abort: uncommitted changes
   173   abort: uncommitted changes
   174   (requires --allow-dirty-working-copy to uncommit)
   174   (requires --allow-dirty-working-copy to uncommit)
   175   [255]
   175   [20]
   176   $ cat files
   176   $ cat files
   177   abcde
   177   abcde
   178   foo
   178   foo
   179   $ hg commit --amend -m "files abcde + foo"
   179   $ hg commit --amend -m "files abcde + foo"
   180 
   180 
   182 
   182 
   183   $ echo "bar" >> files
   183   $ echo "bar" >> files
   184   $ hg uncommit
   184   $ hg uncommit
   185   abort: uncommitted changes
   185   abort: uncommitted changes
   186   (requires --allow-dirty-working-copy to uncommit)
   186   (requires --allow-dirty-working-copy to uncommit)
   187   [255]
   187   [20]
   188   $ hg uncommit --config experimental.uncommitondirtywdir=True
   188   $ hg uncommit --config experimental.uncommitondirtywdir=True
   189   $ hg commit -m "files abcde + foo"
   189   $ hg commit -m "files abcde + foo"
   190 
   190 
   191 Uncommit in the middle of a stack, does not move bookmark
   191 Uncommit in the middle of a stack, does not move bookmark
   192 
   192 
   405   (branch merge, don't forget to commit)
   405   (branch merge, don't forget to commit)
   406 
   406 
   407   $ hg uncommit
   407   $ hg uncommit
   408   abort: outstanding uncommitted merge
   408   abort: outstanding uncommitted merge
   409   (requires --allow-dirty-working-copy to uncommit)
   409   (requires --allow-dirty-working-copy to uncommit)
   410   [255]
   410   [20]
   411 
   411 
   412   $ hg uncommit --config experimental.uncommitondirtywdir=True
   412   $ hg uncommit --config experimental.uncommitondirtywdir=True
   413   abort: cannot uncommit while merging
   413   abort: cannot uncommit while merging
   414   [255]
   414   [255]
   415 
   415 
   505   $ hg ci -Am 'add b'
   505   $ hg ci -Am 'add b'
   506   $ echo 'foo bar' > b
   506   $ echo 'foo bar' > b
   507   $ hg uncommit b
   507   $ hg uncommit b
   508   abort: uncommitted changes
   508   abort: uncommitted changes
   509   (requires --allow-dirty-working-copy to uncommit)
   509   (requires --allow-dirty-working-copy to uncommit)
   510   [255]
   510   [20]
   511   $ hg uncommit --allow-dirty-working-copy b
   511   $ hg uncommit --allow-dirty-working-copy b
   512   $ hg log
   512   $ hg log
   513   changeset:   3:30fa958635b2
   513   changeset:   3:30fa958635b2
   514   tag:         tip
   514   tag:         tip
   515   parent:      1:656ba143d384
   515   parent:      1:656ba143d384