tests/test-topic-dest.t
changeset 1892 b1fadc089b82
parent 1891 077c40f206d1
child 1900 27ea12c05e99
--- a/tests/test-topic-dest.t	Sun Mar 13 13:07:54 2016 +0000
+++ b/tests/test-topic-dest.t	Sun Mar 13 12:29:43 2016 +0000
@@ -255,3 +255,181 @@
   |
   o  0 () c_alpha
   
+
+Default destination for update
+===============================
+
+initial setup
+
+  $ hg up elephant
+  switching to topic elephant
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo arthur >> jungle
+  $ hg ci -m arthur
+  created new head
+  $ echo pompadour >> jungle
+  $ hg ci -m pompadour
+  created new head
+  $ hg up 'roots(all())'
+  0 files updated, 0 files merged, 6 files removed, 0 files unresolved
+  $ hg log -G
+  o  15 (elephant) pompadour
+  |
+  o  14 (elephant) arthur
+  |
+  | o    13 (monkey) merge with default
+  | |\
+  o---+  12 (elephant) babar
+   / /
+  | o  11 () c_zeta
+  | |
+  o |  10 (monkey) Huc
+  | |
+  o |  8 (monkey) zephir
+  |/
+  o  6 () c_epsilon
+  |
+  o  3 () c_delta
+  |
+  o  2 () c_gamma
+  |
+  o  1 () c_beta
+  |
+  @  0 () c_alpha
+  
+
+testing default destination on a branch
+
+  $ hg up
+  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg log -G
+  o  15 (elephant) pompadour
+  |
+  o  14 (elephant) arthur
+  |
+  | o    13 (monkey) merge with default
+  | |\
+  o---+  12 (elephant) babar
+   / /
+  | @  11 () c_zeta
+  | |
+  o |  10 (monkey) Huc
+  | |
+  o |  8 (monkey) zephir
+  |/
+  o  6 () c_epsilon
+  |
+  o  3 () c_delta
+  |
+  o  2 () c_gamma
+  |
+  o  1 () c_beta
+  |
+  o  0 () c_alpha
+  
+
+extra setup for topic
+(making sure tip is not the topic)
+
+  $ hg up 'desc(c_zeta)'
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo 'eta' >> 'eta'
+  $ hg add 'eta'
+  $ hg commit -m 'c_eta'
+  $ hg log -G
+  @  16 () c_eta
+  |
+  | o  15 (elephant) pompadour
+  | |
+  | o  14 (elephant) arthur
+  | |
+  +---o  13 (monkey) merge with default
+  | | |
+  | o |  12 (elephant) babar
+  |/ /
+  o |  11 () c_zeta
+  | |
+  | o  10 (monkey) Huc
+  | |
+  | o  8 (monkey) zephir
+  |/
+  o  6 () c_epsilon
+  |
+  o  3 () c_delta
+  |
+  o  2 () c_gamma
+  |
+  o  1 () c_beta
+  |
+  o  0 () c_alpha
+  
+
+Testing default destination for topic
+
+  $ hg up 'roots(topic(elephant))'
+  switching to topic elephant
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg up
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg log -G
+  o  16 () c_eta
+  |
+  | @  15 (elephant) pompadour
+  | |
+  | o  14 (elephant) arthur
+  | |
+  +---o  13 (monkey) merge with default
+  | | |
+  | o |  12 (elephant) babar
+  |/ /
+  o |  11 () c_zeta
+  | |
+  | o  10 (monkey) Huc
+  | |
+  | o  8 (monkey) zephir
+  |/
+  o  6 () c_epsilon
+  |
+  o  3 () c_delta
+  |
+  o  2 () c_gamma
+  |
+  o  1 () c_beta
+  |
+  o  0 () c_alpha
+  
+
+Testing default destination for topic
+
+  $ hg up 'p1(roots(topic(elephant)))'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg topic elephant
+  $ hg up
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg log -G
+  o  16 () c_eta
+  |
+  | @  15 (elephant) pompadour
+  | |
+  | o  14 (elephant) arthur
+  | |
+  +---o  13 (monkey) merge with default
+  | | |
+  | o |  12 (elephant) babar
+  |/ /
+  o |  11 () c_zeta
+  | |
+  | o  10 (monkey) Huc
+  | |
+  | o  8 (monkey) zephir
+  |/
+  o  6 () c_epsilon
+  |
+  o  3 () c_delta
+  |
+  o  2 () c_gamma
+  |
+  o  1 () c_beta
+  |
+  o  0 () c_alpha
+