tests/test-stack-branch.t
branchmercurial-4.3
changeset 4316 e6ee830c4f45
parent 4077 9c025ec4af88
equal deleted inserted replaced
4315:55ca0b6276e7 4316:e6ee830c4f45
   108 ------------------------------------
   108 ------------------------------------
   109 
   109 
   110   $ echo bbb > ddd
   110   $ echo bbb > ddd
   111   $ hg commit --amend
   111   $ hg commit --amend
   112   $ hg log -G
   112   $ hg log -G
   113   @  6 foo {} draft c_d
   113   @  7 foo {} draft c_d
   114   |
   114   |
   115   | o  5 foo {} draft c_f
   115   | o  5 foo {} draft c_f
   116   | |
   116   | |
   117   | o  4 foo {} draft c_e
   117   | o  4 foo {} draft c_e
   118   | |
   118   | |
   145 
   145 
   146 Also test the revset:
   146 Also test the revset:
   147 
   147 
   148   $ hg log -r 'stack()'
   148   $ hg log -r 'stack()'
   149   2 foo {} draft c_c
   149   2 foo {} draft c_c
   150   6 foo {} draft c_d
   150   7 foo {} draft c_d
   151   4 foo {} draft c_e
   151   4 foo {} draft c_e
   152   5 foo {} draft c_f
   152   5 foo {} draft c_f
   153 
   153 
   154 Case with multiple heads on the topic
   154 Case with multiple heads on the topic
   155 -------------------------------------
   155 -------------------------------------
   158 
   158 
   159   $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
   159   $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
   160   rebasing 4:4f2a69f6d380 "c_e"
   160   rebasing 4:4f2a69f6d380 "c_e"
   161   rebasing 5:913c298d8b0a "c_f"
   161   rebasing 5:913c298d8b0a "c_f"
   162   $ hg log -G
   162   $ hg log -G
   163   o  8 foo {} draft c_f
   163   o  9 foo {} draft c_f
   164   |
   164   |
   165   o  7 foo {} draft c_e
   165   o  8 foo {} draft c_e
   166   |
   166   |
   167   @  6 foo {} draft c_d
   167   @  7 foo {} draft c_d
   168   |
   168   |
   169   o  2 foo {} draft c_c
   169   o  2 foo {} draft c_c
   170   |
   170   |
   171   o  1 other {} public c_b
   171   o  1 other {} public c_b
   172   |
   172   |
   184   (consider using topic for lightweight branches. See 'hg help topic')
   184   (consider using topic for lightweight branches. See 'hg help topic')
   185   $ echo aaa > hhh
   185   $ echo aaa > hhh
   186   $ hg add hhh
   186   $ hg add hhh
   187   $ hg commit -m c_h
   187   $ hg commit -m c_h
   188   $ hg log -G
   188   $ hg log -G
   189   @  10 foo {} draft c_h
   189   @  11 foo {} draft c_h
   190   |
   190   |
   191   o  9 foo {} draft c_g
   191   o  10 foo {} draft c_g
   192   |
   192   |
   193   | o  8 foo {} draft c_f
   193   | o  9 foo {} draft c_f
   194   | |
   194   | |
   195   | o  7 foo {} draft c_e
   195   | o  8 foo {} draft c_e
   196   |/
   196   |/
   197   o  6 foo {} draft c_d
   197   o  7 foo {} draft c_d
   198   |
   198   |
   199   o  2 foo {} draft c_c
   199   o  2 foo {} draft c_c
   200   |
   200   |
   201   o  1 other {} public c_b
   201   o  1 other {} public c_b
   202   |
   202   |
   205 
   205 
   206 Test output
   206 Test output
   207 
   207 
   208   $ hg stack
   208   $ hg stack
   209   ### target: foo (branch) (2 heads)
   209   ### target: foo (branch) (2 heads)
   210   s6@ c_h (current)
   210   s6: c_f
   211   s5: c_g
   211   s5: c_e
   212   s2^ c_d (base)
   212   s2^ c_d (base)
   213   s4: c_f
   213   s4@ c_h (current)
   214   s3: c_e
   214   s3: c_g
   215   s2: c_d
   215   s2: c_d
   216   s1: c_c
   216   s1: c_c
   217   s0^ c_b (base)
   217   s0^ c_b (base)
   218 
   218 
   219 Case with multiple heads on the topic with unstability involved
   219 Case with multiple heads on the topic with unstability involved
   224   $ hg up 'desc(c_d)'
   224   $ hg up 'desc(c_d)'
   225   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   225   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   226   $ echo ccc > ddd
   226   $ echo ccc > ddd
   227   $ hg commit --amend -m 'c_D' 
   227   $ hg commit --amend -m 'c_D' 
   228   $ hg rebase -d . -s 'desc(c_g)'
   228   $ hg rebase -d . -s 'desc(c_g)'
   229   rebasing 9:2ebb6e48ab8a "c_g"
   229   rebasing 10:2ebb6e48ab8a "c_g"
   230   rebasing 10:634f38e27a1d "c_h"
   230   rebasing 11:634f38e27a1d "c_h"
   231   $ hg log -G
   231   $ hg log -G
   232   o  13 foo {} draft c_h
   232   o  15 foo {} draft c_h
   233   |
   233   |
   234   o  12 foo {} draft c_g
   234   o  14 foo {} draft c_g
   235   |
   235   |
   236   @  11 foo {} draft c_D
   236   @  13 foo {} draft c_D
   237   |
   237   |
   238   | o  8 foo {} draft c_f
   238   | o  9 foo {} draft c_f
   239   | |
   239   | |
   240   | o  7 foo {} draft c_e
   240   | o  8 foo {} draft c_e
   241   | |
   241   | |
   242   | x  6 foo {} draft c_d
   242   | x  7 foo {} draft c_d
   243   |/
   243   |/
   244   o  2 foo {} draft c_c
   244   o  2 foo {} draft c_c
   245   |
   245   |
   246   o  1 other {} public c_b
   246   o  1 other {} public c_b
   247   |
   247   |
   248   o  0 other {} public c_a
   248   o  0 other {} public c_a
   249   
   249   
   250 
   250 
   251   $ hg stack
   251   $ hg stack
   252   ### target: foo (branch) (2 heads)
   252   ### target: foo (branch) (2 heads)
   253   s6: c_h
   253   s6$ c_f (unstable)
   254   s5: c_g
   254   s5$ c_e (unstable)
   255   s2^ c_D (base current)
   255   s2^ c_D (base current)
   256   s4$ c_f (unstable)
   256   s4: c_h
   257   s3$ c_e (unstable)
   257   s3: c_g
   258   s2@ c_D (current)
   258   s2@ c_D (current)
   259   s1: c_c
   259   s1: c_c
   260   s0^ c_b (base)
   260   s0^ c_b (base)
   261 
   261 
   262 Check that stack doesn't show draft changesets on a branch
   262 Check that stack doesn't show draft changesets on a branch
   263 ----------------------------------------------------------
   263 ----------------------------------------------------------
   264 
   264 
   265   $ hg log --graph
   265   $ hg log --graph
   266   o  13 foo {} draft c_h
   266   o  15 foo {} draft c_h
   267   |
   267   |
   268   o  12 foo {} draft c_g
   268   o  14 foo {} draft c_g
   269   |
   269   |
   270   @  11 foo {} draft c_D
   270   @  13 foo {} draft c_D
   271   |
   271   |
   272   | o  8 foo {} draft c_f
   272   | o  9 foo {} draft c_f
   273   | |
   273   | |
   274   | o  7 foo {} draft c_e
   274   | o  8 foo {} draft c_e
   275   | |
   275   | |
   276   | x  6 foo {} draft c_d
   276   | x  7 foo {} draft c_d
   277   |/
   277   |/
   278   o  2 foo {} draft c_c
   278   o  2 foo {} draft c_c
   279   |
   279   |
   280   o  1 other {} public c_b
   280   o  1 other {} public c_b
   281   |
   281   |
   282   o  0 other {} public c_a
   282   o  0 other {} public c_a
   283   
   283   
   284 
   284 
   285   $ hg stack
   285   $ hg stack
   286   ### target: foo (branch) (2 heads)
   286   ### target: foo (branch) (2 heads)
   287   s6: c_h
   287   s6$ c_f (unstable)
   288   s5: c_g
   288   s5$ c_e (unstable)
   289   s2^ c_D (base current)
   289   s2^ c_D (base current)
   290   s4$ c_f (unstable)
   290   s4: c_h
   291   s3$ c_e (unstable)
   291   s3: c_g
   292   s2@ c_D (current)
   292   s2@ c_D (current)
   293   s1: c_c
   293   s1: c_c
   294   s0^ c_b (base)
   294   s0^ c_b (base)
   295   $ hg phase --public b1
   295   $ hg phase --public b1
   296   $ hg stack
   296   $ hg stack
   297   ### target: foo (branch) (2 heads)
   297   ### target: foo (branch) (2 heads)
   298   s5: c_h
   298   s5$ c_f (unstable)
   299   s4: c_g
   299   s4$ c_e (unstable)
   300   s1^ c_D (base current)
   300   s1^ c_D (base current)
   301   s3$ c_f (unstable)
   301   s3: c_h
   302   s2$ c_e (unstable)
   302   s2: c_g
   303   s1@ c_D (current)
   303   s1@ c_D (current)
   304   s0^ c_c (base)
   304   s0^ c_c (base)
   305 
   305 
   306 Check that stack doesn't show changeset with a topic
   306 Check that stack doesn't show changeset with a topic
   307 ----------------------------------------------------
   307 ----------------------------------------------------
   308 
   308 
   309   $ hg topic --rev b4::b5 sometopic
   309   $ hg topic --rev b4::b5 sometopic
   310   changed topic on 2 changes
   310   changed topic on 2 changes
   311   $ hg stack
   311   $ hg stack
   312   ### target: foo (branch)
   312   ### target: foo (branch)
   313   s3$ c_f (unstable)
   313   s3: c_h
   314   s2$ c_e (unstable)
   314   s2: c_g
   315   s1@ c_D (current)
   315   s1@ c_D (current)
   316   s0^ c_c (base)
   316   s0^ c_c (base)