tests/test-prune.t
changeset 1732 f4047fba5e90
parent 1689 60752ed8d2d4
child 1747 b0a67ebc464e
child 1756 a7dcfff8c4a9
equal deleted inserted replaced
1731:7a76f9a43e89 1732:f4047fba5e90
     1   $ cat >> $HGRCPATH <<EOF
     1   $ cat >> $HGRCPATH <<EOF
     2   > [ui]
     2   > [ui]
     3   > logtemplate={rev}:{node|short}[{bookmarks}] ({obsolete}/{phase}) {desc|firstline}\n
     3   > logtemplate={rev}:{node|short}[{bookmarks}] ({separate('/', obsolete ,phase)}) {desc|firstline}\n
     4   > [extensions]
     4   > [extensions]
     5   > EOF
     5   > EOF
     6   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
     6   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
     7 
     7 
     8   $ mkcommit() {
     8   $ mkcommit() {
    19   $ mkcommit c
    19   $ mkcommit c
    20   $ mkcommit d
    20   $ mkcommit d
    21   $ mkcommit e
    21   $ mkcommit e
    22   $ hg bookmarks BABAR
    22   $ hg bookmarks BABAR
    23   $ hg log -G
    23   $ hg log -G
    24   @  4:9d206ffc875e[BABAR] (stable/draft) add e
    24   @  4:9d206ffc875e[BABAR] (draft) add e
    25   |
    25   |
    26   o  3:47d2a3944de8[] (stable/draft) add d
    26   o  3:47d2a3944de8[] (draft) add d
    27   |
    27   |
    28   o  2:4538525df7e2[] (stable/draft) add c
    28   o  2:4538525df7e2[] (draft) add c
    29   |
    29   |
    30   o  1:7c3bad9141dc[] (stable/draft) add b
    30   o  1:7c3bad9141dc[] (draft) add b
    31   |
    31   |
    32   o  0:1f0dee641bb7[] (stable/public) add a
    32   o  0:1f0dee641bb7[] (public) add a
    33   
    33   
    34 
    34 
    35 Check arguments exclusive to each other
    35 Check arguments exclusive to each other
    36 ---------------------------------------
    36 ---------------------------------------
    37 
    37 
   107   $ mkcommit nC
   107   $ mkcommit nC
   108   $ mkcommit nD
   108   $ mkcommit nD
   109   $ mkcommit nE
   109   $ mkcommit nE
   110 
   110 
   111   $ hg log -G
   111   $ hg log -G
   112   @  12:6e8148413dd5[] (stable/draft) add nE
   112   @  12:6e8148413dd5[] (draft) add nE
   113   |
   113   |
   114   o  11:8ee176ff1d4b[] (stable/draft) add nD
   114   o  11:8ee176ff1d4b[] (draft) add nD
   115   |
   115   |
   116   o  10:aa96dc3f04c2[] (stable/draft) add nC
   116   o  10:aa96dc3f04c2[] (draft) add nC
   117   |
   117   |
   118   o  9:6f6f25e4f748[] (stable/draft) add nB
   118   o  9:6f6f25e4f748[] (draft) add nB
   119   |
   119   |
   120   | o  8:bb5e90a7ea1f[] (stable/draft) add ee
   120   | o  8:bb5e90a7ea1f[] (draft) add ee
   121   | |
   121   | |
   122   | o  7:00ded550b1e2[] (stable/draft) add dd
   122   | o  7:00ded550b1e2[] (draft) add dd
   123   | |
   123   | |
   124   | o  6:354011cd103f[] (stable/draft) add cc
   124   | o  6:354011cd103f[] (draft) add cc
   125   | |
   125   | |
   126   | o  5:814c38b95e72[] (stable/draft) add bb
   126   | o  5:814c38b95e72[] (draft) add bb
   127   |/
   127   |/
   128   o  0:1f0dee641bb7[BABAR] (stable/public) add a
   128   o  0:1f0dee641bb7[BABAR] (public) add a
   129   
   129   
   130 
   130 
   131 one old, one new
   131 one old, one new
   132 
   132 
   133   $ hg up 'desc("add ee")'
   133   $ hg up 'desc("add ee")'
   141   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob)
   141   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob)
   142   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob)
   142   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob)
   143   47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob)
   143   47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob)
   144   bb5e90a7ea1f3b4b38b23150a4a597b6146d70ef 6e8148413dd541855b72a920a90c06fca127c7e7 0 (*) {'user': 'test'} (glob)
   144   bb5e90a7ea1f3b4b38b23150a4a597b6146d70ef 6e8148413dd541855b72a920a90c06fca127c7e7 0 (*) {'user': 'test'} (glob)
   145   $ hg log -G
   145   $ hg log -G
   146   @  12:6e8148413dd5[] (stable/draft) add nE
   146   @  12:6e8148413dd5[] (draft) add nE
   147   |
   147   |
   148   o  11:8ee176ff1d4b[] (stable/draft) add nD
   148   o  11:8ee176ff1d4b[] (draft) add nD
   149   |
   149   |
   150   o  10:aa96dc3f04c2[] (stable/draft) add nC
   150   o  10:aa96dc3f04c2[] (draft) add nC
   151   |
   151   |
   152   o  9:6f6f25e4f748[] (stable/draft) add nB
   152   o  9:6f6f25e4f748[] (draft) add nB
   153   |
   153   |
   154   | o  7:00ded550b1e2[] (stable/draft) add dd
   154   | o  7:00ded550b1e2[] (draft) add dd
   155   | |
   155   | |
   156   | o  6:354011cd103f[] (stable/draft) add cc
   156   | o  6:354011cd103f[] (draft) add cc
   157   | |
   157   | |
   158   | o  5:814c38b95e72[] (stable/draft) add bb
   158   | o  5:814c38b95e72[] (draft) add bb
   159   |/
   159   |/
   160   o  0:1f0dee641bb7[BABAR] (stable/public) add a
   160   o  0:1f0dee641bb7[BABAR] (public) add a
   161   
   161   
   162 
   162 
   163 one old, two new
   163 one old, two new
   164 
   164 
   165   $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")'
   165   $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")'
   173   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob)
   173   4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob)
   174   47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob)
   174   47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob)
   175   bb5e90a7ea1f3b4b38b23150a4a597b6146d70ef 6e8148413dd541855b72a920a90c06fca127c7e7 0 (*) {'user': 'test'} (glob)
   175   bb5e90a7ea1f3b4b38b23150a4a597b6146d70ef 6e8148413dd541855b72a920a90c06fca127c7e7 0 (*) {'user': 'test'} (glob)
   176   00ded550b1e28bba454bd34cec1269d22cf3ef25 aa96dc3f04c2c2341fe6880aeb6dc9fbffff9ef9 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (*) {'user': 'test'} (glob)
   176   00ded550b1e28bba454bd34cec1269d22cf3ef25 aa96dc3f04c2c2341fe6880aeb6dc9fbffff9ef9 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (*) {'user': 'test'} (glob)
   177   $ hg log -G
   177   $ hg log -G
   178   @  12:6e8148413dd5[] (stable/draft) add nE
   178   @  12:6e8148413dd5[] (draft) add nE
   179   |
   179   |
   180   o  11:8ee176ff1d4b[] (stable/draft) add nD
   180   o  11:8ee176ff1d4b[] (draft) add nD
   181   |
   181   |
   182   o  10:aa96dc3f04c2[] (stable/draft) add nC
   182   o  10:aa96dc3f04c2[] (draft) add nC
   183   |
   183   |
   184   o  9:6f6f25e4f748[] (stable/draft) add nB
   184   o  9:6f6f25e4f748[] (draft) add nB
   185   |
   185   |
   186   | o  6:354011cd103f[] (stable/draft) add cc
   186   | o  6:354011cd103f[] (draft) add cc
   187   | |
   187   | |
   188   | o  5:814c38b95e72[] (stable/draft) add bb
   188   | o  5:814c38b95e72[] (draft) add bb
   189   |/
   189   |/
   190   o  0:1f0dee641bb7[BABAR] (stable/public) add a
   190   o  0:1f0dee641bb7[BABAR] (public) add a
   191   
   191   
   192 
   192 
   193 two old, two new (should be denied)
   193 two old, two new (should be denied)
   194 
   194 
   195   $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nD")' -s 'desc("add nC")'
   195   $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nD")' -s 'desc("add nC")'
   371   $ hg up 10
   371   $ hg up 10
   372   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   372   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   373   (leaving bookmark rg)
   373   (leaving bookmark rg)
   374   $ hg bookmark r10
   374   $ hg bookmark r10
   375   $ hg log -G
   375   $ hg log -G
   376   o  15:cd0038e05e1b[rg] (stable/draft) add rg
   376   o  15:cd0038e05e1b[rg] (draft) add rg
   377   |
   377   |
   378   | x  14:43227190fef8[] (extinct/draft) r14
   378   | x  14:43227190fef8[] (obsolete/draft) r14
   379   | |
   379   | |
   380   | | x  13:b4594d867745[] (extinct/draft) r13
   380   | | x  13:b4594d867745[] (obsolete/draft) r13
   381   | | |
   381   | | |
   382   | | | x  12:e46a4836065c[] (extinct/draft) r12
   382   | | | x  12:e46a4836065c[] (obsolete/draft) r12
   383   | | |/
   383   | | |/
   384   | | o  11:bab5d5bf48bd[] (stable/draft) r11
   384   | | o  11:bab5d5bf48bd[] (draft) r11
   385   | |/
   385   | |/
   386   +---@  10:ff43616e5d0f[B r10] (stable/draft) r10
   386   +---@  10:ff43616e5d0f[B r10] (draft) r10
   387   | |
   387   | |
   388   o |  8:d62d843c9a01[] (stable/draft) r8
   388   o |  8:d62d843c9a01[] (draft) r8
   389   | |
   389   | |
   390   o |  7:e7d9710d9fc6[] (stable/draft) r7
   390   o |  7:e7d9710d9fc6[] (draft) r7
   391   |/
   391   |/
   392   o    3:2b6d669947cd[] (stable/draft) r3
   392   o    3:2b6d669947cd[] (draft) r3
   393   |\
   393   |\
   394   | o  2:fa942426a6fd[] (stable/draft) r2
   394   | o  2:fa942426a6fd[] (draft) r2
   395   | |
   395   | |
   396   o |  1:66f7d451a68b[] (stable/draft) r1
   396   o |  1:66f7d451a68b[] (draft) r1
   397   |/
   397   |/
   398   o  0:1ea73414a91b[] (stable/draft) r0
   398   o  0:1ea73414a91b[] (draft) r0
   399   
   399   
   400   $ hg prune 11
   400   $ hg prune 11
   401   1 changesets pruned
   401   1 changesets pruned
   402   $ hg log -G
   402   $ hg log -G
   403   o  15:cd0038e05e1b[rg] (stable/draft) add rg
   403   o  15:cd0038e05e1b[rg] (draft) add rg
   404   |
   404   |
   405   | x  14:43227190fef8[] (extinct/draft) r14
   405   | x  14:43227190fef8[] (obsolete/draft) r14
   406   | |
   406   | |
   407   | | x  13:b4594d867745[] (extinct/draft) r13
   407   | | x  13:b4594d867745[] (obsolete/draft) r13
   408   | | |
   408   | | |
   409   | | | x  12:e46a4836065c[] (extinct/draft) r12
   409   | | | x  12:e46a4836065c[] (obsolete/draft) r12
   410   | | |/
   410   | | |/
   411   | | x  11:bab5d5bf48bd[] (extinct/draft) r11
   411   | | x  11:bab5d5bf48bd[] (obsolete/draft) r11
   412   | |/
   412   | |/
   413   +---@  10:ff43616e5d0f[B r10] (stable/draft) r10
   413   +---@  10:ff43616e5d0f[B r10] (draft) r10
   414   | |
   414   | |
   415   o |  8:d62d843c9a01[] (stable/draft) r8
   415   o |  8:d62d843c9a01[] (draft) r8
   416   | |
   416   | |
   417   o |  7:e7d9710d9fc6[] (stable/draft) r7
   417   o |  7:e7d9710d9fc6[] (draft) r7
   418   |/
   418   |/
   419   o    3:2b6d669947cd[] (stable/draft) r3
   419   o    3:2b6d669947cd[] (draft) r3
   420   |\
   420   |\
   421   | o  2:fa942426a6fd[] (stable/draft) r2
   421   | o  2:fa942426a6fd[] (draft) r2
   422   | |
   422   | |
   423   o |  1:66f7d451a68b[] (stable/draft) r1
   423   o |  1:66f7d451a68b[] (draft) r1
   424   |/
   424   |/
   425   o  0:1ea73414a91b[] (stable/draft) r0
   425   o  0:1ea73414a91b[] (draft) r0
   426   
   426   
   427   $ hg book CELESTE
   427   $ hg book CELESTE
   428   $ hg prune -r . --keep
   428   $ hg prune -r . --keep
   429   1 changesets pruned
   429   1 changesets pruned
   430   $ hg book
   430   $ hg book