changeset 2770:9585fac76d2d

topic: adjust head checking wrapping to not interfere with concurrent push In the previous form, the new topic head was detected as affected and the push was rejected. We introduce a of 'test-topic-push.t' using the new race checker as there have been many compatibility issue with this new checkers.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 28 Jun 2017 18:18:59 +0200
parents 1014341c637b
children 304232cc14b6
files hgext3rd/topic/discovery.py tests/test-topic-push-concurrent-on.t
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py
+++ b/hgext3rd/topic/discovery.py
@@ -64,7 +64,7 @@
         for key, value in summary.iteritems():
             if ':' in key: # This is a topic
                 if value[0] is None and value[1]:
-                    summary[key] = ([value[1].pop(0)], ) + value[1:]
+                    summary[key] = ([value[1][0]], ) + value[1:]
         return summary
     finally:
         if 'unfiltered' in vars(repo):
copy from tests/test-topic-push.t
copy to tests/test-topic-push-concurrent-on.t
--- a/tests/test-topic-push.t
+++ b/tests/test-topic-push-concurrent-on.t
@@ -1,9 +1,13 @@
+# same as test-topic-push but with the concurrent push feature on
+
   $ . "$TESTDIR/testlib/topic_setup.sh"
 
   $ cat << EOF >> $HGRCPATH
   > [ui]
   > logtemplate = {rev} {branch} {get(namespaces, "topics")} {phase} {desc|firstline}\n
   > ssh =python "$RUNTESTDIR/dummyssh"
+  > [server]
+  > concurrent-push-mode=check-related
   > EOF
 
   $ hg init main