diff tests/test-topic-push.t @ 1903:58cdf061d49a

topic: don't take topic into account when pushing to non-topic repo Previously, pushing to a non-publishing repository without topic support would wrongfully use topic when searching for new heads.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 15 Mar 2016 17:26:57 +0000
parents 68125d026b07
children bdc5bb223b50
line wrap: on
line diff
--- a/tests/test-topic-push.t	Wed Mar 16 12:14:20 2016 -0700
+++ b/tests/test-topic-push.t	Tue Mar 15 17:26:57 2016 +0000
@@ -200,8 +200,34 @@
   o  0 default  public CA
   
 
+Pushing a new topic to a non publishing server without topic -> new head
+
+  $ cat << EOF >> ../draft/.hg/hgrc
+  > [extensions]
+  > topic=!
+  > EOF
+  $ hg push ssh://user@dummy/draft
+  pushing to ssh://user@dummy/draft
+  searching for changes
+  abort: push creates new remote head 84eaf32db6c3!
+  (merge or see "hg help push" for details about pushing new heads)
+  [255]
+  $ hg log -G
+  @  6 default celeste draft CE
+  |
+  | o  5 default babar draft CD
+  |/
+  | o  4 mountain  public CC
+  |/
+  | o  1 default  public CB
+  |/
+  o  0 default  public CA
+  
+
 Pushing a new topic to a non publishing server should not be seen as a new head
 
+  $ printf "topic=" >> ../draft/.hg/hgrc
+  $ hg config extensions.topic >> ../draft/.hg/hgrc
   $ hg push ssh://user@dummy/draft
   pushing to ssh://user@dummy/draft
   searching for changes