tests/test-prune.t
changeset 4613 30a544904238
parent 4445 0f2305921e4d
child 4674 3810ca63398f
child 4698 b89495215c6e
equal deleted inserted replaced
4612:c289f06028d0 4613:30a544904238
    56 
    56 
    57 prune current and tip changeset
    57 prune current and tip changeset
    58 
    58 
    59   $ hg prune --user blah --date '1979-12-15' .
    59   $ hg prune --user blah --date '1979-12-15' .
    60   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
    60   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
    61   working directory now at 47d2a3944de8
    61   working directory is now at 47d2a3944de8
    62   1 changesets pruned
    62   1 changesets pruned
    63   $ hg bookmark
    63   $ hg bookmark
    64    * BABAR                     3:47d2a3944de8
    64    * BABAR                     3:47d2a3944de8
    65   $ hg debugobsolete
    65   $ hg debugobsolete
    66   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
    66   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
    79 
    79 
    80 (add color output to test it does not crash)
    80 (add color output to test it does not crash)
    81 
    81 
    82   $ hg prune 2: --color debug
    82   $ hg prune 2: --color debug
    83   [ ui.status|0 files updated, 0 files merged, 3 files removed, 0 files unresolved]
    83   [ ui.status|0 files updated, 0 files merged, 3 files removed, 0 files unresolved]
    84   [ ui.status|working directory now at [evolve.node|1f0dee641bb7]]
    84   [ ui.status|working directory is now at [evolve.node|1f0dee641bb7]]
    85   [ ui.status|2 changesets pruned]
    85   [ ui.status|2 changesets pruned]
    86   $ hg debugobsolete
    86   $ hg debugobsolete
    87   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
    87   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
    88   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
    88   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
    89   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
    89   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   140 
   140 
   141   $ hg up 'desc("add ee")'
   141   $ hg up 'desc("add ee")'
   142   4 files updated, 0 files merged, 4 files removed, 0 files unresolved
   142   4 files updated, 0 files merged, 4 files removed, 0 files unresolved
   143   $ hg prune 'desc("add ee")' -s 'desc("add nE")'
   143   $ hg prune 'desc("add ee")' -s 'desc("add nE")'
   144   4 files updated, 0 files merged, 4 files removed, 0 files unresolved
   144   4 files updated, 0 files merged, 4 files removed, 0 files unresolved
   145   working directory now at 6e8148413dd5
   145   working directory is now at 6e8148413dd5
   146   1 changesets pruned
   146   1 changesets pruned
   147   $ hg debugobsolete
   147   $ hg debugobsolete
   148   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
   148   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
   149   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   149   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   150   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   150   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   237   created new head
   237   created new head
   238   $ mkcommit n2
   238   $ mkcommit n2
   239 
   239 
   240   $ hg prune 'desc("add n1")::desc("add n2")' -s 'desc("add nD")::desc("add nE")' --pair
   240   $ hg prune 'desc("add n1")::desc("add n2")' -s 'desc("add nD")::desc("add nE")' --pair
   241   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   241   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   242   working directory now at 1f0dee641bb7
   242   working directory is now at 1f0dee641bb7
   243   2 changesets pruned
   243   2 changesets pruned
   244   $ hg debugobsolete
   244   $ hg debugobsolete
   245   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
   245   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
   246   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   246   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   247   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   247   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   260   $ mkcommit n1
   260   $ mkcommit n1
   261   created new head
   261   created new head
   262   $ mkcommit n2
   262   $ mkcommit n2
   263   $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r .
   263   $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r .
   264   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   264   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   265   working directory now at c7e58696a948
   265   working directory is now at c7e58696a948
   266   1 changesets pruned
   266   1 changesets pruned
   267   $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . --bundle
   267   $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . --bundle
   268   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   268   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   269   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c7e58696a948-69ca36d3-backup.hg (glob)
   269   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c7e58696a948-69ca36d3-backup.hg (glob)
   270 
   270 
   306   [255]
   306   [255]
   307   $ hg tag --remove --local a
   307   $ hg tag --remove --local a
   308   $ hg prune -B todelete
   308   $ hg prune -B todelete
   309   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   309   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   310   (leaving bookmark todelete)
   310   (leaving bookmark todelete)
   311   working directory now at d62d843c9a01
   311   working directory is now at d62d843c9a01
   312   bookmark 'todelete' deleted
   312   bookmark 'todelete' deleted
   313   1 changesets pruned
   313   1 changesets pruned
   314   $ hg id -ir dcbb326fdec2
   314   $ hg id -ir dcbb326fdec2
   315   abort: hidden revision 'dcbb326fdec2' is pruned!
   315   abort: hidden revision 'dcbb326fdec2' is pruned!
   316   (use --hidden to access hidden revisions)
   316   (use --hidden to access hidden revisions)